KVM: arm64: Check HCR_EL2 instead of shadow copy to swap PtrAuth registers
authorMarc Zyngier <maz@kernel.org>
Thu, 11 Jun 2020 10:26:09 +0000 (11:26 +0100)
committerMarc Zyngier <maz@kernel.org>
Mon, 22 Jun 2020 10:42:50 +0000 (11:42 +0100)
commit655169cec7bbf84f59faa9f824edb581eaecf78d
tree72b27ddd35ec6af993fd0b57069238720e3320be
parentaff7cce0d337f5468470d614ef83a507dcf4c93f
KVM: arm64: Check HCR_EL2 instead of shadow copy to swap PtrAuth registers

When save/restoring PtrAuth registers between host and guest, it is
pretty useless to fetch the in-memory state, while we have the right
state in the HCR_EL2 system register. Use that instead.

Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
arch/arm64/include/asm/kvm_ptrauth.h