From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: merge kvm_flush_remote_tlbs when modifing shadow pte Date: Tue, 18 Dec 2007 17:26:14 +0200 Message-ID: <4767E696.9080004@qumranet.com> References: <10EA09EFD8728347A513008B6B0DA77A028595A0@pdsmsx411.ccr.corp.intel.com> <47670419.8060302@qumranet.com> <10EA09EFD8728347A513008B6B0DA77A028596B5@pdsmsx411.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel To: "Dong, Eddie" Return-path: In-Reply-To: <10EA09EFD8728347A513008B6B0DA77A028596B5-wq7ZOvIWXbNpB2pF5aRoyrfspsVTdybXVpNB7YpNyf8@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Errors-To: kvm-devel-bounces-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: kvm.vger.kernel.org Dong, Eddie wrote: >> Dong, Eddie wrote: >> >>> host side TLB flush can be merged together if multiple >>> spte need to be write-protected. >>> >>> Signed-off-by: Yaozu (Eddie) Dong >>> >>> diff --git a/drivers/kvm/mmu.c b/drivers/kvm/mmu.c >>> index 92ac0d1..749db46 100644 >>> --- a/drivers/kvm/mmu.c >>> +++ b/drivers/kvm/mmu.c >>> @@ -524,9 +524,9 @@ static void rmap_write_protect(struct >>> >> kvm *kvm, u64 >> >>> gfn) >>> rmap_printk("rmap_write_protect: spte %p %llx\n", spte, >>> *spte); >>> if (is_writeble_pte(*spte)) >>> set_shadow_pte(spte, *spte & ~PT_WRITABLE_MASK); >>> - kvm_flush_remote_tlbs(kvm); >>> spte = rmap_next(kvm, rmapp, spte); >>> } >>> + kvm_flush_remote_tlbs(kvm); >>> } >>> >>> >> I think this can be improved; in case we don't touch the shadow pte at >> all, there is no need to flush the tlbs. >> >> Also, please pull from kvm.git; things have moved around (mmu.c is now >> in arch/x86/kvm/). >> >> >> > Sure, rebased. > thx,eddie > Applied, thanks. -- error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace