]> git.proxmox.com Git - mirror_ubuntu-hirsute-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)
commitd574c539c3c4d8a3f9e07c8a0785954d22a63dcb
treeec1c8cd6d9dbb84389e71100c62e89ee2733df07
parentc34b26b98caca48ec9ee981d4a89ac4f73376a3a
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: 27461da31089 ("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