From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH v2 3/4] KVM: MMU: Atomically check for accessed bit when dropping an spte Date: Tue, 08 Jun 2010 08:51:47 +0300 Message-ID: <4C0DDA73.2060106@redhat.com> References: <1275894659-17656-1-git-send-email-avi@redhat.com> <1275894659-17656-4-git-send-email-avi@redhat.com> <4C0DA5EA.80009@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , kvm@vger.kernel.org To: Xiao Guangrong Return-path: Received: from mx1.redhat.com ([209.132.183.28]:31784 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752428Ab0FHFvy (ORCPT ); Tue, 8 Jun 2010 01:51:54 -0400 In-Reply-To: <4C0DA5EA.80009@cn.fujitsu.com> Sender: kvm-owner@vger.kernel.org List-ID: 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.