]> www.infradead.org Git - nvme.git/commit
KVM: arm64: Make TCR2_EL1 save/restore dependent on the VM features
authorMarc Zyngier <maz@kernel.org>
Tue, 25 Jun 2024 13:00:39 +0000 (14:00 +0100)
committerOliver Upton <oliver.upton@linux.dev>
Thu, 27 Jun 2024 00:04:25 +0000 (00:04 +0000)
commit1b04fd40275e09c2062e125593e7d2b0b9f87b0a
tree2764c8f9004ad0e65e1f788d721f02d78c278d74
parenta3ee9ce88ba3adc0a9bcb77dd40eca6aff3cef28
KVM: arm64: Make TCR2_EL1 save/restore dependent on the VM features

As for other registers, save/restore of TCR2_EL1 should be gated
on the feature being actually present.

In the case of a nVHE hypervisor, it is perfectly fine to leave
the host value in the register, as HCRX_EL2.TCREn==0 imposes that
TCR2_EL1 is treated as 0.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20240625130042.259175-4-maz@kernel.org
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
arch/arm64/kvm/hyp/include/hyp/sysreg-sr.h