]> git.baikalelectronics.ru Git - kernel.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)
committerRadim Krčmář <rkrcmar@redhat.com>
Wed, 19 Jul 2017 14:05:41 +0000 (16:05 +0200)
commitd5fc5efc61105014a8d2d9ffd9dfcd3769775c56
tree827f8e6a071255cb2a82645d4adf84691631d64c
parentd84414be5349ec0a07a65c995f76ca1068314766
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>
arch/x86/kvm/vmx.c