[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v9 05/10] target/arm: gdbstub: Guard pauth code with CONFIG_TCG
From: |
Fabiano Rosas |
Subject: |
[PATCH v9 05/10] target/arm: gdbstub: Guard pauth code with CONFIG_TCG |
Date: |
Mon, 13 Mar 2023 12:10:53 -0300 |
We currently don't have the reading of pauth regs implemented for KVM
so wrap the pauth registration with CONFIG_TCG.
This avoids the build error when using --disable-tcg:
libqemu-aarch64-softmmu.fa.p/target_arm_gdbstub64.c.o: in function
`aarch64_gdb_get_pauth_reg': ../target/arm/gdbstub64.c:233: undefined
reference to `pauth_ptr_mask'
Signed-off-by: Fabiano Rosas <farosas@suse.de>
---
target/arm/gdbstub.c | 4 +++-
target/arm/gdbstub64.c | 2 ++
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/target/arm/gdbstub.c b/target/arm/gdbstub.c
index 36a1d7dbc5..3ea50bcaaf 100644
--- a/target/arm/gdbstub.c
+++ b/target/arm/gdbstub.c
@@ -23,6 +23,7 @@
#include "gdbstub/helpers.h"
#include "internals.h"
#include "cpregs.h"
+#include "sysemu/tcg.h"
typedef struct RegisterSysregXmlParam {
CPUState *cs;
@@ -522,7 +523,8 @@ void arm_cpu_register_gdb_regs_for_features(ARMCPU *cpu)
aarch64_gdb_set_fpu_reg,
34, "aarch64-fpu.xml", 0);
}
- if (isar_feature_aa64_pauth(&cpu->isar)) {
+
+ if (tcg_enabled() && isar_feature_aa64_pauth(&cpu->isar)) {
gdb_register_coprocessor(cs, aarch64_gdb_get_pauth_reg,
aarch64_gdb_set_pauth_reg,
4, "aarch64-pauth.xml", 0);
diff --git a/target/arm/gdbstub64.c b/target/arm/gdbstub64.c
index ec1e07f139..104a43e471 100644
--- a/target/arm/gdbstub64.c
+++ b/target/arm/gdbstub64.c
@@ -210,6 +210,7 @@ int aarch64_gdb_set_sve_reg(CPUARMState *env, uint8_t *buf,
int reg)
return 0;
}
+#ifdef CONFIG_TCG
int aarch64_gdb_get_pauth_reg(CPUARMState *env, GByteArray *buf, int reg)
{
switch (reg) {
@@ -243,6 +244,7 @@ int aarch64_gdb_set_pauth_reg(CPUARMState *env, uint8_t
*buf, int reg)
/* All pseudo registers are read-only. */
return 0;
}
+#endif
static void output_vector_union_type(GString *s, int reg_width,
const char *name)
--
2.35.3
- [PATCH v9 00/10] target/arm: Allow CONFIG_TCG=n builds, Fabiano Rosas, 2023/03/13
- [PATCH v9 01/10] target/arm: Move cortex sysregs into a separate file, Fabiano Rosas, 2023/03/13
- [PATCH v9 02/10] target/arm: Move 64-bit TCG CPUs into tcg/, Fabiano Rosas, 2023/03/13
- [PATCH v9 03/10] target/arm: move cpu_tcg to tcg/cpu32.c, Fabiano Rosas, 2023/03/13
- [PATCH v9 04/10] target/arm: gdbstub: Guard M-profile code with CONFIG_TCG, Fabiano Rosas, 2023/03/13
- [PATCH v9 05/10] target/arm: gdbstub: Guard pauth code with CONFIG_TCG,
Fabiano Rosas <=
- [PATCH v9 06/10] tests/qtest: Fix tests when no KVM or TCG are present, Fabiano Rosas, 2023/03/13
- [PATCH v9 07/10] tests/avocado: Pass parameters to migration test, Fabiano Rosas, 2023/03/13
- [PATCH v9 08/10] arm/Kconfig: Always select SEMIHOSTING when TCG is present, Fabiano Rosas, 2023/03/13
- [PATCH v9 09/10] arm/Kconfig: Do not build TCG-only boards on a KVM-only build, Fabiano Rosas, 2023/03/13
- [PATCH v9 10/10] gitlab-ci: Check building KVM-only aarch64 target, Fabiano Rosas, 2023/03/13