[PATCH v3 0/3] KVM: arm64: ID register finalisation fixes
From: Mark Brown
Date: Tue Sep 01 2026 - 14:34:56 EST
While looking at some feature enablement I noticed that there are some
scenarios where we can end up with an inconsistently configured vCPU due
to finalizing configuration based on ID registers before we have blocked
writes to the ID registers. This series aims to clean up these issues.
Signed-off-by: Mark Brown <broonie@xxxxxxxxxx>
---
Changes in v3:
- Rebase onto v7.3-rc1.
- Explain why KVM_ARCH_FLAG_ID_REGS_INITIALIZED is not reused.
- Pull in Fuad's test cases.
- Link to v2: https://patch.msgid.link/20260803-kvm-arm64-idreg-final-v2-0-d7d7e4efc640@xxxxxxxxxx
Changes in v2:
- Also replace the kvm_vm_has_ran_once() usage in kvm_set_vm_id_rg() and
kvm_vm_finalize_sys_regs() with kvm_id_regs_final().
- Link to v1: https://patch.msgid.link/20260731-kvm-arm64-idreg-final-v1-0-3de2a5616dc6@xxxxxxxxxx
---
Fuad Tabba (1):
KVM: arm64: selftests: Check ID regs are immutable after a failed run
Mark Brown (2):
KVM: arm64: Finalize guest-wide sysregs prior to per-vCPU sysregs
KVM: arm64: Block ID register changes after we rely on the values
arch/arm64/include/asm/kvm_host.h | 8 ++
arch/arm64/kvm/arm.c | 2 +-
arch/arm64/kvm/sys_regs.c | 57 ++++++++-----
arch/arm64/kvm/sys_regs.h | 2 +-
arch/arm64/kvm/vgic/vgic-init.c | 6 +-
tools/testing/selftests/kvm/arm64/set_id_regs.c | 106 +++++++++++++++++++++++-
6 files changed, 153 insertions(+), 28 deletions(-)
---
base-commit: cee9395acd8043be0644b25c34bfa86623f2b935
change-id: 20260729-kvm-arm64-idreg-final-77cbc46b558a
Best regards,
--
Mark Brown <broonie@xxxxxxxxxx>