KVM: X86: Provide a capability to disable MWAIT intercepts
authorWanpeng Li <wanpengli@tencent.com>
Mon, 12 Mar 2018 11:53:02 +0000 (04:53 -0700)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 16 Mar 2018 21:03:51 +0000 (22:03 +0100)
commit4d5422cea3b61f158d58924cbb43feada456ba5c
tree0657ac655c54892dd6498d8e20b89380255d592a
parent4956aa3b8b59e336b77f1df0ac7ce1a94c0265f2
KVM: X86: Provide a capability to disable MWAIT intercepts

Allowing a guest to execute MWAIT without interception enables a guest
to put a (physical) CPU into a power saving state, where it takes
longer to return from than what may be desired by the host.

Don't give a guest that power over a host by default. (Especially,
since nothing prevents a guest from using MWAIT even when it is not
advertised via CPUID.)

Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Radim Krčmář <rkrcmar@redhat.com>
Cc: Jan H. Schönherr <jschoenh@amazon.de>
Signed-off-by: Wanpeng Li <wanpengli@tencent.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Documentation/virtual/kvm/api.txt
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/svm.c
arch/x86/kvm/vmx.c
arch/x86/kvm/x86.c
arch/x86/kvm/x86.h
include/uapi/linux/kvm.h
tools/include/uapi/linux/kvm.h