]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: Raise #GP when guest vCPU do not support PMU
authorLiran Alon <liran.alon@oracle.com>
Mon, 25 Mar 2019 19:10:17 +0000 (21:10 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 16 Apr 2019 13:37:34 +0000 (15:37 +0200)
commit95c1a142bb73b06e16019d9686cd2cd309af4f0f
treef0d20fbf2e1af6a187d742b9c67b448d3cca50a3
parent4a08382aa72731408a2cfb84e08077cd38061647
KVM: x86: Raise #GP when guest vCPU do not support PMU

Before this change, reading a VMware pseduo PMC will succeed even when
PMU is not supported by guest. This can easily be seen by running
kvm-unit-test vmware_backdoors with "-cpu host,-pmu" option.

Reviewed-by: Mihai Carabas <mihai.carabas@oracle.com>
Signed-off-by: Liran Alon <liran.alon@oracle.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/pmu.c