]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm64: Pass pmu events to hyp via vcpu
authorFuad Tabba <tabba@google.com>
Tue, 10 May 2022 09:57:09 +0000 (09:57 +0000)
committerMarc Zyngier <maz@kernel.org>
Sun, 15 May 2022 10:26:41 +0000 (11:26 +0100)
commit23d05a936913d46aea27b300582f67eb49d1a620
tree45c30035eb85762da5cf6b98ab2a4f339e059992
parent6b26ebc22294729b3145125d284fe6592fd24d48
KVM: arm64: Pass pmu events to hyp via vcpu

Instead of the host accessing hyp data directly, pass the pmu
events of the current cpu to hyp via the vcpu.

This adds 64 bits (in two fields) to the vcpu that need to be
synced before every vcpu run in nvhe and protected modes.
However, it isolates the hypervisor from the host, which allows
us to use pmu in protected mode in a subsequent patch.

No visible side effects in behavior intended.

Signed-off-by: Fuad Tabba <tabba@google.com>
Reviewed-by: Oliver Upton <oupton@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20220510095710.148178-4-tabba@google.com
arch/arm64/include/asm/kvm_host.h
arch/arm64/kvm/arm.c
arch/arm64/kvm/hyp/nvhe/switch.c
arch/arm64/kvm/pmu.c
include/kvm/arm_pmu.h