> From: Nadav Har'El [mailto:n...@math.technion.ac.il]
> Sent: Wednesday, May 25, 2011 1:38 PM
> 
> On Wed, May 25, 2011, Tian, Kevin wrote about "RE: [PATCH 21/31] nVMX:
> vmcs12 checks on nested entry":
> > > + if (vmcs12->launch_state == launch) {
> > > +         nested_vmx_failValid(vcpu,
> > > +                 launch ? VMXERR_VMLAUNCH_NONCLEAR_VMCS
> > > +                        : VMXERR_VMRESUME_NONLAUNCHED_VMCS);
> > > +         return 1;
> > > + }
> >
> > from SDM:
> >     ELSIF (VMLAUNCH and launch state of current VMCS is not "clear")
> >             THEN VMfailValid(VMLAUNCH with non-clear VMCS);
> >     ELSIF (VMRESUME and launch state of current VMCS is not "launched")
> >             THEN VMfailValid(VMRESUME with non-launched VMCS);
> >
> > So it's legal to use VMLAUNCH on a launched VMCS. However here you
> > changes this behavior. On the other hand, do you want to add a 'clear' state
> > along with L1 VMCLEAR to catch the failure here?
> 
> I don't understand: I always understood the spec to mean that "clear" and
> "launched" the two opposite states of the "launch state" bit? If it isn't,
> what does "clear" mean?
> 
> Is it really "legal to use a VMLAUNCH on a launched VMCS"?
> If it is, why does KVM, for example, go to great lengths to VMLAUNCH the
> first time, and VMRESUME all subsequent times?
> 

You're correct. I've got my head messed on this point. :-)

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

Reply via email to