Skip to content

Commit 4138cc6

Browse files
benhor01ctmarinas
authored andcommitted
KVM: arm64: selftests: Consider all 7 possible levels of cache
In test_clidr() if an empty cache level is not found then the TEST_ASSERT will not fire. Fix this by considering all 7 possible levels when iterating through the hierarchy. Found by inspection. Signed-off-by: Ben Horgan <ben.horgan@arm.com> Acked-by: Marc Zyngier <maz@kernel.org> Acked-by: Oliver Upton <oupton@kernel.org> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
1 parent bf09ee9 commit 4138cc6

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

tools/testing/selftests/kvm/arm64/set_id_regs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,7 @@ static void test_clidr(struct kvm_vcpu *vcpu)
673673
clidr = vcpu_get_reg(vcpu, KVM_ARM64_SYS_REG(SYS_CLIDR_EL1));
674674

675675
/* find the first empty level in the cache hierarchy */
676-
for (level = 1; level < 7; level++) {
676+
for (level = 1; level <= 7; level++) {
677677
if (!CLIDR_CTYPE(clidr, level))
678678
break;
679679
}

0 commit comments

Comments
 (0)