summaryrefslogtreecommitdiff
path: root/arch/arm64/kvm/hyp/vhe/sysreg-sr.c
diff options
context:
space:
mode:
authorFuad Tabba <tabba@google.com>2021-08-17 11:11:25 +0300
committerMarc Zyngier <maz@kernel.org>2021-08-20 13:12:17 +0300
commit1460b4b25fde52cbee746c11a4b1d3185f2e2847 (patch)
tree136a126e1827173d15a76b6e8a9ab2052410e427 /arch/arm64/kvm/hyp/vhe/sysreg-sr.c
parentf76f89e2f73d93720cfcad7fb7b24d022b2846bf (diff)
downloadlinux-1460b4b25fde52cbee746c11a4b1d3185f2e2847.tar.xz
KVM: arm64: Restore mdcr_el2 from vcpu
On deactivating traps, restore the value of mdcr_el2 from the newly created and preserved host value vcpu context, rather than directly reading the hardware register. Up until and including this patch the two values are the same, i.e., the hardware register and the vcpu one. A future patch will be changing the value of mdcr_el2 on activating traps, and this ensures that its value will be restored. No functional change intended. Signed-off-by: Fuad Tabba <tabba@google.com> Acked-by: Will Deacon <will@kernel.org> Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20210817081134.2918285-7-tabba@google.com
Diffstat (limited to 'arch/arm64/kvm/hyp/vhe/sysreg-sr.c')
-rw-r--r--arch/arm64/kvm/hyp/vhe/sysreg-sr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/arm64/kvm/hyp/vhe/sysreg-sr.c b/arch/arm64/kvm/hyp/vhe/sysreg-sr.c
index 2a0b8c88d74f..007a12dd4351 100644
--- a/arch/arm64/kvm/hyp/vhe/sysreg-sr.c
+++ b/arch/arm64/kvm/hyp/vhe/sysreg-sr.c
@@ -101,7 +101,7 @@ void kvm_vcpu_put_sysregs_vhe(struct kvm_vcpu *vcpu)
struct kvm_cpu_context *host_ctxt;
host_ctxt = &this_cpu_ptr(&kvm_host_data)->host_ctxt;
- deactivate_traps_vhe_put();
+ deactivate_traps_vhe_put(vcpu);
__sysreg_save_el1_state(guest_ctxt);
__sysreg_save_user_state(guest_ctxt);