]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86/vPMU: Forbid reading from MSR_F15H_PERF MSRs when guest doesn't have X86_FEA...
authorVitaly Kuznetsov <vkuznets@redhat.com>
Mon, 29 Mar 2021 12:48:04 +0000 (14:48 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Sat, 17 Apr 2021 12:30:53 +0000 (08:30 -0400)
commit974f00ed1b5c014fe53a00f8690eb87d64063785
treefdbb61a5e6432e7bd4654bed899b09e9003fe72b
parent211daf357ffbb6de04e6f053d46f706d3b76ed5b
KVM: x86/vPMU: Forbid reading from MSR_F15H_PERF MSRs when guest doesn't have X86_FEATURE_PERFCTR_CORE

MSR_F15H_PERF_CTL0-5, MSR_F15H_PERF_CTR0-5 MSRs have a CPUID bit assigned
to them (X86_FEATURE_PERFCTR_CORE) and when it wasn't exposed to the guest
the correct behavior is to inject #GP an not just return zero.

Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Message-Id: <20210329124804.170173-1-vkuznets@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/x86.c