OSDN Git Service

KVM: selftests: arm64: Rework TCR_EL1 configuration
authorMarc Zyngier <maz@kernel.org>
Mon, 27 Dec 2021 12:48:07 +0000 (12:48 +0000)
committerMarc Zyngier <maz@kernel.org>
Tue, 28 Dec 2021 11:04:20 +0000 (11:04 +0000)
commit2f41a61c54fb6410202b2cc08be80ae9554d599d
tree6eb0db1d347ab0f6ae658133d51063646f18cbb1
parent0303ffdb9ecffac4654b16bbf69ba84d131eb8b7
KVM: selftests: arm64: Rework TCR_EL1 configuration

The current way we initialise TCR_EL1 is a bit cumbersome, as
we mix setting TG0 and IPS in the same swtch statement.

Split it into two statements (one for the base granule size, and
another for the IPA size), allowing new modes to be added in a
more elegant way.

No functional change intended.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Link: https://lore.kernel.org/r/20211227124809.1335409-5-maz@kernel.org
tools/testing/selftests/kvm/lib/aarch64/processor.c