Re: [PATCH 08/12] kvm/svm: cache nested intercepts

From: Joerg Roedel
Date: Wed Jul 29 2009 - 09:53:18 EST


On Wed, Jul 29, 2009 at 03:50:39PM +0200, Alexander Graf wrote:
> Joerg Roedel wrote:
> > Signed-off-by: Joerg Roedel <joerg.roedel@xxxxxxx>
> > ---
> > 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


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/