[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC v14 74/80] target/arm: cpu-pauth: change arm_cpu_pauth_finalize nam
From: |
Claudio Fontana |
Subject: |
[RFC v14 74/80] target/arm: cpu-pauth: change arm_cpu_pauth_finalize name and sig |
Date: |
Fri, 16 Apr 2021 18:28:18 +0200 |
make arm_cpu_pauth_finalize return a bool,
and make the name canonical for the module (cpu_pauth_finalize).
Signed-off-by: Claudio Fontana <cfontana@suse.de>
---
target/arm/tcg/cpu-pauth.h | 2 +-
target/arm/cpu.c | 3 +--
target/arm/tcg/cpu-pauth.c | 5 ++++-
3 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/target/arm/tcg/cpu-pauth.h b/target/arm/tcg/cpu-pauth.h
index af127876fe..a0ef74dc77 100644
--- a/target/arm/tcg/cpu-pauth.h
+++ b/target/arm/tcg/cpu-pauth.h
@@ -26,7 +26,7 @@
#include "cpu.h"
/* called by arm_cpu_finalize_features in realizefn */
-void arm_cpu_pauth_finalize(ARMCPU *cpu, Error **errp);
+bool cpu_pauth_finalize(ARMCPU *cpu, Error **errp);
/* add the CPU Pointer Authentication properties */
void cpu_pauth_add_props(Object *obj);
diff --git a/target/arm/cpu.c b/target/arm/cpu.c
index 229ef989b4..b91c48cd2f 100644
--- a/target/arm/cpu.c
+++ b/target/arm/cpu.c
@@ -837,8 +837,7 @@ void arm_cpu_finalize_features(ARMCPU *cpu, Error **errp)
* is in use, so the user will not be able to set them.
*/
if (tcg_enabled()) {
- arm_cpu_pauth_finalize(cpu, &local_err);
- if (local_err != NULL) {
+ if (!cpu_pauth_finalize(cpu, &local_err)) {
error_propagate(errp, local_err);
return;
}
diff --git a/target/arm/tcg/cpu-pauth.c b/target/arm/tcg/cpu-pauth.c
index f821087b14..4f087923ac 100644
--- a/target/arm/tcg/cpu-pauth.c
+++ b/target/arm/tcg/cpu-pauth.c
@@ -25,8 +25,9 @@
#include "tcg/cpu-pauth.h"
#include "hw/qdev-properties.h"
-void arm_cpu_pauth_finalize(ARMCPU *cpu, Error **errp)
+bool cpu_pauth_finalize(ARMCPU *cpu, Error **errp)
{
+ bool result = true;
int arch_val = 0, impdef_val = 0;
uint64_t t;
@@ -40,6 +41,7 @@ void arm_cpu_pauth_finalize(ARMCPU *cpu, Error **errp)
} else if (cpu->prop_pauth_impdef) {
error_setg(errp, "cannot enable pauth-impdef without pauth");
error_append_hint(errp, "Add pauth=on to the CPU property list.\n");
+ result = false;
}
t = cpu->isar.id_aa64isar1;
@@ -48,6 +50,7 @@ void arm_cpu_pauth_finalize(ARMCPU *cpu, Error **errp)
t = FIELD_DP64(t, ID_AA64ISAR1, API, impdef_val);
t = FIELD_DP64(t, ID_AA64ISAR1, GPI, impdef_val);
cpu->isar.id_aa64isar1 = t;
+ return result;
}
static Property arm_cpu_pauth_property =
--
2.26.2
- [RFC v14 60/80] target/arm: cpu-sve: rename functions according to module prefix, (continued)
- [RFC v14 60/80] target/arm: cpu-sve: rename functions according to module prefix, Claudio Fontana, 2021/04/16
- [RFC v14 56/80] target/arm: move kvm post init initialization to kvm cpu accel, Claudio Fontana, 2021/04/16
- [RFC v14 61/80] target/arm: cpu-sve: split TCG and KVM functionality, Claudio Fontana, 2021/04/16
- [RFC v14 59/80] target/arm: cpu-sve: new module, Claudio Fontana, 2021/04/16
- [RFC v14 65/80] target/arm: arch_dump: restrict ELFCLASS64 to AArch64, Claudio Fontana, 2021/04/16
- [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 <=
- [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, 2021/04/16
- [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