[PATCH] KVM: arm64: selftests: Check ID regs are immutable after a failed run

Fuad Tabba fuad.tabba at linux.dev
Tue Aug 4 10:54:43 PDT 2026


On Tue, 4 Aug 2026 at 17:14, Mark Brown <broonie at kernel.org> wrote:
>
> On Tue, Aug 04, 2026 at 10:24:21AM +0100, Fuad Tabba wrote:
> > Add a set_id_regs case covering ID register immutability when a vCPU's
> > first KVM_RUN fails after finalization but before
> > KVM_ARCH_FLAG_HAS_RAN_ONCE is set. The test provokes such a failure with
> > a PMUv3-enabled vCPU whose PMU is left uninitialized, then checks that
> > KVM_SET_ONE_REG on an ID register and KVM_CREATE_DEVICE for a vGIC are
> > both rejected with -EBUSY.
>
> > +     for (int i = 0; i < ARRAY_SIZE(test_regs) && !found; i++) {
> > +             const struct reg_ftr_bits *ftr_bits = test_regs[i].ftr_bits;
> > +
> > +             reg = KVM_ARM64_SYS_REG(test_regs[i].reg);
> > +             val = vcpu_get_reg(vcpu, reg);
>
> If we're doing a focused test for the specific issue there's the VM ID
> registers as well as the general ID registers and adding an irqchip.

Sure, I'll expand it and send something out tomorrow.

Cheers,
/fuad



More information about the linux-arm-kernel mailing list