Skip to content

Commit 2653860

Browse files
jones-drewavpatel
authored andcommitted
KVM: arm64: selftests: Drop SVE cap check in print_reg
The check doesn't prove much anyway, as the reg lists could be messed up too. Just drop the check to simplify making print_reg more independent. Signed-off-by: Andrew Jones <[email protected]> Signed-off-by: Haibo Xu <[email protected]> Signed-off-by: Anup Patel <[email protected]>
1 parent dfaf20a commit 2653860

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

tools/testing/selftests/kvm/aarch64/get-reg-list.c

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -129,16 +129,6 @@ static const char *config_name(struct vcpu_config *c)
129129
return c->name;
130130
}
131131

132-
static bool has_cap(struct vcpu_config *c, long capability)
133-
{
134-
struct reg_sublist *s;
135-
136-
for_each_sublist(c, s)
137-
if (s->capability == capability)
138-
return true;
139-
return false;
140-
}
141-
142132
static bool filter_reg(__u64 reg)
143133
{
144134
/*
@@ -335,10 +325,7 @@ static void print_reg(struct vcpu_config *c, __u64 id)
335325
printf("\tKVM_REG_ARM_FW_FEAT_BMAP_REG(%lld),\n", id & 0xffff);
336326
break;
337327
case KVM_REG_ARM64_SVE:
338-
if (has_cap(c, KVM_CAP_ARM_SVE))
339-
printf("\t%s,\n", sve_id_to_str(c, id));
340-
else
341-
TEST_FAIL("%s: KVM_REG_ARM64_SVE is an unexpected coproc type in reg id: 0x%llx", config_name(c), id);
328+
printf("\t%s,\n", sve_id_to_str(c, id));
342329
break;
343330
default:
344331
TEST_FAIL("%s: Unexpected coproc type: 0x%llx in reg id: 0x%llx",

0 commit comments

Comments
 (0)