From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] KVM: VMX: Add ept_sync_context in flush_tlb Date: Sun, 06 Jul 2008 14:55:39 +0300 Message-ID: <4870B2BB.1090401@qumranet.com> References: <200806181138.22990.sheng.yang@intel.com> <200806260847.14386.sheng.yang@intel.com> <48675F50.9000905@qumranet.com> <200807061920.02935.sheng.yang@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: "Yang, Sheng" Return-path: Received: from il.qumranet.com ([212.179.150.194]:46045 "EHLO il.qumranet.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753212AbYGFLzl (ORCPT ); Sun, 6 Jul 2008 07:55:41 -0400 In-Reply-To: <200807061920.02935.sheng.yang@intel.com> Sender: kvm-owner@vger.kernel.org List-ID: Yang, Sheng wrote: > On Sunday 29 June 2008 18:09:20 Avi Kivity wrote: > >> I see. Back to the patch, can't you replace vmx->eptp by >> construct_eptp(vcpu->arch.mmu.root_hpa)? >> > > Modified follow Avi's advice. Sorry for miss the mail... > > From 251b611f7e90833aa07184e69ffe133fbcd83c76 Mon Sep 17 00:00:00 2001 > From: Sheng Yang > Date: Sun, 6 Jul 2008 19:16:51 +0800 > Subject: [PATCH] KVM: VMX: Add ept_sync_context in flush_tlb > > Fix a potention issue caused by kvm_mmu_slot_remove_write_access(). > The > old behavior don't sync EPT TLB with modified EPT entry, which result > in inconsistent content of EPT TLB and EPT table. > > Applied, thanks. > +static u64 construct_eptp(unsigned long root_hpa) > +{ > + u64 eptp; > + > + /* TODO write the value reading from MSR */ > + eptp = VMX_EPT_DEFAULT_MT | > + VMX_EPT_DEFAULT_GAW << VMX_EPT_GAW_EPTP_SHIFT; > + eptp |= (root_hpa & PAGE_MASK); > + > + return eptp; > +} > + > -static u64 construct_eptp(unsigned long root_hpa) > -{ > - u64 eptp; > - > - /* TODO write the value reading from MSR */ > - eptp = VMX_EPT_DEFAULT_MT | > - VMX_EPT_DEFAULT_GAW << VMX_EPT_GAW_EPTP_SHIFT; > - eptp |= (root_hpa & PAGE_MASK); > - > - return eptp; > -} > - > I added a forward declaration rather than move the code to make it clear there are no changes here. -- error compiling committee.c: too many arguments to function