From: Joerg Roedel Subject: Re: [PATCH 08/12] kvm/svm: cache nested intercepts Date: Wed, 29 Jul 2009 15:52:41 +0200 Message-ID: <20090729135241.GM18313@amd.com> References: <1248872192-30881-1-git-send-email-joerg.roedel@amd.com> <1248872192-30881-9-git-send-email-joerg.roedel@amd.com> <4A7053AF.60301@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Cc: Avi Kivity , kvm@vger.kernel.org, linux-kernel@vger.kernel.org To: Alexander Graf Return-path: Content-Disposition: inline In-Reply-To: <4A7053AF.60301@suse.de> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On Wed, Jul 29, 2009 at 03:50:39PM +0200, Alexander Graf wrote: > Joerg Roedel wrote: > > Signed-off-by: Joerg Roedel > > --- > > arch/x86/kvm/svm.c | 30 +++++++++++++++++++++++------- > > 1 files changed, 23 insertions(+), 7 deletions(-) > > > > diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c > > index 31467b1..9192c9a 100644 > > --- a/arch/x86/kvm/svm.c > > +++ b/arch/x86/kvm/svm.c > > @@ -86,6 +86,15 @@ struct nested_state { > > > > /* gpa pointers to the real vectors */ > > u64 vmcb_msrpm; > > + > > + /* cache for intercepts of the guest */ > > + u16 intercept_cr_read; > > + u16 intercept_cr_write; > > + u16 intercept_dr_read; > > + u16 intercept_dr_write; > > + u32 intercept_exceptions; > > + u64 intercept; > > + > > }; > > > > struct vcpu_svm { > > @@ -1459,7 +1468,6 @@ static int nested_svm_exit_handled_real(struct vcpu_svm *svm, > > void *arg2, > > void *opaque) > > { > > - struct vmcb *nested_vmcb = (struct vmcb *)arg1; > > > > That's not enough. You actually have to make the caller not pass it as > argument too. Otherwise a good idea. Yeah, true. Thats planned but not yet done. Today I just sent out what I have so far :) This will surely be part of the second cleanup round. Joerg