aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/kvm/arm64/hello_el2.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2025-09-24KVM: arm64: selftests: Cope with arch silliness in EL2 selftestOliver Upton1-2/+15
Implementations without FEAT_FGT aren't required to trap the entire ID register space when HCR_EL2.TID3 is set. This is a terrible idea, as the hypervisor may need to advertise the absence of a feature to the VM using a negative value in a signed field, FEAT_E2H0 being a great example of this. Cope with uncooperative implementations in the EL2 selftest by accepting a zero value when FEAT_FGT is absent and otherwise only tolerating the expected nonzero value. Signed-off-by: Oliver Upton <oliver.upton@linux.dev> Signed-off-by: Marc Zyngier <maz@kernel.org>
2025-09-24KVM: arm64: selftests: Add basic test for running in VHE EL2Oliver Upton1-0/+58
Add an embarrassingly simple selftest for sanity checking KVM's VHE EL2 and test that the ID register bits are consistent with HCR_EL2.E2H being RES1. Signed-off-by: Oliver Upton <oliver.upton@linux.dev> Signed-off-by: Marc Zyngier <maz@kernel.org>