Re: [PATCH v2 3/4] KVM: MMU: Atomically check for accessed bit when dropping an spte

Xiao Guangrong
2010-06-08T02:11:09Z

Avi Kivity wrote:

> +static u64 __xchg_spte(u64 *sptep, u64 new_spte)
> +{
> +#ifdef CONFIG_X86_64
> + return xchg(sptep, new_spte);
> +#else
> + u64 old_spte;
> +
> + do {
> + old_spte = *sptep;
> + } while (cmpxchg64(sptep, old_spte, new_spte) != old_spte);
> +
> + return old;

it's a typo: 'old' -> 'old_spte' :-)