mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
Revert "KVM: nested VMX: disable perf cpuid reporting"
commit0b4c208d44upstream. This reverts commitbc6134942d. A CPUID instruction executed in VMX non-root mode always causes a VM-exit, regardless of the leaf being queried. Fixes:bc6134942d("KVM: nested VMX: disable perf cpuid reporting") Signed-off-by: Jim Mattson <jmattson@google.com> [The issue solved bybc6134942dhas been resolved withff651cb613("KVM: nVMX: Add nested msr load/restore algorithm").] Signed-off-by: Radim Krčmář <rkrcmar@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
b6cd52a0ee
commit
39058adebb
@@ -846,12 +846,6 @@ 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;
|
||||
|
||||
@@ -8051,8 +8051,6 @@ static bool nested_vmx_exit_handled(struct kvm_vcpu *vcpu)
|
||||
case EXIT_REASON_TASK_SWITCH:
|
||||
return true;
|
||||
case EXIT_REASON_CPUID:
|
||||
if (kvm_register_read(vcpu, VCPU_REGS_RAX) == 0xa)
|
||||
return false;
|
||||
return true;
|
||||
case EXIT_REASON_HLT:
|
||||
return nested_cpu_has(vmcs12, CPU_BASED_HLT_EXITING);
|
||||
|
||||
Reference in New Issue
Block a user