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

From: Fuad Tabba

Date: Mon Sep 28 2026 - 13:08:11 EST


Hi Lorenzo,

On Mon, 28 Sep 2026 15:46:51 +0100, "Lorenzo Stoakes (ARM)"
<ljs@xxxxxxxxxx> wrote:
> On Tue, Sep 01, 2026 at 07:18:50PM +0100, Mark Brown wrote:
[...]
> > Assisted-by: Antigravity:gemini-3.1-pro
>
> NIT: we changed the rules for the Assisted-by tag, it only needs to be
> 'Assisted-by: LLM' now. Not a huge big deal but FYI :>)
>
> https://docs.kernel.org/process/coding-assistants.html

That tag dates from way back when the format was still
AGENT_NAME:MODEL_VERSION :)

[...]
> > diff --git a/tools/testing/selftests/kvm/arm64/set_id_regs.c b/tools/testing/selftests/kvm/arm64/set_id_regs.c
[...]
> > +static void test_idreg_frozen_after_failed_run(void)
[...]
> > + /* Creating an in-kernel irqchip would change the ID registers too. */
> > + if (kvm_supports_vgic_v3()) {
> > + r = __kvm_create_device(vm, KVM_DEV_TYPE_ARM_VGIC_V3);
> > + TEST_ASSERT(r < 0 && errno == EBUSY,
> > + "vGIC creation after failed first run: r=%d errno=%d",
> > + r, errno);
>
> I guess in general it's making sure - where there should now be finalisation on
> reg setting that this is actually enforced?

Yes. The test exercises each of the userspace-facing checks that 2/3
moves to KVM_ARCH_FLAG_ID_REGS_FINAL: set_id_reg(), set_imp_id_reg()
and kvm_vgic_create().

Thanks,
/fuad