]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: vmx: Introduce handle_unexpected_vmexit and handle WAITPKG vmexit
authorTao Xu <tao3.xu@intel.com>
Tue, 16 Jul 2019 06:55:51 +0000 (14:55 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 24 Sep 2019 12:34:51 +0000 (14:34 +0200)
commit547fab3774b14f284005214a5c5c1f41de3add0f
tree361cb0d777e81fc8d613146a72aa74f796f100e0
parent182ea64b18555891d984f97c3a5748e6f1f4e062
KVM: vmx: Introduce handle_unexpected_vmexit and handle WAITPKG vmexit

As the latest Intel 64 and IA-32 Architectures Software Developer's
Manual, UMWAIT and TPAUSE instructions cause a VM exit if the
RDTSC exiting and enable user wait and pause VM-execution
controls are both 1.

Because KVM never enable RDTSC exiting, the vm-exit for UMWAIT and TPAUSE
should never happen. Considering EXIT_REASON_XSAVES and
EXIT_REASON_XRSTORS is also unexpected VM-exit for KVM. Introduce a common
exit helper handle_unexpected_vmexit() to handle these unexpected VM-exit.

Suggested-by: Sean Christopherson <sean.j.christopherson@intel.com>
Co-developed-by: Jingqi Liu <jingqi.liu@intel.com>
Signed-off-by: Jingqi Liu <jingqi.liu@intel.com>
Signed-off-by: Tao Xu <tao3.xu@intel.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/include/uapi/asm/vmx.h
arch/x86/kvm/vmx/nested.c
arch/x86/kvm/vmx/vmx.c