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

Avi Kivity
2010-06-08T05:51:54Z

On 06/08/2010 05:07 AM, Xiao Guangrong wrote:
>
> 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' :-)
>

Thanks. Reminds me I need to test i386 too.

--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.