From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xiao Guangrong Subject: Re: [PATCH v6 5/9] KVM: MMU: introduce SPTE_MMU_WRITEABLE bit Date: Thu, 14 Jun 2012 10:36:41 +0800 Message-ID: <4FD94E39.50107@linux.vnet.ibm.com> References: <4FC470C7.5040700@linux.vnet.ibm.com> <4FC4716A.8030304@linux.vnet.ibm.com> <20120613213905.GD19290@amt.cnet> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Avi Kivity , LKML , KVM To: Marcelo Tosatti Return-path: In-Reply-To: <20120613213905.GD19290@amt.cnet> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 06/14/2012 05:39 AM, Marcelo Tosatti wrote: >> + if (pt_protect) >> + spte &= ~SPTE_MMU_WRITEABLE; >> spte = spte & ~PT_WRITABLE_MASK; >> - mmu_spte_update(sptep, spte); >> + >> + *flush = mmu_spte_update(sptep, spte); > > This clears previous flush value when looping over multiple sptes in > a single rmapp. > In this case, mmu_spte_update alway return "true" since the spte is always writable or can-be-writable-lockless. I will cleanup it in the next version. Thank you, Marcelo!