mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
KVM: X86: Provide a capability to disable HLT intercepts
If host CPUs are dedicated to a VM, we can avoid VM exits on HLT. This patch adds the per-VM capability to disable them. Cc: Paolo Bonzini <[email protected]> Cc: Radim Krčmář <[email protected]> Cc: Jan H. Schönherr <[email protected]> Signed-off-by: Wanpeng Li <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
This commit is contained in:
parent
4d5422cea3
commit
caa057a2ca
7 changed files with 46 additions and 2 deletions
|
|
@ -4367,6 +4367,7 @@ Returns: 0 on success, -EINVAL when args[0] contains invalid exits
|
|||
Valid bits in args[0] are
|
||||
|
||||
#define KVM_X86_DISABLE_EXITS_MWAIT (1 << 0)
|
||||
#define KVM_X86_DISABLE_EXITS_HLT (1 << 1)
|
||||
|
||||
Enabling this capability on a VM provides userspace with a way to no
|
||||
longer intercept some instructions for improved latency in some
|
||||
|
|
@ -4375,6 +4376,7 @@ physical CPUs. More bits can be added in the future; userspace can
|
|||
just pass the KVM_CHECK_EXTENSION result to KVM_ENABLE_CAP to disable
|
||||
all such vmexits.
|
||||
|
||||
Do not enable KVM_FEATURE_PV_UNHALT if you disable HLT exits.
|
||||
|
||||
8. Other capabilities.
|
||||
----------------------
|
||||
|
|
|
|||
Loading…
Reference in a new issue