Re: [PATCH 2/4] gdbstub: Add support for MTE in user mode

2024-05-28 Thread Alex Bennée
Gustavo Romero writes: > This commit implements the stubs to handle the qIsAddressTagged, > qMemTag, and QMemTag GDB packets, allowing all GDB 'memory-tag' > subcommands to work with QEMU gdbstub on aarch64 user mode. It also > implements the get/set function for the special GDB MTE register > 't

Re: [PATCH 2/4] gdbstub: Add support for MTE in user mode

2024-05-16 Thread Richard Henderson
On 5/15/24 19:31, Gustavo Romero wrote: +/* Remove any non-addressing bits. */ +clean_addr = useronly_clean_ptr(addr); + +/* + * Get pointer to all tags in the page where the address is. Note that tags + * are packed, so there are 2 tags packed in one byte. + */ +tags

Re: [PATCH 2/4] gdbstub: Add support for MTE in user mode

2024-05-16 Thread Richard Henderson
On 5/15/24 19:31, Gustavo Romero wrote: +static int aarch64_gdb_set_tag_ctl_reg(CPUState *cs, uint8_t *buf, int reg) +{ +ARMCPU *cpu = ARM_CPU(cs); +CPUARMState *env = &cpu->env; + +assert(reg == 0); + +/* Sanitize TCF0 bits. */ +*buf &= 0x03; + +if (!isar_feature_aa64_mte

Re: [PATCH 2/4] gdbstub: Add support for MTE in user mode

2024-05-16 Thread Philippe Mathieu-Daudé
Hi Gustavo, On 15/5/24 19:31, Gustavo Romero wrote: This commit implements the stubs to handle the qIsAddressTagged, qMemTag, and QMemTag GDB packets, allowing all GDB 'memory-tag' subcommands to work with QEMU gdbstub on aarch64 user mode. It also implements the get/set function for the special

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

2024-05-15 Thread Gustavo Romero
This commit implements the stubs to handle the qIsAddressTagged, qMemTag, and QMemTag GDB packets, allowing all GDB 'memory-tag' subcommands to work with QEMU gdbstub on aarch64 user mode. It also implements the get/set function for the special GDB MTE register 'tag_ctl', used to control the MTE fa