[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC v13 77/80] target/arm: cpu64: some final cleanup on aarch64_cpu_fin
From: |
Claudio Fontana |
Subject: |
[RFC v13 77/80] target/arm: cpu64: some final cleanup on aarch64_cpu_finalize_features |
Date: |
Wed, 14 Apr 2021 13:26:47 +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 v13 61/80] target/arm: cpu-sve: split TCG and KVM functionality, (continued)
- [RFC v13 61/80] target/arm: cpu-sve: split TCG and KVM functionality, Claudio Fontana, 2021/04/14
- [RFC v13 54/80] Revert "target/arm: Restrict v8M IDAU to TCG", Claudio Fontana, 2021/04/14
- [RFC v13 56/80] target/arm: move kvm post init initialization to kvm cpu accel, Claudio Fontana, 2021/04/14
- [RFC v13 57/80] target/arm: add tcg cpu accel class, Claudio Fontana, 2021/04/14
- [RFC v13 59/80] target/arm: cpu-sve: new module, Claudio Fontana, 2021/04/14
- [RFC v13 65/80] target/arm: arch_dump: restrict ELFCLASS64 to AArch64, Claudio Fontana, 2021/04/14
- [RFC v13 62/80] target/arm: cpu-sve: make cpu_sve_finalize_features return bool, Claudio Fontana, 2021/04/14
- [RFC v13 70/80] target/arm: move sve_zcr_len_for_el to TARGET_AARCH64-only cpu-sve, Claudio Fontana, 2021/04/14
- [RFC v13 69/80] target/arm: tcg-sve: rename the narrow_vq and change_el functions, Claudio Fontana, 2021/04/14
- [RFC v13 72/80] target/arm: cpu-common: wrap a64-only check with is_a64, Claudio Fontana, 2021/04/14
- [RFC v13 77/80] target/arm: cpu64: some final cleanup on aarch64_cpu_finalize_features,
Claudio Fontana <=
- [RFC v13 79/80] target/arm: tcg: remove superfluous CONFIG_TCG check, Claudio Fontana, 2021/04/14
- [RFC v13 71/80] cpu-sve: rename sve_zcr_len_for_el to cpu_sve_get_zcr_len_for_el, Claudio Fontana, 2021/04/14
- [RFC v13 58/80] target/arm: move TCG gt timer creation code in tcg/, Claudio Fontana, 2021/04/14
- [RFC v13 63/80] target/arm: make is_aa64 and arm_el_is_aa64 a macro for !TARGET_AARCH64, Claudio Fontana, 2021/04/14
- [RFC v13 64/80] target/arm: restrict rebuild_hflags_a64 to TARGET_AARCH64, Claudio Fontana, 2021/04/14
- [RFC v13 74/80] target/arm: cpu-pauth: change arm_cpu_pauth_finalize name and sig, Claudio Fontana, 2021/04/14
- [RFC v13 66/80] target/arm: cpu-exceptions, cpu-exceptions-aa64: new modules, Claudio Fontana, 2021/04/14
- [RFC v13 76/80] target/arm: cpu64: rename arm_cpu_finalize_features, Claudio Fontana, 2021/04/14
- [RFC v13 75/80] target/arm: move arm_cpu_finalize_features into cpu64, Claudio Fontana, 2021/04/14
- [RFC v13 73/80] target/arm: cpu-pauth: new module for ARMv8.3 Pointer Authentication, Claudio Fontana, 2021/04/14