[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v16 89/99] target/arm: cpu64: some final cleanup on aarch64_cpu_f
From: |
Alex Bennée |
Subject: |
[PATCH v16 89/99] target/arm: cpu64: some final cleanup on aarch64_cpu_finalize_features |
Date: |
Fri, 4 Jun 2021 16:53:02 +0100 |
From: Claudio Fontana <cfontana@suse.de>
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>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
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 3058e2c273..ecce8c4308 100644
--- a/target/arm/cpu64.c
+++ b/target/arm/cpu64.c
@@ -473,26 +473,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.20.1
- [PATCH v16 53/99] target/arm: replace CONFIG_TCG with tcg_enabled, (continued)
- [PATCH v16 53/99] target/arm: replace CONFIG_TCG with tcg_enabled, Alex Bennée, 2021/06/04
- [PATCH v16 68/99] target/arm: move kvm post init initialization to kvm cpu accel, Alex Bennée, 2021/06/04
- [PATCH v16 23/99] target/arm: only build psci for TCG, Alex Bennée, 2021/06/04
- [PATCH v16 67/99] target/arm: create kvm cpu accel class, Alex Bennée, 2021/06/04
- [PATCH v16 40/99] target/arm: move aarch64_sync_32_to_64 (and vv) to cpu code, Alex Bennée, 2021/06/04
- [PATCH v16 30/99] target/arm: only perform TCG cpu and machine inits if TCG enabled, Alex Bennée, 2021/06/04
- [PATCH v16 56/99] target/arm: wrap call to aarch64_sve_change_el in tcg_enabled(), Alex Bennée, 2021/06/04
- [PATCH v16 47/99] target/arm: move fp_exception_el out of TCG helpers, Alex Bennée, 2021/06/04
- [PATCH v16 89/99] target/arm: cpu64: some final cleanup on aarch64_cpu_finalize_features,
Alex Bennée <=
- [PATCH v16 73/99] target/arm: cpu-sve: split TCG and KVM functionality, Alex Bennée, 2021/06/04
- [PATCH v16 38/99] target/arm: move arm_sctlr away from tcg helpers, Alex Bennée, 2021/06/04
- [PATCH v16 57/99] target/arm: remove kvm include file for PSCI and arm-powerctl, Alex Bennée, 2021/06/04
- [PATCH v16 27/99] target/arm: fix style in preparation of new cpregs module, Alex Bennée, 2021/06/04
- [PATCH v16 48/99] target/arm: remove now useless ifndef from fp_exception_el, Alex Bennée, 2021/06/04