Re: [PATCH 1/2] kvm: nVMX: NMI-window exiting should wake L2 from HLT

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

 



On Mon, Nov 26, 2018 at 8:37 AM Sean Christopherson
<sean.j.christopherson@xxxxxxxxx> wrote:
>
> On Tue, Nov 20, 2018 at 04:24:57PM -0800, Jim Mattson wrote:
> > According to the SDM, "NMI-window exiting" VM-exits wake a logical
> > processor from the same inactive states as would an NMI. Specifically,
> > they wake a logical processor from the shutdown state and from the
> > states entered using the HLT and MWAIT instructions.
> >
> > Fixes: 6dfacadd5858 ("KVM: nVMX: Add support for activity state HLT")
> > Signed-off-by: Jim Mattson <jmattson@xxxxxxxxxx>
> > Reviewed-by: Peter Shier <pshier@xxxxxxxxxx>
> > ---
> >  arch/x86/kvm/vmx.c | 19 ++++++++++++++++---
> >  1 file changed, 16 insertions(+), 3 deletions(-)
> >
> > diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
> > index ccc6a01eb4f4..5f5c79e72a49 100644
> > --- a/arch/x86/kvm/vmx.c
> > +++ b/arch/x86/kvm/vmx.c
> > @@ -13421,6 +13421,17 @@ static int nested_vmx_enter_non_root_mode(struct kvm_vcpu *vcpu,
> >       return 1;
> >  }
> >
> > +static bool nested_vmx_nmi_window_exit(struct kvm_vcpu *vcpu)
> > +{
> > +     struct vmcs12 *vmcs12 = get_vmcs12(vcpu);
>
> Any reason not to pass vmcs12 directly to the function?  vcpu isn't
> used othwerwise and the call site already has and is using vmcs12.

It seemed potentially more versatile this way, but since there is only
one caller at the moment, I'll switch it to vmcs12 in v2.



[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