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

Mark Brown <[email protected]>
Newsgroups gmane.linux.kernel,gmane.linux.ports.arm.kernel
Message-ID <[email protected]>
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.
signature.asc (application/pgp-signature, 488 B)
-----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-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.