Re: [PATCH 2/5] Nested VMX patch 2 implements vmclear

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Avi Kivity <avi@xxxxxxxxxx> wrote on 20/10/2009 06:06:40:

> From:
>
> Avi Kivity <avi@xxxxxxxxxx>
>
> To:
>
> Orit Wasserman/Haifa/IBM@IBMIL
>
> Cc:
>
> kvm@xxxxxxxxxxxxxxx, Ben-Ami Yassour1/Haifa/IBM@IBMIL, Abel Gordon/
> Haifa/IBM@IBMIL, Muli Ben-Yehuda/Haifa/IBM@IBMIL,
> aliguori@xxxxxxxxxx, mdday@xxxxxxxxxx
>
> Date:
>
> 20/10/2009 06:06
>
> Subject:
>
> Re: [PATCH 2/5] Nested VMX patch 2 implements vmclear
>
> On 10/15/2009 11:41 PM, oritw@xxxxxxxxxx wrote:
> > From: Orit Wasserman<oritw@xxxxxxxxxx>
> >
> > ---
> >   arch/x86/kvm/vmx.c |   70 ++++++++++++++++++++++++++++++++++++++
> ++++++++++---
> >   1 files changed, 65 insertions(+), 5 deletions(-)
> >
> > diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
> > index 71bd91a..411cbdb 100644
> > --- a/arch/x86/kvm/vmx.c
> > +++ b/arch/x86/kvm/vmx.c
> > @@ -61,15 +61,26 @@ module_param_named(unrestricted_guest,
> >   static int __read_mostly emulate_invalid_guest_state = 0;
> >   module_param(emulate_invalid_guest_state, bool, S_IRUGO);
> >
> > -struct vmcs {
> > -   u32 revision_id;
> > -   u32 abort;
> > -   char data[0];
> > +struct __attribute__ ((__packed__)) level_state {
> > +   /* Has the level1 guest done vmclear? */
> > +   bool vmclear;
> >   };
> >
>
> Why __packed__?
I will remove it.
>
> >
> >   struct nested_vmx {
> >      /* Has the level1 guest done vmxon? */
> >      bool vmxon;
> > +
> > +   /*
> > +    * Level 2 state : includes vmcs,registers and
> > +    * a copy of vmcs12 for vmread/vmwrite
> > +    */
> > +   struct level_state *l2_state;
> > +};
> > +
> > +struct vmcs {
> > +   u32 revision_id;
> > +   u32 abort;
> > +   char data[0];
> >   };
> >
>
> Why move struct vmcs around?
I will fix it.
>
> > +
> >   static int handle_vmoff(struct kvm_vcpu *vcpu)
> >   {
> >      struct vcpu_vmx *vmx = to_vmx(vcpu);
> > @@ -3310,6 +3368,8 @@ static int handle_vmon(struct kvm_vcpu *vcpu)
> >
> >      vmx->nested.vmxon = 1;
> >
> > +   create_l2_state(vcpu);
> > +
> >
>
> Need to check return code.
I will add the check.
>
>
> --
> I have a truly marvellous patch that fixes the bug which this
> signature is too narrow to contain.
>

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux