diff options
author | Andrew Scull <ascull@google.com> | 2020-09-15 11:46:29 +0100 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2020-09-15 18:39:02 +0100 |
commit | a0e479523e3fb4fa52c351cc4906f38097de789a (patch) | |
tree | 86b3fcf0c984652765e85c0ca027c6cdcfeae2e8 /arch/arm64/kvm/hyp/vhe | |
parent | ceee2fe4ba1f0b9dd388fd1030bea0162ca66a40 (diff) | |
download | linux-a0e479523e3fb4fa52c351cc4906f38097de789a.tar.bz2 |
KVM: arm64: Save chosen hyp vector to a percpu variable
Introduce a percpu variable to hold the address of the selected hyp
vector that will be used with guests. This avoids the selection process
each time a guest is being entered and can be used by nVHE when a
separate vector is introduced for the host.
Signed-off-by: Andrew Scull <ascull@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20200915104643.2543892-6-ascull@google.com
Diffstat (limited to 'arch/arm64/kvm/hyp/vhe')
-rw-r--r-- | arch/arm64/kvm/hyp/vhe/switch.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/kvm/hyp/vhe/switch.c b/arch/arm64/kvm/hyp/vhe/switch.c index c1fd47557713..b49cf53c11f0 100644 --- a/arch/arm64/kvm/hyp/vhe/switch.c +++ b/arch/arm64/kvm/hyp/vhe/switch.c @@ -59,7 +59,7 @@ static void __activate_traps(struct kvm_vcpu *vcpu) write_sysreg(val, cpacr_el1); - write_sysreg(kvm_get_hyp_vector(), vbar_el1); + write_sysreg(__this_cpu_read(kvm_hyp_vector), vbar_el1); } NOKPROBE_SYMBOL(__activate_traps); |