]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: nVMX: track NMI blocking state separately for each VMCS
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 14 Jul 2017 11:36:11 +0000 (13:36 +0200)
committerKrish Sadhukhan <krish.sadhukhan@oracle.com>
Thu, 2 Nov 2017 17:30:25 +0000 (13:30 -0400)
commitf8aa4a6a0426635a4f46c158ed3cea485b508a28
tree8938eebd23f4e077eadb0b63adb42baccfbe8ad3
parent8e880397202ca8348a2f09272d836140981ff336
KVM: nVMX: track NMI blocking state separately for each VMCS

vmx_recover_nmi_blocking is using a cached value of the guest
interruptibility info, which is stored in vmx->nmi_known_unmasked.
vmx_recover_nmi_blocking is run for both normal and nested guests,
so the cached value must be per-VMCS.

This fixes eventinj.flat in a nested non-EPT environment.  With EPT it
works, because the EPT violation handler doesn't have the
vmx->nmi_known_unmasked optimization (it is unnecessary because, unlike
vmx_recover_nmi_blocking, it can just look at the exit qualification).

Thanks to Wanpeng Li for debugging the testcase and providing an initial
patch.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Radim Krčmář <rkrcmar@redhat.com>
(cherry picked from commit 4c4a6f790ee862ee9f0dc8b35c71f55bcf792b71)
OraBug: 27031246 nested virt: L2 windows guest reboot hangs with L1 KVM hypervisor
Signed-off-by: Liran Alon <liran.alon@oracle.com>
Signed-off-by: Krish Sadhukhan <krish.sadhukhan@oracle.com>
Tested-by: Xuan Bai <xuan.bai@oracle.com>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
arch/x86/kvm/vmx.c