diff mbox series

[2/4] gdbstub: Add support for MTE in system mode

Message ID 20240722160709.1677430-3-gustavo.romero@linaro.org
State New
Headers show
Series gdbstub: Add support for MTE in system mode | expand

Commit Message

Gustavo Romero July 22, 2024, 4:07 p.m. UTC
This commit makes handle_q_memtag, handle_q_isaddresstagged, and
handle_Q_memtag stubs build for system mode, allowing all GDB
'memory-tag' subcommands to work with QEMU gdbstub on aarch64 system
mode.

Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
---
 target/arm/gdbstub64.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Richard Henderson July 24, 2024, 10:19 a.m. UTC | #1
On 7/23/24 02:07, Gustavo Romero wrote:
> This commit makes handle_q_memtag, handle_q_isaddresstagged, and
> handle_Q_memtag stubs build for system mode, allowing all GDB
> 'memory-tag' subcommands to work with QEMU gdbstub on aarch64 system
> mode.
> 
> Signed-off-by: Gustavo Romero<gustavo.romero@linaro.org>
> ---
>   target/arm/gdbstub64.c | 4 +---
>   1 file changed, 1 insertion(+), 3 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~
diff mbox series

Patch

diff --git a/target/arm/gdbstub64.c b/target/arm/gdbstub64.c
index d59272fdbb..fd5a9d0609 100644
--- a/target/arm/gdbstub64.c
+++ b/target/arm/gdbstub64.c
@@ -426,6 +426,7 @@  int aarch64_gdb_set_tag_ctl_reg(CPUState *cs, uint8_t *buf, int reg)
 
     return 1;
 }
+#endif /* CONFIG_USER_ONLY */
 
 static void handle_q_memtag(GArray *params, void *user_ctx)
 {
@@ -596,12 +597,10 @@  static GdbCmdParseEntry cmd_handler_table[NUM_CMDS] = {
         .need_cpu_context = true
     },
 };
-#endif /* CONFIG_USER_ONLY */
 
 void aarch64_cpu_register_gdb_commands(ARMCPU *cpu, GString *qsupported,
                                        GArray *qtable, GArray *stable)
 {
-#ifdef CONFIG_USER_ONLY
     /* MTE */
     if (cpu_isar_feature(aa64_mte, cpu)) {
         g_string_append(qsupported, ";memory-tagging+");
@@ -611,5 +610,4 @@  void aarch64_cpu_register_gdb_commands(ARMCPU *cpu, GString *qsupported,
 
         g_array_append_val(stable, cmd_handler_table[QMemTags]);
     }
-#endif
 }