| #
afb4334f |
| 29-Sep-2026 |
Fuad Tabba <fuad.tabba@linux.dev> |
KVM: arm64: selftests: Check a feature hidden in an ID register is UNDEF
Userspace can hide a feature from a guest by clearing its field in a writable ID register, and KVM then makes the feature's i
KVM: arm64: selftests: Check a feature hidden in an ID register is UNDEF
Userspace can hide a feature from a guest by clearing its field in a writable ID register, and KVM then makes the feature's instructions UNDEFINED in the guest by trapping or disabling them. No selftest checks that.
Add a test that runs the instruction of each of TLBI OS, MOPS, TCR2_EL1 and FPMR once with its field as advertised and once with it cleared, and expects an UNDEF only when cleared. A feature the vCPU doesn't advertise is skipped, as is hidden TLBI OS on a CPU with neither FGT nor FEAT_EVT2, where KVM can't trap it.
Signed-off-by: Fuad Tabba <fuad.tabba@linux.dev> Link: https://patch.msgid.link/20260929090031.3829185-5-fuad.tabba@linux.dev Signed-off-by: Oliver Upton <oupton@kernel.org>
show more ...
|