]> www.infradead.org Git - linux.git/commitdiff
KVM: selftests: Assert that MPIDR_EL1 is unchanged across vCPU reset
authorOliver Upton <oliver.upton@linux.dev>
Fri, 21 Jun 2024 22:50:45 +0000 (22:50 +0000)
committerOliver Upton <oliver.upton@linux.dev>
Sat, 22 Jun 2024 17:22:14 +0000 (17:22 +0000)
commit 606af8293cd8 ("KVM: selftests: arm64: Test vCPU-scoped feature ID
registers") intended to test that MPIDR_EL1 is unchanged across vCPU
reset but failed at actually doing so.

Add the missing assertion.

Link: https://lore.kernel.org/r/20240621225045.2472090-1-oliver.upton@linux.dev
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
tools/testing/selftests/kvm/aarch64/set_id_regs.c

index 9583c04f1228b78c5829fe2261ce02dfe65fbb0d..d20981663831f4cfd2a8027fc605e8054e3add2a 100644 (file)
@@ -539,6 +539,7 @@ static void test_reset_preserves_id_regs(struct kvm_vcpu *vcpu)
        for (int i = 0; i < ARRAY_SIZE(test_regs); i++)
                test_assert_id_reg_unchanged(vcpu, test_regs[i].reg);
 
+       test_assert_id_reg_unchanged(vcpu, SYS_MPIDR_EL1);
        test_assert_id_reg_unchanged(vcpu, SYS_CLIDR_EL1);
        test_assert_id_reg_unchanged(vcpu, SYS_CTR_EL0);