aboutsummaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorWanpeng Li <wanpengli@tencent.com>2019-07-15 09:28:44 +0800
committerPaolo Bonzini <pbonzini@redhat.com>2019-09-16 12:32:20 +0200
commitd38d201f0ed092b8c7f7738a5db8428e12cb04b6 (patch)
tree05aa77b8ece749fc9a27a185090c67b45d50f1fa /target
parent138985c1ef8b66e4e5b383354e133e05d01d0b5f (diff)
downloadqemu-d38d201f0ed092b8c7f7738a5db8428e12cb04b6.zip
qemu-d38d201f0ed092b8c7f7738a5db8428e12cb04b6.tar.gz
qemu-d38d201f0ed092b8c7f7738a5db8428e12cb04b6.tar.bz2
i386/kvm: support guest access CORE cstate
Allow guest reads CORE cstate when exposing host CPU power management capabilities to the guest. PKG cstate is restricted to avoid a guest to get the whole package information in multi-tenant scenario. Cc: Eduardo Habkost <ehabkost@redhat.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Radim Krčmář <rkrcmar@redhat.com> Signed-off-by: Wanpeng Li <wanpengli@tencent.com> Message-Id: <1563154124-18579-1-git-send-email-wanpengli@tencent.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target')
-rw-r--r--target/i386/kvm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/target/i386/kvm.c b/target/i386/kvm.c
index 8023c67..3435fc4 100644
--- a/target/i386/kvm.c
+++ b/target/i386/kvm.c
@@ -2076,7 +2076,8 @@ int kvm_arch_init(MachineState *ms, KVMState *s)
if (disable_exits) {
disable_exits &= (KVM_X86_DISABLE_EXITS_MWAIT |
KVM_X86_DISABLE_EXITS_HLT |
- KVM_X86_DISABLE_EXITS_PAUSE);
+ KVM_X86_DISABLE_EXITS_PAUSE |
+ KVM_X86_DISABLE_EXITS_CSTATE);
}
ret = kvm_vm_enable_cap(s, KVM_CAP_X86_DISABLE_EXITS, 0,