From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH] lighweight VM Exit Date: Mon, 14 May 2007 16:34:58 +0100 Message-ID: <20070514153458.GA11056@infradead.org> References: <10EA09EFD8728347A513008B6B0DA77A016FBD91@pdsmsx411.ccr.corp.intel.com> <46487CD7.8070408@qumranet.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: kvm-devel To: Avi Kivity Return-path: Content-Disposition: inline In-Reply-To: <46487CD7.8070408-atKUWr5tajBWk0Htik3J/w@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 On Mon, May 14, 2007 at 06:14:31PM +0300, Avi Kivity wrote: > Dong, Eddie wrote: > > OK, how about this patch which further reduce the light weight VM Exit > > MSR save/restore? > > > > > > diff --git a/drivers/kvm/kvm_main.c b/drivers/kvm/kvm_main.c > > index 1288cff..ef96fae 100644 > > --- a/drivers/kvm/kvm_main.c > > +++ b/drivers/kvm/kvm_main.c > > @@ -1596,6 +1596,30 @@ void kvm_resched(struct kvm_vcpu *vcpu) > > } > > EXPORT_SYMBOL_GPL(kvm_resched); > > > > +void load_msrs_select(struct vmx_msr_entry *e, int bitmap) > > +{ > > + unsigned long nr; > > + > > + while (bitmap) { > > + nr = __ffs(bitmap); > > + clear_bit(nr,&bitmap); > > + wrmsrl(e[nr].index, e[nr].data); > > + } > > +} > > +EXPORT_SYMBOL_GPL(load_msrs_select); Exported symbols should have names with a meaningfull prefix and a kerneldoc comment describing them. ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/