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

Mark Brown <[email protected]> Tue, 4 Aug 2026 17:14:52 +0100
Newsgroups dev.linux.lists.kvmarm,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
--z3phxlZuUwtCbrTU
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

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.

--z3phxlZuUwtCbrTU
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmpyD/sACgkQJNaLcl1U
h9C8YAf9EMhSIgloBjFk+gFUs12O/TATm4DfMhGeRfvlcALpkawfiIyC1MQxlefq
sd3bgUKbBuOBqRBXBOY/KJoMZzRiK5QWJWTyGMaaDwRKB4uvfg6P1V/VKBY0qhGv
BXnks4iZ70/1K8Fv//PxG8WwePOAcBgDKKXbopoyKEQa7ZQ2JzbF6+m6lxm6nBTV
OuNxcLLG7ZpmcSoO3F2Iu3TfUD2ltq6LP1IrfjW0V+7zmy/X79L7d9P+lCZVL+WR
zj6xNQDWt7KrZMxlgRplUkgEVSh2CmZAjWu70kGyqyaBjqmaalu2Ge6zNlyH7WpI
D6VZ1lYs3eQsU7wZ2jSpX0fv2924RA==
=45sn
-----END PGP SIGNATURE-----

--z3phxlZuUwtCbrTU--