All of lore.kernel.org
 help / color / mirror / Atom feed
* [stable-4.19] kvm: nVMX: NMI-window and interrupt-window exiting should wake L2 from HLT
@ 2019-04-06 23:43 Mark Mielke
  2019-04-08 14:01 ` Sasha Levin
  0 siblings, 1 reply; 2+ messages in thread
From: Mark Mielke @ 2019-04-06 23:43 UTC (permalink / raw)
  To: stable; +Cc: Jim Mattson

This commit was first released with 5.0:

commit 9ebdfe5230f2e50e3ba05c57723a06e90946815a
Author: Jim Mattson <jmattson@google.com>
Date:   Mon Nov 26 11:22:32 2018 -0800

    kvm: nVMX: NMI-window and interrupt-window exiting should wake L2 from HLT

    According to the SDM, "NMI-window exiting" VM-exits wake a logical
    processor from the same inactive states as would an NMI and
    "interrupt-window exiting" VM-exits wake a logical processor from the
    same inactive states as would an external interrupt. 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@google.com>
    Reviewed-by: Peter Shier <pshier@google.com>
    Suggested-by: Sean Christopherson <sean.j.christopherson@intel.com>
    [Squashed comments of two Jim's patches and used the simplified code
     hunk provided by Sean. - Radim]
    Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>

This commit does not apply clean to 4.19, only due to restructuring
that split out a portion of arch/x86/kvm/vmx.c into
arch/x86/kvm/vmx/nested.c.

The following procedure can be followed to allow the patch to apply
clean to 4.19:

git checkout linux-4.19.y
git format-patch -1 9ebdfe5230f2e50e3ba05c57723a06e90946815a
perl -pi -e 's[arch/x86/kvm/vmx/nested.c][arch/x86/kvm/vmx.c]g'
0001-kvm-nVMX-NMI-window-and-interrupt-window-exiting-sho.patch
git am 0001-kvm-nVMX-NMI-window-and-interrupt-window-exiting-sho.patch

I have been using this patch in our own 4.19-based production
environment (which heavily uses nested KVM for product simulation)
since January, 2019, along with several other nVMX patches. All of the
other nVMX patches have since made it into 4.19 except for this one. I
expect this one did not make the stable list because it did not apply
cleanly without help.

I don't have a specific test to reproduce the problem that this fix
addresses. I had specific problems that were addressed by other nVMX
patches, but this was one I chose to add as a preventative measure
based upon the description and the likelihood that the problem might
impact us.

Please consider including this patch into 4.19. I don't mind
maintaining it local if there is some reason it doesn't qualify for
stable. But, if this could help others, I'm happy to share the above
method of getting it into 4.19 safely.

Thank you!

-- 
Mark Mielke <mark.mielke@gmail.com>

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [stable-4.19] kvm: nVMX: NMI-window and interrupt-window exiting should wake L2 from HLT
  2019-04-06 23:43 [stable-4.19] kvm: nVMX: NMI-window and interrupt-window exiting should wake L2 from HLT Mark Mielke
@ 2019-04-08 14:01 ` Sasha Levin
  0 siblings, 0 replies; 2+ messages in thread
From: Sasha Levin @ 2019-04-08 14:01 UTC (permalink / raw)
  To: Mark Mielke; +Cc: stable, Jim Mattson

On Sat, Apr 06, 2019 at 07:43:45PM -0400, Mark Mielke wrote:
>This commit was first released with 5.0:
>
>commit 9ebdfe5230f2e50e3ba05c57723a06e90946815a
>Author: Jim Mattson <jmattson@google.com>
>Date:   Mon Nov 26 11:22:32 2018 -0800
>
>    kvm: nVMX: NMI-window and interrupt-window exiting should wake L2 from HLT
>
>    According to the SDM, "NMI-window exiting" VM-exits wake a logical
>    processor from the same inactive states as would an NMI and
>    "interrupt-window exiting" VM-exits wake a logical processor from the
>    same inactive states as would an external interrupt. 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@google.com>
>    Reviewed-by: Peter Shier <pshier@google.com>
>    Suggested-by: Sean Christopherson <sean.j.christopherson@intel.com>
>    [Squashed comments of two Jim's patches and used the simplified code
>     hunk provided by Sean. - Radim]
>    Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
>
>This commit does not apply clean to 4.19, only due to restructuring
>that split out a portion of arch/x86/kvm/vmx.c into
>arch/x86/kvm/vmx/nested.c.
>
>The following procedure can be followed to allow the patch to apply
>clean to 4.19:
>
>git checkout linux-4.19.y
>git format-patch -1 9ebdfe5230f2e50e3ba05c57723a06e90946815a
>perl -pi -e 's[arch/x86/kvm/vmx/nested.c][arch/x86/kvm/vmx.c]g'
>0001-kvm-nVMX-NMI-window-and-interrupt-window-exiting-sho.patch
>git am 0001-kvm-nVMX-NMI-window-and-interrupt-window-exiting-sho.patch
>
>I have been using this patch in our own 4.19-based production
>environment (which heavily uses nested KVM for product simulation)
>since January, 2019, along with several other nVMX patches. All of the
>other nVMX patches have since made it into 4.19 except for this one. I
>expect this one did not make the stable list because it did not apply
>cleanly without help.
>
>I don't have a specific test to reproduce the problem that this fix
>addresses. I had specific problems that were addressed by other nVMX
>patches, but this was one I chose to add as a preventative measure
>based upon the description and the likelihood that the problem might
>impact us.
>
>Please consider including this patch into 4.19. I don't mind
>maintaining it local if there is some reason it doesn't qualify for
>stable. But, if this could help others, I'm happy to share the above
>method of getting it into 4.19 safely.

I've queued it for 4.19, thank you.

--
Thanks,
Sasha

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-04-08 14:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-06 23:43 [stable-4.19] kvm: nVMX: NMI-window and interrupt-window exiting should wake L2 from HLT Mark Mielke
2019-04-08 14:01 ` Sasha Levin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.