[PATCH 0/4] KVM: arm64: Userspace GICv3 sysreg access fixes and testing

Marc Zyngier maz at kernel.org
Fri Jul 18 04:11:50 PDT 2025


As a follow-up to my earlier series at [1], here's a small set of
fixes to address an annoying bug that made ICH_HCR_EL2 unreachable
from userspace -- not something you'd expect.

So the first patch fixes the ordering the the sysreg table, which had
ICH_HCR_EL2 at the wrong spot. The next two ensure that we now check
for the table to be sorted (just like all the other tables). Finally,
the last patch augments the vgic_init selftest to actually check that
we can access these registers

[1] https://lore.kernel.org/r/20250714122634.3334816-1-maz@kernel.org

Marc Zyngier (4):
  KVM: arm64: vgic-v3: Fix ordering of ICH_HCR_EL2
  KVM: arm64: Clarify the check for reset callback in
    check_sysreg_table()
  KVM: arm64: Enforce the sorting of the GICv3 system register table
  KVM: arm64: selftest: vgic-v3: Add basic GICv3 sysreg userspace access
    test

 arch/arm64/kvm/sys_regs.c                     |  20 +-
 arch/arm64/kvm/vgic-sys-reg-v3.c              |   8 +-
 arch/arm64/kvm/vgic/vgic.h                    |   1 +
 tools/testing/selftests/kvm/arm64/vgic_init.c | 219 +++++++++++++++++-
 4 files changed, 237 insertions(+), 11 deletions(-)

-- 
2.39.2




More information about the linux-arm-kernel mailing list