]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: move MSR_IA32_PERF_CAPABILITIES emulation to common x86 code
authorVitaly Kuznetsov <vkuznets@redhat.com>
Fri, 10 Jul 2020 15:25:59 +0000 (17:25 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 10 Jul 2020 16:52:56 +0000 (12:52 -0400)
commitc956057a6e48cc0b5a26cc2e37bc90897681ed1d
treeec1c8cd6d9dbb84389e71100c62e89ee2733df07
parent6a4acbb644095b9c99c11b81566cc0f90a6fc5a4
KVM: x86: move MSR_IA32_PERF_CAPABILITIES emulation to common x86 code

state_test/smm_test selftests are failing on AMD with:
"Unexpected result from KVM_GET_MSRS, r: 51 (failed MSR was 0x345)"

MSR_IA32_PERF_CAPABILITIES is an emulated MSR on Intel but it is not
known to AMD code, we can move the emulation to common x86 code. For
AMD, we basically just allow the host to read and write zero to the MSR.

Fixes: 7deab83b07f0 ("KVM: x86/pmu: Support full width counting")
Suggested-by: Jim Mattson <jmattson@google.com>
Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Message-Id: <20200710152559.1645827-1-vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/svm/svm.c
arch/x86/kvm/vmx/pmu_intel.c
arch/x86/kvm/x86.c