KVM: arm64: Restructure FGT register switching
authorMarc Zyngier <maz@kernel.org>
Tue, 15 Aug 2023 18:38:47 +0000 (19:38 +0100)
committerMarc Zyngier <maz@kernel.org>
Thu, 17 Aug 2023 09:00:27 +0000 (10:00 +0100)
commite930694e6145eb210c9931914a7801cc61016a82
tree4bdeee3024caa9d5cdb40ae1eb4c99acf1816643
parent50d2fe4648c50e7d33fa576f6b078f22ad973670
KVM: arm64: Restructure FGT register switching

As we're about to majorly extend the handling of FGT registers,
restructure the code to actually save/restore the registers
as required. This is made easy thanks to the previous addition
of the EL2 registers, allowing us to use the host context for
this purpose.

Reviewed-by: Eric Auger <eric.auger@redhat.com>
Reviewed-by: Oliver Upton <oliver.upton@linux.dev>
Reviewed-by: Miguel Luis <miguel.luis@oracle.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20230815183903.2735724-14-maz@kernel.org
arch/arm64/include/asm/kvm_arm.h
arch/arm64/kvm/hyp/include/hyp/switch.h