summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/cpuid.c
diff options
context:
space:
mode:
authorMarcelo Tosatti <mtosatti@redhat.com>2014-09-18 18:24:57 -0300
committerPaolo Bonzini <pbonzini@redhat.com>2014-09-24 14:07:50 +0200
commitbc6134942dbbf31c25e9bd7c876be5da81c9e1ce (patch)
tree883797ada98b8affc79b9dc9752b86c6e1aad3ac /arch/x86/kvm/cpuid.c
parenta2b9e6c1a35afcc0973acb72e591c714e78885ff (diff)
downloadlinux-bc6134942dbbf31c25e9bd7c876be5da81c9e1ce.tar.gz
linux-bc6134942dbbf31c25e9bd7c876be5da81c9e1ce.tar.xz
KVM: nested VMX: disable perf cpuid reporting
Initilization of L2 guest with -cpu host, on L1 guest with -cpu host triggers: (qemu) KVM: entry failed, hardware error 0x7 ... nested_vmx_run: VMCS MSR_{LOAD,STORE} unsupported Nested VMX MSR load/store support is not sufficient to allow perf for L2 guest. Until properly fixed, trap CPUID and disable function 0xA. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/cpuid.c')
-rw-r--r--arch/x86/kvm/cpuid.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
index e28d798f7277..976e3a57f9ea 100644
--- a/arch/x86/kvm/cpuid.c
+++ b/arch/x86/kvm/cpuid.c
@@ -774,6 +774,12 @@ void kvm_cpuid(struct kvm_vcpu *vcpu, u32 *eax, u32 *ebx, u32 *ecx, u32 *edx)
if (!best)
best = check_cpuid_limit(vcpu, function, index);
+ /*
+ * Perfmon not yet supported for L2 guest.
+ */
+ if (is_guest_mode(vcpu) && function == 0xa)
+ best = NULL;
+
if (best) {
*eax = best->eax;
*ebx = best->ebx;