[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 31/71] target/arm: Move error for sve%d property to arm_cpu_sv
From: |
Richard Henderson |
Subject: |
[PATCH v2 31/71] target/arm: Move error for sve%d property to arm_cpu_sve_finalize |
Date: |
Tue, 7 Jun 2022 13:32:26 -0700 |
Keep all of the error messages together. This does mean that
when setting many sve length properties we'll only generate
one error, but we only really need one.
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
target/arm/cpu64.c | 15 +++++++--------
1 file changed, 7 insertions(+), 8 deletions(-)
diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c
index 51c5d8d4bc..e18f585fa7 100644
--- a/target/arm/cpu64.c
+++ b/target/arm/cpu64.c
@@ -487,8 +487,13 @@ void arm_cpu_sve_finalize(ARMCPU *cpu, Error **errp)
"using only sve<N> properties.\n");
} else {
error_setg(errp, "cannot enable sve%d", vq * 128);
- error_append_hint(errp, "This CPU does not support "
- "the vector length %d-bits.\n", vq * 128);
+ if (vq_supported) {
+ error_append_hint(errp, "This CPU does not support "
+ "the vector length %d-bits.\n", vq *
128);
+ } else {
+ error_append_hint(errp, "SVE not supported by KVM "
+ "on this host\n");
+ }
}
return;
} else {
@@ -606,12 +611,6 @@ static void cpu_arm_set_sve_vq(Object *obj, Visitor *v,
const char *name,
return;
}
- if (value && kvm_enabled() && !kvm_arm_sve_supported()) {
- error_setg(errp, "cannot enable %s", name);
- error_append_hint(errp, "SVE not supported by KVM on this host\n");
- return;
- }
-
cpu->sve_vq_map = deposit32(cpu->sve_vq_map, vq - 1, 1, value);
cpu->sve_vq_init |= 1 << (vq - 1);
}
--
2.34.1
- [PATCH v2 24/71] target/arm: Add ARM_CP_SME, (continued)
- [PATCH v2 24/71] target/arm: Add ARM_CP_SME, Richard Henderson, 2022/06/07
- [PATCH v2 25/71] target/arm: Add SVCR, Richard Henderson, 2022/06/07
- [PATCH v2 27/71] target/arm: Add SMIDR_EL1, SMPRI_EL1, SMPRIMAP_EL2, Richard Henderson, 2022/06/07
- [PATCH v2 28/71] target/arm: Add PSTATE.{SM,ZA} to TB flags, Richard Henderson, 2022/06/07
- [PATCH v2 29/71] target/arm: Add the SME ZA storage to CPUARMState, Richard Henderson, 2022/06/07
- [PATCH v2 20/71] target/arm: Add ID_AA64SMFR0_EL1, Richard Henderson, 2022/06/07
- [PATCH v2 33/71] target/arm: Generalize cpu_arm_{get,set}_vq, Richard Henderson, 2022/06/07
- [PATCH v2 31/71] target/arm: Move error for sve%d property to arm_cpu_sve_finalize,
Richard Henderson <=
- [PATCH v2 30/71] target/arm: Implement SMSTART, SMSTOP, Richard Henderson, 2022/06/07
- [PATCH v2 34/71] target/arm: Generalize cpu_arm_{get, set}_default_vec_len, Richard Henderson, 2022/06/07
- [PATCH v2 35/71] target/arm: Move arm_cpu_*_finalize to internals.h, Richard Henderson, 2022/06/07
- [PATCH v2 36/71] target/arm: Unexport aarch64_add_*_properties, Richard Henderson, 2022/06/07
- [PATCH v2 38/71] target/arm: Introduce sve_vqm1_for_el_sm, Richard Henderson, 2022/06/07