From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [RFC] VMX CR3 cache Date: Mon, 28 Jan 2008 19:23:38 +0200 Message-ID: <479E0F9A.8040609@qumranet.com> References: <20080128160444.GA3821@dmt> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel To: Marcelo Tosatti Return-path: In-Reply-To: <20080128160444.GA3821@dmt> 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 Marcelo Tosatti wrote: > So the questions are, why the benefit is not similar (vm-exit's are now > way cheaper?) and is it worth to merge this given the results? > Yes, vmexits are now about 5 times faster compared to older kvm. > + > +/* > + * Avoid the VM exit upon cr3 load by using the cached > + * ->active_mm->pgd value: > + */ > +static void kvm_flush_tlb_user(void) > +{ > + kvm_write_cr3(__pa(current->active_mm->pgd)); > +} Would be nice to get this for non-paravirt kernels (perhaps by keeping __pa(pgd) in a pda variable, instead of reading it through current). -- error compiling committee.c: too many arguments to function ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/