ID_AA64PFR1 register to be probed
correctly, as they are masked if MTE is not enabled."
I agree.
+ */
+if (kvm_arm_mte_supported()) {
+KVMState kvm_state;
+
+kvm_state.fd = kvmfd;
+kvm_state.vmfd = vmfd;
+kvm_vm_enable_cap(&kvm_state, KVM_CAP_ARM_MTE, 0);
+}
+
cpufd = ioctl(vmfd, KVM_CREATE_VCPU, 0);
if (cpufd < 0) {
goto err;
(...)
Comments aside:
Reviewed-by: Gustavo Romero
Hi Ganapatrao,
On 9/25/24 19:40, Ganapatrao Kulkarni wrote:
Hi Gustavo,
On 25-09-2024 09:17 pm, Gustavo Romero wrote:
Hi Ganapatrao,
Sorry for the delay on replying it. I was attending KVM Forum and
commuting.
On 9/20/24 09:37, Ganapatrao Kulkarni wrote:
Extend the 'mte' pr
Hi Ganapatrao,
Sorry for the delay on replying it. I was attending KVM Forum and commuting.
On 9/20/24 09:37, Ganapatrao Kulkarni wrote:
Extend the 'mte' property for the virt machine to cover KVM as
well. For KVM, we don't allocate tag memory, but instead enable
the capability.
If MTE has bee
Hi Ganapatrao,
On 9/12/24 06:16, Ganapatrao Kulkarni wrote:
Extend the 'mte' property for the virt machine to cover KVM as
well. For KVM, we don't allocate tag memory, but instead enable
the capability.
If MTE has been enabled, we need to disable migration, as we do not
yet have a way to migrat
Hi Cornelia and Ganapatrao,
On 9/17/24 11:13, Cornelia Huck wrote:
On Thu, Sep 12 2024, Ganapatrao Kulkarni
wrote:
Extend the 'mte' property for the virt machine to cover KVM as
well. For KVM, we don't allocate tag memory, but instead enable
the capability.
If MTE has been enabled, we need
Improve kernel.ld linker script organization by using MEMORY command.
Signed-off-by: Richard Henderson
Signed-off-by: Gustavo Romero
---
tests/tcg/aarch64/system/kernel.ld | 24
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/tests/tcg/aarch64/system
byte), rather than the number of bits used in the address
space pointed to by ptr.
Signed-off-by: Gustavo Romero
Reviewed-by: Richard Henderson
---
target/arm/gdbstub64.c | 17 +
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/target/arm/gdbstub64.c b/target/arm
nst boot.S and is executed by QEMU in system mode.
Signed-off-by: Gustavo Romero
---
configure | 5 +
tests/tcg/aarch64/Makefile.softmmu-target | 49 +-
tests/tcg/aarch64/Makefile.target | 3 +-
tests/tcg/aarch64/gdbstub/test-mte.py
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.
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/620
Signed-off-by: Gust
t if, for instance,
the caller of the runner script passes an invalid argument or misses a
required argument by the test script.
Signed-off-by: Gustavo Romero
Reviewed-by: Alex Bennée
---
tests/guest-debug/run-test.py | 6 ++
tests/guest-debug/test_gdbstub.py | 5 +
2 files cha
ve linker script organization (Richard's review)
Cheers,
Gustavo
Gustavo Romero (5):
gdbstub: Use specific MMU index when probing MTE addresses
gdbstub: Add support for MTE in system mode
tests/guest-debug: Support passing arguments to the GDB test script
tests/tcg/aarch64: Improve l
Hi Richard,
On 8/29/24 7:16 PM, Richard Henderson wrote:
On 8/30/24 06:13, Gustavo Romero wrote:
1 .text 1e60 40001000 40001000 00011000 2**12
4 .data 00012000 4020 4020 0002 2**12
4040 g .data
Hi Richard,
On 8/28/24 9:43 PM, Richard Henderson wrote:
On 8/28/24 04:01, Gustavo Romero wrote:
SECTIONS
{
- /* virt machine, RAM starts at 1gb */
+ /* Skip first 1 GiB on virt machine: RAM starts at 1 GiB. */
. = (1 << 30);
Better is to use
MEMORY {
RAM (rwx) :
Hi Salil,
On 6/13/24 8:36 PM, Salil Mehta via wrote:
PROLOGUE
To assist in review and set the right expectations from this RFC, please first
read the sections *APPENDED AT THE END* of this cover letter:
1. Important *DISCLAIMER* [Section (X)]
2. Work presented at KVMForum Conference (
Hi Salil,
On 8/19/24 9:35 AM, Salil Mehta via wrote:
Hi Alex,
From: Alex Bennée
Sent: Friday, August 16, 2024 4:37 PM
To: Salil Mehta
Salil Mehta writes:
> vCPU Hot-unplug will result in QOM CPU object unrealization which will
> do away with all the vCPU thread creations,
Hi Phil,
On 8/27/24 9:42 AM, Gustavo Romero wrote:
Hi Phil!
On 8/26/24 3:10 AM, Philippe Mathieu-Daudé wrote:
Hi Gustavo,
On 25/8/24 16:52, Gustavo Romero wrote:
Extend MTE gdbstub tests to also run in system mode (share tests between
user mode and system mode). The tests will only run if a
Hi Phil!
On 8/26/24 3:10 AM, Philippe Mathieu-Daudé wrote:
Hi Gustavo,
On 25/8/24 16:52, Gustavo Romero wrote:
Extend MTE gdbstub tests to also run in system mode (share tests between
user mode and system mode). The tests will only run if a version of GDB
that supports MTE on baremetal is
nst boot.S and is executed by QEMU in system mode.
Signed-off-by: Gustavo Romero
---
configure | 5 +
tests/tcg/aarch64/Makefile.softmmu-target | 49 +-
tests/tcg/aarch64/Makefile.target | 3 +-
tests/tcg/aarch64/gdbstub/test-mte.py
byte), rather than the number of bits used in the address
space pointed to by ptr.
Signed-off-by: Gustavo Romero
Reviewed-by: Richard Henderson
---
target/arm/gdbstub64.c | 17 +
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/target/arm/gdbstub64.c b/target/arm
t if, for instance,
the caller of the runner script passes an invalid argument or misses a
required argument by the test script.
Signed-off-by: Gustavo Romero
---
tests/guest-debug/run-test.py | 6 ++
tests/guest-debug/test_gdbstub.py | 5 +
2 files changed, 11 insertions(+)
diff --
ead of printed to
stdout
- Added detection of GDB supporting MTE in baremetal
v3:
- No need of ARM_MMU_IDX_COREIDX_MASK with cpu_mmu_index() (Richard's review)
- Define a symbol for mte_page instead of a whole section (Richard's review)
Cheers,
Gustavo
Gustavo Romero (4):
gdbstub: Use
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
Reviewed-by: Richard Henderson
---
target/arm/gdbst
Add a back-pointer to the host in viewport"
Anyways,
Reviewed-by: Gustavo Romero
Cheers,
Gustavo
On 10/12/23 9:18 AM, Philippe Mathieu-Daudé wrote:
The PCI root function is irrelevant for the ViewPort; only
a reference to the host bridge is required. Since we can
directly access the PCI
Hi Phil
On 10/12/23 9:18 AM, Philippe Mathieu-Daudé wrote:
The MSI registers belong the the host bridge. Move the
DesignwarePCIEMSI field to the host bridge state.
I would say MSI registers are more tied to the PCI/PCIe network
side than to the host side. The MSI registers control if an
interr
e to mimic any verilog code etc).
Reviewed-by: Gustavo Romero
Cheers,
Gustavo
---
include/hw/pci-host/designware.h | 13 -
hw/pci-host/designware.c | 47
2 files changed, 30 insertions(+), 30 deletions(-)
diff --git a/include/hw/pci-host/de
rface. */
Otherwise:
Reviewed-by: Gustavo Romero
Cheers,
Gustavo
};
struct DesignwarePCIEHost {
diff --git a/hw/pci-host/designware.c b/hw/pci-host/designware.c
index bacb2bdb2d..fb46493a05 100644
--- a/hw/pci-host/designware.c
+++ b/hw/pci-host/designware.c
@@ -57,13 +
specific code.
Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Gustavo Romero
Cheers,
Gustavo
---
hw/pci-host/designware.c | 207 +++
1 file changed, 102 insertions(+), 105 deletions(-)
diff --git a/hw/pci-host/designware.c b/hw/pci-host/designware.c
pci.memory;
direction = "Outbound";
-source = get_system_memory();
+source = host_mem;
/*
* Configure MemoryRegion implementing CPU -> PCI memory
Reviewed-by: Gustavo Romero
This patch can get merged independently of this series.
Cheers,
Gustavo
class_init,
-};
-
-static void designware_pcie_register(void)
-{
-type_register_static(&designware_pcie_root_info);
-type_register_static(&designware_pcie_host_info);
-}
-type_init(designware_pcie_register)
+DEFINE_TYPES(designware_pcie_types)
Reviewed-by: Gustavo Romero
This
Hi Phil,
On 10/12/23 9:18 AM, Philippe Mathieu-Daudé wrote:
There are no root function properties exposed by the host
bridge, so using a 2-step QOM creation isn't really useful.
Simplify by creating the root function when the host bridge
is realized.
Signed-off-by: Philippe Mathieu-Daudé
---
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
Reviewed-by: Richard Henderson
---
target/arm/gdbst
nst boot.S and is executed by QEMU in system mode.
Signed-off-by: Gustavo Romero
---
configure | 5 +
tests/tcg/aarch64/Makefile.softmmu-target | 49 -
tests/tcg/aarch64/Makefile.target | 3 +-
tests/tcg/aarch64/gdbstub/test-mte.py
t if, for instance,
the caller of the runner script passes an invalid argument or misses a
required argument by the test script.
Signed-off-by: Gustavo Romero
---
tests/guest-debug/run-test.py | 6 ++
tests/guest-debug/test_gdbstub.py | 5 +
2 files changed, 11 insertions(+)
diff --
byte), rather than the number of bits used in the address
space pointed to by ptr.
Signed-off-by: Gustavo Romero
Reviewed-by: Richard Henderson
---
target/arm/gdbstub64.c | 17 +
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/target/arm/gdbstub64.c b/target/arm
ead of printed to
stdout
- Added detection of GDB supporting MTE in baremetal
Cheers,
Gustavo
Gustavo Romero (4):
gdbstub: Use specific MMU index when probing MTE addresses
gdbstub: Add support for MTE in system mode
tests/guest-debug: Support passing arguments to the GDB test script
tests/t
Hi Richard,
On 7/25/24 8:17 PM, Richard Henderson wrote:
On 7/23/24 02:07, Gustavo Romero wrote:
def run_test():
- gdb.execute("break 95", False, True)
+ if mode == "system":
+ # Break address: where to break before performing the tests
+ # Addre
Hi Alex,
On 7/25/24 5:38 PM, Alex Bennée wrote:
Gustavo Romero writes:
This commit adds a new option to run-test.py, --test-args, which can
be used to pass arguments to the GDB test script specified by the --test
option. The arguments passed are in the key=value form, and multiple
pairs can
Hi Richard,
On 7/24/24 7:14 AM, Richard Henderson wrote:
On 7/23/24 02:07, Gustavo Romero wrote:
+ /* Find out the current translation regime for probe. */
+ mmu_index = arm_mmu_idx(env) & ARM_MMU_IDX_COREIDX_MASK;
The official interface is cpu_mmu_index().
Otherwise,
Reviewe
configure also regarding GDB_HAS_MTE,
which was being set even if the GDB available in the build env. does not
support the Aarch64 arch.
Cheers,
Gustavo
[0] https://gitlab.com/qemu-project/qemu/-/issues/2477
Gustavo Romero (3):
configure: Fix arch detection for GDB_HAS_MTE
configure: Avoid use of
$gdb_version is now used in more than one conditional case and its usage
in such cases may increase in the future. Therefore, avoid using shell
parameter expansion when using it by setting gdb_version to its final
form.
Signed-off-by: Gustavo Romero
---
configure | 8 +---
1 file changed, 5
: Gustavo Romero
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2477
---
configure | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure b/configure
index 97de85d710..d08b71f14b 100755
--- a/configure
+++ b/configure
@@ -1675,7 +1675,7 @@ for target in $target_list; do
GDB_HAS_MTE must only be set if GDB supports the aarch64 arch, so the
test if "aarch64" string is present must be against GDB-related
'$gdb_arches' variable and not against '$arch' variable.
Signed-off-by: Gustavo Romero
---
configure | 2 +-
1 file changed, 1 ins
Hi Richard,
On 7/24/24 7:14 AM, Richard Henderson wrote:
On 7/23/24 02:07, Gustavo Romero wrote:
+ /* Find out the current translation regime for probe. */
+ mmu_index = arm_mmu_idx(env) & ARM_MMU_IDX_COREIDX_MASK;
The official interface is cpu_mmu_index().
Otherwise,
Reviewe
--test-args v0="string" v1=10
The 'v0' and 'v1' variables will then be available in the GDB test
script, like this:
print(v0)
print(v1)
Signed-off-by: Gustavo Romero
---
tests/guest-debug/run-test.py | 4
1 file changed, 4 insertions(+)
diff --git a/tests/guest-d
Gustavo
[0] https://sourceware.org/pipermail/gdb-patches/2024-July/210584.html
[1] https://github.com/gromero/binutils-gdb/tree/mte_baremetal
Gustavo Romero (4):
gdbstub: Use specific MMU index when probing MTE addresses
gdbstub: Add support for MTE in system mode
tests/guest-debug: Support pass
lation and used for tagged
addresses.
Signed-off-by: Gustavo Romero
---
tests/tcg/aarch64/Makefile.softmmu-target | 36 +--
tests/tcg/aarch64/Makefile.target | 3 +-
tests/tcg/aarch64/gdbstub/test-mte.py | 44 +++
tests/tcg/aarch64/system/boot.S
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
---
target/arm/gdbstub64.c | 4 +---
1 file
byte), rather than the number of bits used in the address
space pointed to by ptr.
Signed-off-by: Gustavo Romero
---
target/arm/gdbstub64.c | 17 +
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/target/arm/gdbstub64.c b/target/arm/gdbstub64.c
index 2e2bc2700b
Hi Peter,
On 7/16/24 11:09 AM, Peter Maydell wrote:
On Tue, 16 Jul 2024 at 14:48, Alex Bennée wrote:
Gustavo Romero writes:
Hi Alex,
On 7/16/24 8:42 AM, Alex Bennée wrote:
Coverity reported a memory leak (CID 1549757) in this code and its
admittedly rather clumsy handling of extending
Odaki
Cc: Gustavo Bueno Romero
Cc: Peter Maydell
Signed-off-by: Alex Bennée
Reviewed-by: Gustavo Romero
Cheers,
Gustavo
can lift that definition and switch to the new naming once our
supported distros have Capstone v6 in place.
Signed-off-by: Gustavo Romero
Suggested-by: Peter Maydell
---
include/disas/capstone.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/include/disas/capstone.h b/include/disas
Hi Richard,
On 6/28/24 2:00 PM, Richard Henderson wrote:
On 6/28/24 08:49, Gustavo Romero wrote:
I thought you meant osdep.h should not be included _at all_ in my case, either
in mte_user_helper.h or in mte_user_helper.c. Maybe the wording in the docs
should be "Do not include "qe
Hi Phil,
On 6/28/24 4:08 AM, Philippe Mathieu-Daudé wrote:
On 28/6/24 07:08, Gustavo Romero wrote:
Factor out the code used for setting the MTE TCF0 field from the prctl
code into a convenient function. Other subsystems, like gdbstub, need to
set this field as well, so keep it as a separate
Hi Alex,
On 6/28/24 9:14 AM, Alex Bennée wrote:
Gustavo Romero writes:
Factor out the code used for setting the MTE TCF0 field from the prctl
code into a convenient function. Other subsystems, like gdbstub, need to
set this field as well, so keep it as a separate function to avoid
Make gdb_hextomem non-internal so it's not confined to use only in
gdbstub.c.
Signed-off-by: Gustavo Romero
Reviewed-by: Richard Henderson
---
gdbstub/internals.h| 1 -
include/gdbstub/commands.h | 6 ++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/gd
Add tests to exercise the MTE stubs. The tests will only run if a
version of GDB that supports MTE is available in the test environment.
Signed-off-by: Gustavo Romero
---
configure | 4 ++
tests/tcg/aarch64/Makefile.target | 14 +++-
tests/tcg/aarch64/gdbstub
Allow passing the current CPU context to command handlers via user_ctx
when the handler requires it.
Signed-off-by: Alex Bennée
Signed-off-by: Gustavo Romero
---
gdbstub/gdbstub.c | 7 ++-
include/gdbstub/commands.h | 3 +++
2 files changed, 9 insertions(+), 1 deletion(-)
diff
If page in 'ptr_access' is inaccessible and probe is 'true'
allocation_tag_mem_probe should not throw an exception, but currently it
does, so fix it.
Signed-off-by: Gustavo Romero
Reviewed-by: Alex Bennée
Reviewed-by: Richard Henderson
---
target/arm/tcg/mte_helper.c | 3
cmd_startswith is a boolean so use 'true' to set it instead of 1.
Signed-off-by: Gustavo Romero
---
gdbstub/gdbstub.c | 80 +++
1 file changed, 40 insertions(+), 40 deletions(-)
diff --git a/gdbstub/gdbstub.c b/gdbstub/gdbstub.c
index
-off-by: Gustavo Romero
---
linux-user/aarch64/meson.build | 2 ++
linux-user/aarch64/mte_user_helper.c | 34
linux-user/aarch64/mte_user_helper.h | 25
linux-user/aarch64/target_prctl.h| 22 ++
4 files changed, 63
faces
to extend the qSupported string, the query handler table, and the set
handler table, allowing target-specific stub implementations.
Signed-off-by: Gustavo Romero
Reviewed-by: Alex Bennée
---
gdbstub/gdbstub.c | 102 ++---
include/gdbstub/commands.h
Make the MTE helpers allocation_tag_mem_probe, load_tag1, and store_tag1
available to other subsystems.
Signed-off-by: Gustavo Romero
Reviewed-by: Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé
---
target/arm/tcg/mte_helper.c | 45 -
target/arm/tcg/mte_helper.h
d to control the MTE fault type at runtime.
Signed-off-by: Gustavo Romero
---
configs/targets/aarch64-linux-user.mak | 2 +-
gdb-xml/aarch64-mte.xml| 11 ++
target/arm/cpu.c | 1 +
target/arm/gdbstub.c | 46 +
ta
commit also makes gdb_put_packet public since is used in gdbstub
command handling.
Signed-off-by: Gustavo Romero
Reviewed-by: Alex Bennée
---
gdbstub/gdbstub.c | 134 ++---
gdbstub/internals.h| 22 --
gdbstub/syscalls.c | 7 +-
gdbstub
Hi Phil,
On 6/27/24 3:05 AM, Philippe Mathieu-Daudé wrote:
On 27/6/24 06:13, Gustavo Romero wrote:
Factor out the code used for setting the MTE TCF0 field from the prctl
code into a convenient function. Other subsystems, like gdbstub, need to
set this field as well, so keep it as a separate
Change 'process_string_cmd' to return true on success and false on
failure, instead of 0 and -1.
Signed-off-by: Gustavo Romero
Reviewed-by: Alex Bennée
Reviewed-by: Richard Henderson
---
gdbstub/gdbstub.c | 40
1 file changed, 20 inserti
arch64 targets (Alex's
suggestion)
v6:
- Remove dead code (Phil's review)
- Pass CPU context via user_ctx (Phil and Alex's review)
- Cleanup: in gdbstub.c use 'true' to set startswith instead of 1
Cheers,
Gustavo
Gustavo Romero (11):
gdbstub: Clean up process_string_cm
Hi Phil, Alex,
On 6/27/24 9:26 AM, Philippe Mathieu-Daudé wrote:
On 27/6/24 13:05, Alex Bennée wrote:
Philippe Mathieu-Daudé writes:
On 27/6/24 06:13, Gustavo Romero wrote:
Make the gdb_first_attached_cpu and gdb_hextomem non-internal so they
are not confined to use only in gdbstub.c
Hi Phil,
On 6/27/24 3:02 AM, Philippe Mathieu-Daudé wrote:
On 27/6/24 06:13, Gustavo Romero wrote:
Move GdbCmdParseEntry and its associated types into a separate header
file to allow the use of GdbCmdParseEntry and other gdbstub command
functions outside of gdbstub.c.
Since GdbCmdParseEntry
Hi Phil, Richard
On 6/24/24 4:47 AM, Philippe Mathieu-Daudé wrote:
Hi Gustavo,
On 24/6/24 07:30, Gustavo Romero wrote:
Make the MTE helpers allocation_tag_mem_probe, load_tag1, and store_tag1
available to other subsystems.
Again, you can make them available externally by removing the
static
commit also makes gdb_put_packet public since is used in gdbstub
command handling.
Signed-off-by: Gustavo Romero
Reviewed-by: Alex Bennée
---
gdbstub/gdbstub.c | 134 ++---
gdbstub/internals.h| 22 --
gdbstub/syscalls.c | 7 +-
gdbstub
faces
to extend the qSupported string, the query handler table, and the set
handler table, allowing target-specific stub implementations.
Signed-off-by: Gustavo Romero
Reviewed-by: Alex Bennée
---
gdbstub/gdbstub.c | 102 ++---
include/gdbstub/commands.h
Make the gdb_first_attached_cpu and gdb_hextomem non-internal so they
are not confined to use only in gdbstub.c.
Signed-off-by: Gustavo Romero
Reviewed-by: Richard Henderson
---
gdbstub/internals.h| 2 --
include/exec/gdbstub.h | 5 +
include/gdbstub/commands.h | 6 ++
3
Make the MTE helpers allocation_tag_mem_probe, load_tag1, and store_tag1
available to other subsystems.
Signed-off-by: Gustavo Romero
Reviewed-by: Richard Henderson
---
target/arm/tcg/mte_helper.c | 45 -
target/arm/tcg/mte_helper.h | 66
-off-by: Gustavo Romero
---
linux-user/aarch64/meson.build | 2 ++
linux-user/aarch64/mte_user_helper.c | 34
linux-user/aarch64/mte_user_helper.h | 25
linux-user/aarch64/target_prctl.h| 22 ++
4 files changed, 63
If page in 'ptr_access' is inaccessible and probe is 'true'
allocation_tag_mem_probe should not throw an exception, but currently it
does, so fix it.
Signed-off-by: Gustavo Romero
Reviewed-by: Alex Bennée
Reviewed-by: Richard Henderson
---
target/arm/tcg/mte_helper.c | 3
er/aarch64/ and include it from
gdbstub64.c (Richard's review)
v5:
- Made load_tag1, store_tag1, and arm_set_mte_tcf0 non-inlined for code
modularity (Phil's review)
- MTE tests: GDB_HAS_MTE is now only set for aarch64 targets (Alex's
suggestion)
Cheers,
Gustavo
Gustav
Add tests to exercise the MTE stubs. The tests will only run if a
version of GDB that supports MTE is available in the test environment.
Signed-off-by: Gustavo Romero
---
configure | 4 ++
tests/tcg/aarch64/Makefile.target | 14 +++-
tests/tcg/aarch64/gdbstub
d to control the MTE fault type at runtime.
Signed-off-by: Gustavo Romero
---
configs/targets/aarch64-linux-user.mak | 2 +-
gdb-xml/aarch64-mte.xml| 11 ++
target/arm/cpu.c | 1 +
target/arm/gdbstub.c | 46 ++
ta
Change 'process_string_cmd' to return true on success and false on
failure, instead of 0 and -1.
Signed-off-by: Gustavo Romero
Reviewed-by: Alex Bennée
Reviewed-by: Richard Henderson
---
gdbstub/gdbstub.c | 40
1 file changed, 20 inserti
Hi Peter,
On 6/24/24 10:27 AM, Peter Maydell wrote:
On Fri, 21 Jun 2024 at 15:39, Gustavo Romero wrote:
Enable FEAT_Debugv8p8 for max CPU. This feature is out of scope for QEMU
since it concerns the external debug interface for JTAG, but is
mandatory in Armv8.8 implementations, hence it is
Hi Peter!
On 6/24/24 10:26 AM, Peter Maydell wrote:
On Fri, 21 Jun 2024 at 15:39, Gustavo Romero wrote:
Move the initialization of the debug ID registers to aa32_max_features,
which is used to set the 32-bit ID registers. This ensures that the
debug ID registers are consistently set for the
Enable FEAT_Debugv8p8 for max CPU. This feature is out of scope for QEMU
since it concerns the external debug interface for JTAG, but is
mandatory in Armv8.8 implementations, hence it is reported as supported
in the ID registers.
Signed-off-by: Gustavo Romero
Reviewed-by: Richard Henderson
Enable FEAT_Debugv8p8 on Arm max CPU.
v2:
- Revert to the original comment above call to aa32_max_features()
v3:
- Added feature entry to docs/system/arm/emulation.rst
- Explicitly set t=0 before using it to set DBGDEVID reg.
- Put indent fix in a separate patch
Cheers,
Gustavo
Gustavo
Fix comment indentation adding a missing space.
Signed-off-by: Gustavo Romero
Reviewed-by: Richard Henderson
---
target/arm/tcg/cpu64.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/arm/tcg/cpu64.c b/target/arm/tcg/cpu64.c
index 0899251eef..71e1bfcd4e 100644
--- a
Move the initialization of the debug ID registers to aa32_max_features,
which is used to set the 32-bit ID registers. This ensures that the
debug ID registers are consistently set for the max CPU in a single
place.
Signed-off-by: Gustavo Romero
Reviewed-by: Richard Henderson
---
target/arm
Hi Alex,
On 6/17/24 6:50 AM, Alex Bennée wrote:
Gustavo Romero writes:
Hi Alex,
On 6/14/24 12:49 PM, Alex Bennée wrote:
Gustavo Romero writes:
This patchset adds the stubs necessary to support GDB memory tagging
commands on QEMU aarch64 user mode.
These new stubs handle the
Hi Richard,
On 6/21/24 1:35 AM, Richard Henderson wrote:
On 6/16/24 23:28, Gustavo Romero wrote:
Factor out the code used for setting the MTE TCF0 field from the prctl
code into a convenient function. Other subsystems, like gdbstub, need to
set this field as well, so keep it as a separate
Hi Richard,
On 6/21/24 1:31 AM, Richard Henderson wrote:
On 6/16/24 23:28, Gustavo Romero wrote:
@@ -287,7 +256,7 @@ uint64_t HELPER(addsubg)(CPUARMState *env, uint64_t ptr,
return address_with_allocation_tag(ptr + offset, rtag);
}
-static int load_tag1(uint64_t ptr, uint8_t *mem
Hi Alex,
On 6/21/24 5:11 AM, Alex Bennée wrote:
Gustavo Romero writes:
Currently, it's not possible to have stubs specific to a given target,
even though there are GDB features which are target-specific, like, for
instance, memory tagging.
This commit intro
commit also makes gdb_put_packet public since is used in gdbstub
command handling.
Signed-off-by: Gustavo Romero
Reviewed-by: Alex Bennée
---
gdbstub/gdbstub.c | 134 ++---
gdbstub/internals.h| 22 --
gdbstub/syscalls.c | 7 +-
gdbstub
-off-by: Gustavo Romero
---
linux-user/aarch64/mte_user_helper.h | 38
linux-user/aarch64/target_prctl.h| 22 ++--
2 files changed, 40 insertions(+), 20 deletions(-)
create mode 100644 linux-user/aarch64/mte_user_helper.h
diff --git a/linux-user/aarch64
Make the gdb_first_attached_cpu and gdb_hextomem non-internal so they
are not confined to use only in gdbstub.c.
Signed-off-by: Gustavo Romero
Reviewed-by: Richard Henderson
---
gdbstub/internals.h| 2 --
include/exec/gdbstub.h | 5 +
include/gdbstub/commands.h | 6 ++
3
faces
to extend the qSupported string, the query handler table, and the set
handler table, allowing target-specific stub implementations.
Signed-off-by: Gustavo Romero
Reviewed-by: Alex Bennée
---
gdbstub/gdbstub.c | 102 ++---
include/gdbstub/commands.h
d to control the MTE fault type at runtime.
Signed-off-by: Gustavo Romero
---
configs/targets/aarch64-linux-user.mak | 2 +-
gdb-xml/aarch64-mte.xml| 11 ++
target/arm/cpu.c | 1 +
target/arm/gdbstub.c | 46 ++
ta
Make the MTE helpers allocation_tag_mem_probe, load_tag1, and store_tag1
available to other subsystems.
Signed-off-by: Gustavo Romero
Reviewed-by: Richard Henderson
---
target/arm/tcg/mte_helper.c | 54 +++
target/arm/tcg/mte_helper.h | 74
Add tests to exercise the MTE stubs. The tests will only run if a
version of GDB that supports MTE is available in the test environment.
Signed-off-by: Gustavo Romero
---
configure | 11 +++
tests/tcg/aarch64/Makefile.target | 14 +++-
tests/tcg/aarch64/gdbstub
Change 'process_string_cmd' to return true on success and false on
failure, instead of 0 and -1.
Signed-off-by: Gustavo Romero
Reviewed-by: Alex Bennée
Reviewed-by: Richard Henderson
---
gdbstub/gdbstub.c | 40
1 file changed, 20 inserti
review)
- Added g_assert()s in new gdb_extend_* API functions to ensure all CPUs have
the same features/query/set tables (Alex's review)
- Move load_tag1 and store_tag1 to mte_helpers.h marking them as "static
inline" (Richard's review)
- Move mte_user_helper
If page in 'ptr_access' is inaccessible and probe is 'true'
allocation_tag_mem_probe should not throw an exception, but currently it
does, so fix it.
Signed-off-by: Gustavo Romero
Reviewed-by: Alex Bennée
Reviewed-by: Richard Henderson
---
target/arm/tcg/mte_helper.c | 3
1 - 100 of 211 matches
Mail list logo