[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC v14 77/80] target/arm: cpu64: some final cleanup on aarch64_cpu_fin
From: |
Claudio Fontana |
Subject: |
[RFC v14 77/80] target/arm: cpu64: some final cleanup on aarch64_cpu_finalize_features |
Date: |
Fri, 16 Apr 2021 18:28:21 +0200 |
bail out immediately if ARM_FEATURE_AARCH64 is not set,
and add an else statement when checking for accelerators.
Signed-off-by: Claudio Fontana <cfontana@suse.de>
---
target/arm/cpu64.c | 33 ++++++++++++++++-----------------
1 file changed, 16 insertions(+), 17 deletions(-)
diff --git a/target/arm/cpu64.c b/target/arm/cpu64.c
index 5b8dc8ff14..1de1d46b82 100644
--- a/target/arm/cpu64.c
+++ b/target/arm/cpu64.c
@@ -459,26 +459,25 @@ void aarch64_cpu_finalize_features(ARMCPU *cpu, Error
**errp)
{
Error *local_err = NULL;
- if (arm_feature(&cpu->env, ARM_FEATURE_AARCH64)) {
- if (!cpu_sve_finalize_features(cpu, &local_err)) {
+ if (!arm_feature(&cpu->env, ARM_FEATURE_AARCH64)) {
+ return;
+ }
+ if (!cpu_sve_finalize_features(cpu, &local_err)) {
+ error_propagate(errp, local_err);
+ return;
+ }
+
+ /*
+ * KVM does not support modifications to this feature.
+ * We have not registered the cpu properties when KVM
+ * is in use, so the user will not be able to set them.
+ */
+ if (tcg_enabled()) {
+ if (!cpu_pauth_finalize(cpu, &local_err)) {
error_propagate(errp, local_err);
return;
}
-
- /*
- * KVM does not support modifications to this feature.
- * We have not registered the cpu properties when KVM
- * is in use, so the user will not be able to set them.
- */
- if (tcg_enabled()) {
- if (!cpu_pauth_finalize(cpu, &local_err)) {
- error_propagate(errp, local_err);
- return;
- }
- }
- }
-
- if (kvm_enabled()) {
+ } else if (kvm_enabled()) {
kvm_arm_steal_time_finalize(cpu, &local_err);
if (local_err != NULL) {
error_propagate(errp, local_err);
--
2.26.2
- [RFC v14 67/80] target/arm: tcg: restrict ZCR cpregs to TARGET_AARCH64, (continued)
- [RFC v14 67/80] target/arm: tcg: restrict ZCR cpregs to TARGET_AARCH64, Claudio Fontana, 2021/04/16
- [RFC v14 71/80] cpu-sve: rename sve_zcr_len_for_el to cpu_sve_get_zcr_len_for_el, Claudio Fontana, 2021/04/16
- [RFC v14 66/80] target/arm: cpu-exceptions, cpu-exceptions-aa64: new modules, Claudio Fontana, 2021/04/16
- [RFC v14 72/80] target/arm: cpu-common: wrap a64-only check with is_a64, Claudio Fontana, 2021/04/16
- [RFC v14 70/80] target/arm: move sve_zcr_len_for_el to TARGET_AARCH64-only cpu-sve, Claudio Fontana, 2021/04/16
- [RFC v14 74/80] target/arm: cpu-pauth: change arm_cpu_pauth_finalize name and sig, Claudio Fontana, 2021/04/16
- [RFC v14 73/80] target/arm: cpu-pauth: new module for ARMv8.3 Pointer Authentication, Claudio Fontana, 2021/04/16
- [RFC v14 68/80] target/arm: tcg-sve: import narrow_vq and change_el functions, Claudio Fontana, 2021/04/16
- [RFC v14 69/80] target/arm: tcg-sve: rename the narrow_vq and change_el functions, Claudio Fontana, 2021/04/16
- [RFC v14 76/80] target/arm: cpu64: rename arm_cpu_finalize_features, Claudio Fontana, 2021/04/16
- [RFC v14 77/80] target/arm: cpu64: some final cleanup on aarch64_cpu_finalize_features,
Claudio Fontana <=
- [RFC v14 80/80] target/arm: remove v7m stub function for !CONFIG_TCG, Claudio Fontana, 2021/04/16
- [RFC v14 79/80] target/arm: tcg: remove superfluous CONFIG_TCG check, Claudio Fontana, 2021/04/16
- [RFC v14 78/80] XXX target/arm: experiment refactoring cpu "max", Claudio Fontana, 2021/04/16
- [RFC v14 75/80] target/arm: move arm_cpu_finalize_features into cpu64, Claudio Fontana, 2021/04/16