From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 1/7] KVM: MMU: optimize pte write path if don't have protected sp Date: Sun, 15 May 2011 11:38:29 +0300 Message-ID: <4DCF9105.4020000@redhat.com> References: <4DCEF5B1.3050706@cn.fujitsu.com> <4DCF8CBC.1040602@redhat.com> <4DCF8FC6.8050600@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , LKML , KVM To: Xiao Guangrong Return-path: In-Reply-To: <4DCF8FC6.8050600@cn.fujitsu.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 05/15/2011 11:33 AM, Xiao Guangrong wrote: > > > > These atomic ops are always called from within the spinlock, so we don't need an atomic_t here. > > > > Sorry, I should have noticed this on the first version. > > We read indirect_shadow_pages atomically on pte write path, that is allowed out of mmu_lock Reading is fine: #define atomic_read(v) (*(volatile int *)&(v)->counter) -- error compiling committee.c: too many arguments to function