]> www.infradead.org Git - users/jedix/linux-maple.git/commit
kvm: vmx: Reinstate support for CPUs without virtual NMI
authorPaolo Bonzini <pbonzini@redhat.com>
Mon, 6 Nov 2017 12:31:12 +0000 (13:31 +0100)
committerBrian Maly <brian.maly@oracle.com>
Mon, 4 Jun 2018 18:02:55 +0000 (14:02 -0400)
commite8a9aeda5c22e0f8df84ba215701e7741e9fd3b4
treec61463e0c5d54d528dd191e00b7d4000a479c437
parent7155650c254698c4187149bfb1d4e347ce3945f0
kvm: vmx: Reinstate support for CPUs without virtual NMI

[ Upstream commit 8a1b43922d0d1279e7936ba85c4c2a870403c95f ]

This is more or less a revert of commit 2c82878b0cb3 ("KVM: VMX: require
virtual NMI support", 2017-03-27); it turns out that Core 2 Duo machines
only had virtual NMIs in some SKUs.

The revert is not trivial because in the meanwhile there have been several
fixes to nested NMI injection.  Therefore, the entire vNMI state is moved
to struct loaded_vmcs.

Another change compared to before the patch is a simplification here:

       if (unlikely(!cpu_has_virtual_nmis() && vmx->soft_vnmi_blocked &&
           !(is_guest_mode(vcpu) && nested_cpu_has_virtual_nmis(
                                       get_vmcs12(vcpu))))) {

The final condition here is always true (because nested_cpu_has_virtual_nmis
is always false) and is removed.

Fixes: 2c82878b0cb38fd516fd612c67852a6bbf282003
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1490803
Cc: stable@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
(cherry picked from commit 8a1b43922d0d1279e7936ba85c4c2a870403c95f)

Orabug: 28041210

Signed-off-by: Alejandro Jimenez <alejandro.j.jimenez@oracle.com>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Reviewed-by: Krish Sadhukhan <krish.sadhukhan@oracle.com>
Signed-off-by: Brian Maly <brian.maly@oracle.com>
Conflicts:
arch/x86/kvm/vmx.c

Conflicts are due to the fact that a large number of patches affecting this
area of the code have not been ported to UEK4-QU7. Portions of the
cherry-picked patch had to be manually inserted in the correct places, but
no logical changes were required.

Signed-off-by: Brian Maly <brian.maly@oracle.com>
arch/x86/kvm/vmx.c