summaryrefslogtreecommitdiff
path: root/arch/arm64/kvm/pmu.c
diff options
context:
space:
mode:
authorMarc Zyngier <maz@kernel.org>2024-03-01 14:16:56 +0300
committerMarc Zyngier <maz@kernel.org>2024-04-12 15:57:30 +0300
commit87f842c6c6543cf0dd66161fdf4b62cec804479b (patch)
tree072f7284996f7dbd2f86205c908baf8aae53dd09 /arch/arm64/kvm/pmu.c
parent4cece764965020c22cff7665b18a012006359095 (diff)
downloadlinux-87f842c6c6543cf0dd66161fdf4b62cec804479b.tar.xz
KVM: arm64: Add accessor for per-CPU state
In order to facilitate the introduction of new per-CPU state, add a new host_data_ptr() helped that hides some of the per-CPU verbosity, and make it easier to move that state around in the future. Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com> Signed-off-by: Marc Zyngier <maz@kernel.org>
Diffstat (limited to 'arch/arm64/kvm/pmu.c')
-rw-r--r--arch/arm64/kvm/pmu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/kvm/pmu.c b/arch/arm64/kvm/pmu.c
index a243934c5568..329819806096 100644
--- a/arch/arm64/kvm/pmu.c
+++ b/arch/arm64/kvm/pmu.c
@@ -232,7 +232,7 @@ bool kvm_set_pmuserenr(u64 val)
if (!vcpu || !vcpu_get_flag(vcpu, PMUSERENR_ON_CPU))
return false;
- hctxt = &this_cpu_ptr(&kvm_host_data)->host_ctxt;
+ hctxt = host_data_ptr(host_ctxt);
ctxt_sys_reg(hctxt, PMUSERENR_EL0) = val;
return true;
}