]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm64: Restore mdcr_el2 from vcpu
authorFuad Tabba <tabba@google.com>
Tue, 17 Aug 2021 08:11:25 +0000 (09:11 +0100)
committerMarc Zyngier <maz@kernel.org>
Fri, 20 Aug 2021 10:12:17 +0000 (11:12 +0100)
commit7c7198b2b4b47b480773ef2251d5af8fd79e1f37
tree136a126e1827173d15a76b6e8a9ab2052410e427
parent3b8383f006f1ec9874f649e4992f54c0d2ce025c
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
arch/arm64/include/asm/kvm_host.h
arch/arm64/include/asm/kvm_hyp.h
arch/arm64/kvm/hyp/include/hyp/switch.h
arch/arm64/kvm/hyp/nvhe/switch.c
arch/arm64/kvm/hyp/vhe/switch.c
arch/arm64/kvm/hyp/vhe/sysreg-sr.c