[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v16 86/99] target/arm: cpu-pauth: change arm_cpu_pauth_finalize n
From: |
Alex Bennée |
Subject: |
[PATCH v16 86/99] target/arm: cpu-pauth: change arm_cpu_pauth_finalize name and sig |
Date: |
Fri, 4 Jun 2021 16:52:59 +0100 |
From: Claudio Fontana <cfontana@suse.de>
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>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
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 5359331bff..8709c11784 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.20.1
- Re: [PATCH v16 12/99] qtest: Do not restrict bios-tables-test to Aarch64 hosts anymore, (continued)
- [PATCH v16 13/99] meson: add target_user_arch, Alex Bennée, 2021/06/04
- [PATCH v16 10/99] qtest/bios-tables-test: Rename TCG specific tests, Alex Bennée, 2021/06/04
- [PATCH v16 87/99] target/arm: move arm_cpu_finalize_features into cpu64, Alex Bennée, 2021/06/04
- [PATCH v16 77/99] target/arm: arch_dump: restrict ELFCLASS64 to AArch64, Alex Bennée, 2021/06/04
- [PATCH v16 36/99] target/arm: move arm_mmu_idx* to cpu-mmu, Alex Bennée, 2021/06/04
- [PATCH v16 86/99] target/arm: cpu-pauth: change arm_cpu_pauth_finalize name and sig,
Alex Bennée <=
- [PATCH v16 96/99] tests/qtest: split the cdrom-test into arm/aarch64, Alex Bennée, 2021/06/04
- Re: [PATCH v16 96/99] tests/qtest: split the cdrom-test into arm/aarch64, Richard Henderson, 2021/06/05
- Re: [PATCH v16 96/99] tests/qtest: split the cdrom-test into arm/aarch64, Alex Bennée, 2021/06/08
- Re: [PATCH v16 96/99] tests/qtest: split the cdrom-test into arm/aarch64, Thomas Huth, 2021/06/08
- Re: [PATCH v16 96/99] tests/qtest: split the cdrom-test into arm/aarch64, Richard Henderson, 2021/06/08
- Re: [PATCH v16 96/99] tests/qtest: split the cdrom-test into arm/aarch64, Thomas Huth, 2021/06/08
- Re: [PATCH v16 96/99] tests/qtest: split the cdrom-test into arm/aarch64, Alex Bennée, 2021/06/08
- Re: [PATCH v16 96/99] tests/qtest: split the cdrom-test into arm/aarch64, Thomas Huth, 2021/06/08
- Re: [PATCH v16 96/99] tests/qtest: split the cdrom-test into arm/aarch64, John Snow, 2021/06/08