mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-27 12:57:53 +00:00
KVM: arm64: Fix host-programmed guest events in nVHE
commite89c928bed
upstream. Programming PMU events in the host that count during guest execution is a feature supported by perf, e.g. perf stat -e cpu_cycles:G ./lkvm run While this works for VHE, the guest/host event bitmaps are not carried through to the hypervisor in the nVHE configuration. Make kvm_pmu_update_vcpu_events() conditional on whether or not _hardware_ supports PMUv3 rather than if the vCPU as vPMU enabled. Cc: stable@vger.kernel.org Fixes:84d751a019
("KVM: arm64: Pass pmu events to hyp via vcpu") Reviewed-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20240305184840.636212-3-oliver.upton@linux.dev Signed-off-by: Oliver Upton <oliver.upton@linux.dev> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
651bf5b1d0
commit
9e2af26c29
1 changed files with 1 additions and 1 deletions
|
@ -86,7 +86,7 @@ void kvm_vcpu_pmu_resync_el0(void);
|
||||||
*/
|
*/
|
||||||
#define kvm_pmu_update_vcpu_events(vcpu) \
|
#define kvm_pmu_update_vcpu_events(vcpu) \
|
||||||
do { \
|
do { \
|
||||||
if (!has_vhe() && kvm_vcpu_has_pmu(vcpu)) \
|
if (!has_vhe() && kvm_arm_support_pmu_v3()) \
|
||||||
vcpu->arch.pmu.events = *kvm_get_pmu_events(); \
|
vcpu->arch.pmu.events = *kvm_get_pmu_events(); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue