[PULL 24/29] plugins: remove non per_vcpu inline operation from API

2024-03-06 Thread Alex Bennée
on a scoreboard. API version bump was already done as part of this series. Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Pierrick Bouvier Message-Id: <20240304130036.124418-12-pierrick.bouv...@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20240305121005.3528075-25

[PULL 07/29] {linux,bsd}-user: Pass pid to gdbserver_fork()

2024-03-06 Thread Alex Bennée
From: Ilya Leoshkevich The upcoming follow-fork-mode child support requires knowing the child pid. Pass it down. Reviewed-by: Richard Henderson Signed-off-by: Ilya Leoshkevich Message-Id: <20240219141628.246823-7-...@linux.ibm.com> Signed-off-by: Alex Bennée Mess

[PULL 01/29] tests: bump QOS_PATH_MAX_ELEMENT_SIZE again

2024-03-06 Thread Alex Bennée
all nodes on the graph. So it's not really LTO, it depends on the ordering of the constructors. Lets be more assertive raising QOS_PATH_MAX_ELEMENT_SIZE to make it go away again. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1186 (again) Reviewed-by: Thomas Huth Signed-off-by: Alex Bennée

[PULL 05/29] gdbstub: Introduce gdbserver_fork_start()

2024-03-06 Thread Alex Bennée
From: Ilya Leoshkevich The upcoming follow-fork-mode child support requires knowing when fork() is about to happen in order to initialize its state. Add a hook for that. Reviewed-by: Alex Bennée Signed-off-by: Ilya Leoshkevich Message-Id: <20240219141628.246823-5-...@linux.ibm.com> Sign

[PULL 02/29] gdbstub: Support disablement in a multi-threaded process

2024-03-06 Thread Alex Bennée
into a separate function. Reviewed-by: Alex Bennée Reviewed-by: Richard Henderson Signed-off-by: Ilya Leoshkevich Message-Id: <20240219141628.246823-2-...@linux.ibm.com> Signed-off-by: Alex Bennée Message-Id: <20240305121005.3528075-3-alex.ben...@linaro.org> diff --git a/gdbstub/user.c b/gd

[PULL 11/29] gdbstub: Introduce gdb_handle_detach_user()

2024-03-06 Thread Alex Bennée
com> Signed-off-by: Alex Bennée Message-Id: <20240305121005.3528075-12-alex.ben...@linaro.org> diff --git a/gdbstub/internals.h b/gdbstub/internals.h index b4905c7181a..b4724598384 100644 --- a/gdbstub/internals.h +++ b/gdbstub/internals.h @@ -198,6 +198,7 @@ void gdb_handle_query_xfer_exec

[PULL 03/29] {linux,bsd}-user: Introduce get_task_state()

2024-03-06 Thread Alex Bennée
From: Ilya Leoshkevich A CPU's TaskState is stored in the CPUState's void *opaque field, accessing which is somewhat awkward due to having to use a cast. Introduce a wrapper and use it everywhere. Suggested-by: Alex Bennée Signed-off-by: Ilya Leoshkevich Reviewed-by: Warner Losh Reviewed

[PULL 16/29] plugins: implement inline operation relative to cpu_index

2024-03-06 Thread Alex Bennée
is not modified, thus inline operation still targets always the same memory location. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Message-Id: <20240304130036.124418-4-pierrick.bouv...@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20240305121005.3528075-17

Re: What is the correct way to add linker dependency to QEMU build system?

2024-03-06 Thread Alex Bennée
Ls, and which on Unix hosts > are pretty much wrappers around dlopen/dlsym) then you > don't need to link against libdl at all. > > If this is for something you're planning to upstream > then it might be worth talking at a higher level about > what you're aiming to do. (If it's

Re: [PATCH v7 2/2] hw/acpi: Implement the SRAT GI affinity structure

2024-03-05 Thread Alex Williamson
e use for the > acpi-generic-initiator object. > >-numa node,nodeid=2 >-device vfio-pci-nohotplug,bus=pcie.0,addr=04.0,rombar=0,id=dev0 \ >-object acpi-generic-initiator,id=gi0,pci-dev=dev0,node=2 \ > > Moreover based on a quick grep, I don't see any oth

[RFC PATCH] plugins: filter out the PC from the register list

2024-03-05 Thread Alex Bennée
about the register access and calling out the behaviour of the PC. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2208 Signed-off-by: Alex Bennée --- docs/devel/tcg-plugins.rst | 15 +++ plugins/api.c | 5 + 2 files changed, 20 insertions(+) diff --git

Any interest in the QEMU community attending DVCon Europe October 2024?

2024-03-05 Thread Alex Bennée
nterested. So is anyone interested? Should we do more within the community to network and discuss our plans for QEMU as a modelling solution? Any other thoughts? -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH] hw/intc/apic: fix memory leak

2024-03-05 Thread Alex Bennée
Do the same in apic_deliver_irq() as well > for consistency. > > Fixes: b5ee0468e9d ("apic: add support for x2APIC mode", 2024-02-14) > Signed-off-by: Paolo Bonzini Reviewed-by: Alex Bennée -- Alex Bennée Virtualisation Tech Lead @ Linaro

[PATCH 24/29] plugins: remove non per_vcpu inline operation from API

2024-03-05 Thread Alex Bennée
on a scoreboard. API version bump was already done as part of this series. Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Pierrick Bouvier Message-Id: <20240304130036.124418-12-pierrick.bouv...@linaro.org> Signed-off-by: Alex Bennée --- include/qemu/qemu-plugin.h

[PATCH 19/29] tests/plugin/mem: migrate to new per_vcpu API

2024-03-05 Thread Alex Bennée
From: Pierrick Bouvier Reviewed-by: Luc Michel Signed-off-by: Pierrick Bouvier Message-Id: <20240304130036.124418-7-pierrick.bouv...@linaro.org> Signed-off-by: Alex Bennée --- tests/plugin/mem.c| 46 ++- tests/tcg/Makefile.target | 2 +- 2

[PATCH 21/29] tests/plugin/bb: migrate to new per_vcpu API

2024-03-05 Thread Alex Bennée
From: Pierrick Bouvier Reviewed-by: Luc Michel Reviewed-by: Alex Bennée Signed-off-by: Pierrick Bouvier Message-Id: <20240304130036.124418-9-pierrick.bouv...@linaro.org> Signed-off-by: Alex Bennée --- tests/plugin/bb.c | 63 +++ 1 file chang

[PATCH 28/29] target/loongarch: honour show_opcodes when disassembling

2024-03-05 Thread Alex Bennée
This makes the output suitable when used for plugins. Signed-off-by: Alex Bennée --- target/loongarch/disas.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/target/loongarch/disas.c b/target/loongarch/disas.c index 2040f3e44db..63989a6282d 100644 --- a/target

[PATCH 20/29] tests/plugin/insn: migrate to new per_vcpu API

2024-03-05 Thread Alex Bennée
From: Pierrick Bouvier Reviewed-by: Luc Michel Signed-off-by: Pierrick Bouvier Message-Id: <20240304130036.124418-8-pierrick.bouv...@linaro.org> Signed-off-by: Alex Bennée --- tests/plugin/insn.c | 106 +--- 1 file changed, 50 insertions(

[PATCH 27/29] disas/hppa: honour show_opcodes

2024-03-05 Thread Alex Bennée
Signed-off-by: Alex Bennée --- disas/hppa.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/disas/hppa.c b/disas/hppa.c index 22dce9b41bb..49e2231ae62 100644 --- a/disas/hppa.c +++ b/disas/hppa.c @@ -1972,9 +1972,11 @@ print_insn_hppa (bfd_vma memaddr

[PATCH 22/29] contrib/plugins/hotblocks: migrate to new per_vcpu API

2024-03-05 Thread Alex Bennée
From: Pierrick Bouvier Signed-off-by: Pierrick Bouvier Message-Id: <20240304130036.124418-10-pierrick.bouv...@linaro.org> Signed-off-by: Alex Bennée --- contrib/plugins/hotblocks.c | 50 ++--- 1 file changed, 30 insertions(+), 20 deletions(-) diff

[PATCH 25/29] plugins: cleanup codepath for previous inline operation

2024-03-05 Thread Alex Bennée
From: Pierrick Bouvier Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Signed-off-by: Pierrick Bouvier Message-Id: <20240304130036.124418-13-pierrick.bouv...@linaro.org> Signed-off-by: Alex Bennée --- plugins/plugin.h | 5 - accel/tcg/plugin-gen.

[PATCH 18/29] tests/plugin: add test plugin for inline operations

2024-03-05 Thread Alex Bennée
are treated in different plugins. Thus, this new one. Reviewed-by: Alex Bennée Signed-off-by: Pierrick Bouvier Message-Id: <20240304130036.124418-6-pierrick.bouv...@linaro.org> Signed-off-by: Alex Bennée --- tests/plugin/inline.c| 186 +++ tests/

[PATCH 29/29] target/riscv: honour show_opcodes when disassembling

2024-03-05 Thread Alex Bennée
This makes the output suitable when used for plugins. Signed-off-by: Alex Bennée --- disas/riscv.c | 28 +++- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/disas/riscv.c b/disas/riscv.c index 8a546d5ea53..9dec8fa966f 100644 --- a/disas/riscv.c +++ b

[PATCH 26/29] disas: introduce show_opcodes

2024-03-05 Thread Alex Bennée
For plugins we don't expect the raw opcodes in the disassembly. We already deal with this by hand crafting our capstone call but for other diassemblers we need a flag. Introduce show_opcodes which defaults to off. Signed-off-by: Alex Bennée --- include/disas/dis-asm.h | 8 disas

[PATCH 06/29] {linux,bsd}-user: Pass pid to fork_end()

2024-03-05 Thread Alex Bennée
From: Ilya Leoshkevich The upcoming follow-fork-mode child support requires knowing the child pid. Pass it down. Reviewed-by: Alex Bennée Reviewed-by: Richard Henderson Signed-off-by: Ilya Leoshkevich Message-Id: <20240219141628.246823-6-...@linux.ibm.com> Signed-off-by: Alex

[PATCH 23/29] contrib/plugins/howvec: migrate to new per_vcpu API

2024-03-05 Thread Alex Bennée
From: Pierrick Bouvier Reviewed-by: Alex Bennée Tested-by: Alex Bennée Signed-off-by: Pierrick Bouvier Message-Id: <20240304130036.124418-11-pierrick.bouv...@linaro.org> Signed-off-by: Alex Bennée --- contrib/plugins/howvec.c | 53 1 file chang

[PATCH 10/29] gdbstub: Introduce gdb_handle_set_thread_user()

2024-03-05 Thread Alex Bennée
-10-...@linux.ibm.com> Signed-off-by: Alex Bennée --- gdbstub/internals.h | 1 + gdbstub/gdbstub.c | 11 +-- gdbstub/user.c | 5 + 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/gdbstub/internals.h b/gdbstub/internals.h index e6063835b1f..b4905c7181a 100644 --- a/g

[PATCH 09/29] gdbstub: Introduce gdb_handle_query_supported_user()

2024-03-05 Thread Alex Bennée
3-9-...@linux.ibm.com> Signed-off-by: Alex Bennée --- gdbstub/internals.h | 1 + gdbstub/gdbstub.c | 12 +--- gdbstub/user.c | 4 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/gdbstub/internals.h b/gdbstub/internals.h index 56b7c13b750..e6063835b1f 100644 --- a/g

[PATCH 08/29] gdbstub: Call gdbserver_fork() both in parent and in child

2024-03-05 Thread Alex Bennée
-by: Ilya Leoshkevich Message-Id: <20240219141628.246823-8-...@linux.ibm.com> Signed-off-by: Alex Bennée --- include/gdbstub/user.h | 5 +++-- bsd-user/main.c| 3 ++- gdbstub/user.c | 5 ++--- linux-user/main.c | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff

[PATCH 15/29] plugins: define qemu_plugin_u64

2024-03-05 Thread Alex Bennée
macros: - qemu_plugin_scoreboard_u64 - qemu_plugin_scoreboard_u64_in_struct Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Message-Id: <20240304130036.124418-3-pierrick.bouv...@linaro.org> Signed-off-by: Alex Bennée --- include/qemu/qemu-plugin.h

[PATCH 17/29] plugins: add inline operation per vcpu

2024-03-05 Thread Alex Bennée
From: Pierrick Bouvier Extends API with three new functions: qemu_plugin_register_vcpu_{tb, insn, mem}_exec_inline_per_vcpu(). Those functions takes a qemu_plugin_u64 as input. This allows to have a thread-safe and type-safe version of inline operations. Reviewed-by: Alex Bennée Reviewed

[PATCH 16/29] plugins: implement inline operation relative to cpu_index

2024-03-05 Thread Alex Bennée
is not modified, thus inline operation still targets always the same memory location. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Message-Id: <20240304130036.124418-4-pierrick.bouv...@linaro.org> Signed-off-by: Alex Bennée --- plugins/plugin.h | 2 +- accel/tcg/

[PATCH 07/29] {linux,bsd}-user: Pass pid to gdbserver_fork()

2024-03-05 Thread Alex Bennée
From: Ilya Leoshkevich The upcoming follow-fork-mode child support requires knowing the child pid. Pass it down. Reviewed-by: Richard Henderson Signed-off-by: Ilya Leoshkevich Message-Id: <20240219141628.246823-7-...@linux.ibm.com> Signed-off-by: Alex Bennée --- include/gdbstub/user

[PATCH 01/29] tests: bump QOS_PATH_MAX_ELEMENT_SIZE again

2024-03-05 Thread Alex Bennée
all nodes on the graph. So it's not really LTO, it depends on the ordering of the constructors. Lets be more assertive raising QOS_PATH_MAX_ELEMENT_SIZE to make it go away again. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1186 (again) Reviewed-by: Thomas Huth Signed-off-by: Alex Bennée

[PATCH 14/29] plugins: scoreboard API

2024-03-05 Thread Alex Bennée
-by: Richard Henderson Signed-off-by: Pierrick Bouvier Message-Id: <20240304130036.124418-2-pierrick.bouv...@linaro.org> Signed-off-by: Alex Bennée --- include/qemu/plugin.h| 6 include/qemu/qemu-plugin.h | 31 plugins/plugin.h | 6 plugins

[PATCH 13/29] tests/tcg: Add two follow-fork-mode tests

2024-03-05 Thread Alex Bennée
ed-off-by: Alex Bennée --- tests/tcg/multiarch/follow-fork-mode.c| 56 +++ tests/tcg/multiarch/Makefile.target | 17 +- .../gdbstub/follow-fork-mode-child.py | 40 + .../gdbstub/follow-fork-mode-parent.py| 16 ++ 4 files change

[PATCH 11/29] gdbstub: Introduce gdb_handle_detach_user()

2024-03-05 Thread Alex Bennée
com> Signed-off-by: Alex Bennée --- gdbstub/internals.h | 1 + gdbstub/gdbstub.c | 6 ++ gdbstub/user.c | 5 + 3 files changed, 12 insertions(+) diff --git a/gdbstub/internals.h b/gdbstub/internals.h index b4905c7181a..b4724598384 100644 --- a/gdbstub/internals.h +++ b/g

[PATCH 02/29] gdbstub: Support disablement in a multi-threaded process

2024-03-05 Thread Alex Bennée
into a separate function. Reviewed-by: Alex Bennée Reviewed-by: Richard Henderson Signed-off-by: Ilya Leoshkevich Message-Id: <20240219141628.246823-2-...@linux.ibm.com> Signed-off-by: Alex Bennée --- gdbstub/user.c | 19 +++ 1 file changed, 15 insertions(+), 4 deletions(-) diff

[PATCH 05/29] gdbstub: Introduce gdbserver_fork_start()

2024-03-05 Thread Alex Bennée
From: Ilya Leoshkevich The upcoming follow-fork-mode child support requires knowing when fork() is about to happen in order to initialize its state. Add a hook for that. Reviewed-by: Alex Bennée Signed-off-by: Ilya Leoshkevich Message-Id: <20240219141628.246823-5-...@linux.ibm.com> Sign

[PATCH 00/29] maintainer/next for 9.0 (testing, gdbstub, plugins, disas)

2024-03-05 Thread Alex Bennée
for this rolled later this week. Alex. Alex Bennée (5): tests: bump QOS_PATH_MAX_ELEMENT_SIZE again disas: introduce show_opcodes disas/hppa: honour show_opcodes target/loongarch: honour show_opcodes when disassembling target/riscv: honour show_opcodes when disassembling Ilya Leoshkevich

[PATCH 12/29] gdbstub: Implement follow-fork-mode child

2024-03-05 Thread Alex Bennée
: <20240219141628.246823-12-...@linux.ibm.com> Signed-off-by: Alex Bennée --- gdbstub/user.c | 212 - 1 file changed, 210 insertions(+), 2 deletions(-) diff --git a/gdbstub/user.c b/gdbstub/user.c index 1a7b582a40d..7f9f19a1249 100644 --- a/gdbstub/

[PATCH 04/29] {linux,bsd}-user: Update ts_tid after fork()

2024-03-05 Thread Alex Bennée
From: Ilya Leoshkevich Currently ts_tid contains the parent tid after fork(), which is not correct. So far it has not affected anything, but the upcoming follow-fork-mode child support relies on the correct value, so fix it. Reviewed-by: Alex Bennée Signed-off-by: Ilya Leoshkevich Reviewed

[PATCH 03/29] {linux,bsd}-user: Introduce get_task_state()

2024-03-05 Thread Alex Bennée
From: Ilya Leoshkevich A CPU's TaskState is stored in the CPUState's void *opaque field, accessing which is somewhat awkward due to having to use a cast. Introduce a wrapper and use it everywhere. Suggested-by: Alex Bennée Signed-off-by: Ilya Leoshkevich Reviewed-by: Warner Losh Reviewed

KVM/QEMU Community Call 5th March Agenda Items

2024-03-05 Thread Alex Bennée
=MWd2dWI5NDM1bzdocnJlbTBhMHJhbG5sNWlfMjAyNDAyMjBUMTQwMDAwWiBjX2s1cDJscGd2YnB0ZGlya3U1c2kwMWJsbW5rQGc=c_k5p2lpgvbptdirku5si01blmnk%40group.calendar.google.com=ALL If you want to be added to the invite list let me know and you can get spammed by your calendar app as well ;-) -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: Why does the vmovdqu works for passthrough device but crashes for emulated device with "illegal operand" error (in x86_64 QEMU, -accel = kvm) ?

2024-03-04 Thread Alex Williamson
ce either. So I also wouldn't rule out that the program isn't inherently misbehaving by using memcpy() and thereby ignoring the nature of the device MMIO access semantics. Thanks, Alex [1]https://bugs.launchpad.net/qemu/+bug/1384892

Re: [PATCH 0/2] Fix CI build on Free BSD 13

2024-03-04 Thread Alex Bennée
way we need to update to 13.3 > > This exposed a clang bug so needs a workaround adding too. Queued to testing/next, thanks. -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH v2] docs/conf.py: Remove usage of distutils

2024-03-04 Thread Alex Bennée
eck now to get rid of the > distutils dependency here. > > Signed-off-by: Thomas Huth Queued to testing/next, thanks. -- Alex Bennée Virtualisation Tech Lead @ Linaro

[RFC PATCH] tests: bump QOS_PATH_MAX_ELEMENT_SIZE again

2024-03-04 Thread Alex Bennée
in) Signed-off-by: Alex Bennée --- tests/qtest/libqos/qgraph.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qtest/libqos/qgraph.h b/tests/qtest/libqos/qgraph.h index 287022a67c1..1b5de02e7be 100644 --- a/tests/qtest/libqos/qgraph.h +++ b/tests/qtest/libqos/qgraph.h @@ -

[PATCH 4/4] target/riscv: honour no_raw_bytes when disassembling

2024-03-04 Thread Alex Bennée
This makes the output suitable when used for plugins. Signed-off-by: Alex Bennée --- disas/riscv.c | 28 +++- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/disas/riscv.c b/disas/riscv.c index 8a546d5ea53..86028efea85 100644 --- a/disas/riscv.c +++ b

[PATCH 3/4] target/loongarch: honour no_raw_bytes when disassembling

2024-03-04 Thread Alex Bennée
This makes the output suitable when used for plugins. Signed-off-by: Alex Bennée --- target/loongarch/disas.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/target/loongarch/disas.c b/target/loongarch/disas.c index 2040f3e44db..b9118878d97 100644 --- a/target

[PATCH 1/4] disas: introduce no_raw_bytes

2024-03-04 Thread Alex Bennée
For plugins we don't expect the raw bytes in the disassembly. We already deal with this by hand crafting our capstone call but for other diassemblers we need a flag. Signed-off-by: Alex Bennée --- include/disas/dis-asm.h | 7 +++ disas/disas.c | 1 + 2 files changed, 8 insertions

[PATCH 2/4] disas/hppa: honour no_raw_bytes

2024-03-04 Thread Alex Bennée
Signed-off-by: Alex Bennée --- disas/hppa.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/disas/hppa.c b/disas/hppa.c index 22dce9b41bb..17e4f1ccdc6 100644 --- a/disas/hppa.c +++ b/disas/hppa.c @@ -1972,9 +1972,11 @@ print_insn_hppa (bfd_vma memaddr

[PATCH 0/4 for 9.0] Clean-up disassembler handling for plugins

2024-03-04 Thread Alex Bennée
I was overly optimistic with my last RFC that HPPA was the only affected architecture by this issue. I've introduced a new flag in disassemble_info and fixed up those arches that include raw bytes by default. It would be nice to get this in for 9.0 Alex. Alex Bennée (4): disas: introduce

Re: [PATCH] tests/tcg/multiarch: Give the 'memory' TCG test a larger timeout

2024-03-04 Thread Alex Bennée
>> # 90swith --enable-tcg-interpreter >> -TIMEOUT=90 >> +# The 'memory' test in particular is very slow under TCI. >> +TIMEOUT=180 >> >> ifeq ($(filter %-softmmu, $(TARGET)),) >> # The order we include is important. We include multiarch first and >> -- -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH v7 00/12] TCG Plugin inline operation enhancement

2024-03-04 Thread Alex Bennée
an > efficient and elegant way, by combining inline operation and conditional > callbacks. Queued to plugins/next, thanks. -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH v4 00/12] gdbstub: Implement follow-fork-mode child

2024-03-04 Thread Alex Bennée
01/msg06646.html > v1 -> v2: Factor out a number of prep patches; > Add a state transition diagram comment (Alex). > Improve a few comments; > Extend the ts_tid fix to bsd. > > Hi, > > I needed to debug a linux-user crash betwee

Re: [PATCH v3 01/12] util/log: convert debug_regions to GList

2024-03-04 Thread Alex Bennée
Sven Schnelle writes: > Alex Bennée writes: > >> Sven Schnelle writes: >> >>> In preparation of making the parsing part of qemu_set_dfilter_ranges() >>> available to other users, convert it to return a GList, so the result >>> can be used with o

Re: [PATCH v3 01/12] util/log: convert debug_regions to GList

2024-03-04 Thread Alex Bennée
riginally wrote the dfilter code I deliberately chose GArray over GList to avoid bouncing across cache lines during the tight loop that is checking ranges. It's not like we can't pass GArray's to plugins as well? -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [QEMU][PATCH v3 7/7] hw: arm: Add grant mapping.

2024-03-01 Thread Alex Bennée
s). > +ram_grants = *xen_init_grant_ram(); > } > > void arch_handle_ioreq(XenIOState *state, ioreq_t *req) -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [QEMU][PATCH v3 4/7] xen: let xen_ram_addr_from_mapcache() return -1 in case of not found entry

2024-03-01 Thread Alex Bennée
trace_xen_ram_addr_from_mapcache_found(reventry->paddr_index, > - reventry->vaddr_req); > -} If these tracepoints aren't useful they need removing from trace-events. However I suspect it would be better to keep them

Re: [QEMU][PATCH v3 3/7] softmmu: let qemu_map_ram_ptr() use qemu_ram_ptr_length()

2024-03-01 Thread Alex Bennée
gt; * In that case just map the requested area. > */ > if (block->offset == 0) { > -return xen_map_cache(addr, *size, lock, lock); > +return xen_map_cache(addr, len, lock, lock); I did wonder if len == 0 will confuse things but it seems xen_map_cache will default to XC_PAGE_SIZE in that case. Anyway: Reviewed-by: Alex Bennée -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PULL 26/29] contrib/plugins: extend execlog to track register changes

2024-03-01 Thread Alex Bennée
Zhao Liu writes: > On Fri, Mar 01, 2024 at 10:22:08AM +0000, Alex Bennée wrote: >> Date: Fri, 01 Mar 2024 10:22:08 + >> From: Alex Bennée >> Subject: Re: [PULL 26/29] contrib/plugins: extend execlog to track register >> changes >> >> Zhao Liu wr

Re: [PATCH v7 1/2] qom: new object to associate device to numa node

2024-03-01 Thread Alex Williamson
e interface expects. A separate ACPI device interface could be added later or derived from updating the interface to accept a generic device object. Thanks, Alex

Re: [QEMU][PATCH v3 2/7] xen: add pseudo RAM region for grant mappings

2024-03-01 Thread Alex Bennée
ere? I couldn't find anything googling or on the Xen wiki. I'm guessing this is going to be shared across all 64 bit HVM arches in Xen? Anyway: Reviewed-by: Alex Bennée -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [QEMU][PATCH v3 1/7] softmmu: physmem: Split ram_block_add()

2024-03-01 Thread Alex Bennée
m Garhwal > Reviewed-by: Stefano Stabellini Reviewed-by: Alex Bennée -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH v5 08/12] tests/plugin/bb: migrate to new per_vcpu API

2024-03-01 Thread Alex Bennée
Pierrick Bouvier writes: > On 2/29/24 6:21 PM, Alex Bennée wrote: >> Pierrick Bouvier writes: >> >>> Signed-off-by: Pierrick Bouvier >> I did notice there is a discrepancy between what libisns and libb >> report. The libb looks like an overcount so I wond

Re: [PULL 26/29] contrib/plugins: extend execlog to track register changes

2024-03-01 Thread Alex Bennée
Zhao Liu writes: > Hi Alex, > > I hit the following warnings (with "./configure --enable-werror"): > > /qemu/contrib/plugins/execlog.c: In function ‘registers_init’: > /qemu/contrib/plugins/execlog.c:330:17: warning: ‘g_pattern_match_string’ is > deprecated: U

Re: [PATCH v6 06/12] tests/plugin/mem: migrate to new per_vcpu API

2024-02-29 Thread Alex Bennée
b(id, vcpu_tb_trans); > qemu_plugin_register_atexit_cb(id, plugin_exit, NULL); > return 0; You need the following to keep check-tcg working: modified tests/tcg/Makefile.target @@ -168,7 +168,7 @@ RUN_TESTS+=$(EXTRA_RUNS) # Some plugins need additional arguments above the default to fully # exercise things. We can define them on a per-test basis here. -run-plugin-%-with-libmem.so: PLUGIN_ARGS=$(COMMA)inline=true$(COMMA)callback=true +run-plugin-%-with-libmem.so: PLUGIN_ARGS=$(COMMA)inline=true ifeq ($(filter %-softmmu, $(TARGET)),) run-%: % -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH 3/3] plugins/execlog: add address range matching

2024-02-29 Thread Alex Bennée
== token) { > +fprintf(stderr, "Invalid address(range) specified: %s\n", token); > +return; > +} > +} > + > +if (!*matches) { > +*matches = g_array_new(false, true, sizeof(struct address_match)); > } > -g_array_append_val(*matches, v); > +struct address_match *match = g_new(struct address_match, 1); > +match->low = low; > +match->high = high; > +g_array_append_val(*matches, match); This is almost but not quite qemu_set_dfilter_ranges(). I wonder if it would be worth a light re-factoring and then exposing the parser as a helper function? > } > > /* -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH 0/3] plugins/execlog: add data address match and address range support

2024-02-29 Thread Alex Bennée
add address range matching > > contrib/plugins/execlog.c | 95 ++++--- > 1 file changed, 79 insertions(+), 16 deletions(-) -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: What is the correct way to add linker dependency to QEMU build system?

2024-02-29 Thread Alex Bennée
> > What would be the correct way to do this? > > Thanks, > Paz -- Alex Bennée Virtualisation Tech Lead @ Linaro Date: Thu, 29 Feb 2024 17:02:44 +

Re: [PATCH v5 05/18] mcdstub: memory helper functions added

2024-02-29 Thread Alex Bennée
en = l; > +return 0; > +} I think there is some scope to re-factor some code that is shared with cpu_memory_rw_debug. In fact rather than using this to feed mcd_read_write_memory() maybe you really just want a cpu_physical_memory_rw_debug()? Although as you are going from vaddr anyway where does cpu_memory_rw_debug() fail for you? > + > /* > * Allows code that needs to deal with migration bitmaps etc to still be > built > * target independent. -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [RFC PATCH] disas/hppa: drop raw opcode dump

2024-02-29 Thread Alex Bennée
Helge Deller writes: > On 2/29/24 15:05, Alex Bennée wrote: >> The hppa disassembly is different from the others due to leading with >> the raw opcode data. This confuses plugins looking for instruction >> prefixes to match instructions. For plugins like execlog there is

Re: [PATCH v5 04/18] gdbstub: DebugClass added to system mode.

2024-02-29 Thread Alex Bennée
= ms->debug_state; > +DebugClass *dc = DEBUG_GET_CLASS(ds); > + > + if (dc->set_stop_cpu) { > +dc->set_stop_cpu(cpu); > +} If there is no explicit state perhaps we should just save the class rather than the instance. > qemu_system_debug_request(); > cpu->stopped = true; > } -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH v5 02/18] gdbstub: hex conversion functions moved to cutils.h

2024-02-29 Thread Alex Bennée
Nicolas Eder writes: Reviewed-by: Alex Bennée -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH v5 01/18] gdbstub, mcdstub: file and build structure adapted to accomodate for the mcdstub

2024-02-29 Thread Alex Bennée
Nicolas Eder writes: > mcdstub files created including the shared header between the mcd shared > library and the mcdstub. > MAINTAINERS file updated Reviewed-by: Alex Bennée -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH v5 03/18] gdbstub: GDBRegisterState moved to gdbstub.h so it can be used outside of the gdbstub

2024-02-29 Thread Alex Bennée
ug/registers.h and then the subdirs can just do: #include "../registers.h" > /** > * gdb_register_coprocessor() - register a supplemental set of registers > * @cpu - the CPU associated with registers -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH v5 11/18] mcdstub: system and core queries added

2024-02-29 Thread Alex Bennée
. -Iqapi -Itrace -Iui -Iui/shader -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -fdiagnostics-color=auto -Wall -Winvalid-pch -Werror -std=gnu11 -O2 -g -fstack-protector-strong -Wempty-body -Wendif-labels -Wexpansion-to-defined -Wformat-security -Wformat-y2k -Wignored-qualif

Re: [PATCH v5 11/12] plugins: remove non per_vcpu inline operation from API

2024-02-29 Thread Alex Bennée
that we operate on a scoreboard. > > API version bump was already done as part of this series. > > Reviewed-by: Richard Henderson > Signed-off-by: Pierrick Bouvier Reviewed-by: Alex Bennée -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH v5 12/12] plugins: cleanup codepath for previous inline operation

2024-02-29 Thread Alex Bennée
Pierrick Bouvier writes: > Reviewed-by: Richard Henderson > Signed-off-by: Pierrick Bouvier Reviewed-by: Alex Bennée -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH v5 10/12] contrib/plugins/howvec: migrate to new per_vcpu API

2024-02-29 Thread Alex Bennée
Pierrick Bouvier writes: > Signed-off-by: Pierrick Bouvier Reviewed-by: Alex Bennée -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH v5 10/12] contrib/plugins/howvec: migrate to new per_vcpu API

2024-02-29 Thread Alex Bennée
Pierrick Bouvier writes: > Signed-off-by: Pierrick Bouvier Reviewed-by: Alex Bennée Tested-by: Alex Bennée -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH v5 09/12] contrib/plugins/hotblocks: migrate to new per_vcpu API

2024-02-29 Thread Alex Bennée
_list_lock, * must be called before acquiring plugin.lock. * - tb_flush(), which acquires mmap_lock(), must be called * while plugin.lock is not held. */ start_exclusive(); qemu_rec_mutex_lock(); /* un-register all callbacks except the final AT_EXI

Re: [PATCH v5 08/12] tests/plugin/bb: migrate to new per_vcpu API

2024-02-29 Thread Alex Bennée
PU0: bb's: 41513, insns: 302671 Total: bb's: 41513, insns: 302671 cpu 0 insns: 302671 total insns: 302671 Anyway: Reviewed-by: Alex Bennée -- Alex Bennée Virtualisation Tech Lead @ Linaro

[RFC PATCH] disas/hppa: drop raw opcode dump

2024-02-29 Thread Alex Bennée
present the instruction assembly code. Signed-off-by: Alex Bennée --- disas/hppa.c | 4 1 file changed, 4 deletions(-) diff --git a/disas/hppa.c b/disas/hppa.c index 22dce9b41bb..dd34cce211b 100644 --- a/disas/hppa.c +++ b/disas/hppa.c @@ -1972,10 +1972,6 @@ print_insn_hppa (bfd_vma memaddr

Re: [PATCH v5 06/12] tests/plugin/mem: migrate to new per_vcpu API

2024-02-29 Thread Alex Bennée
Pierrick Bouvier writes: > On 2/29/24 11:08 AM, Alex Bennée wrote: >> Pierrick Bouvier writes: >> >>> On 2/29/24 2:08 AM, Alex Bennée wrote: >>>> Luc Michel writes: >>>> >>>>> Hi Pierrick, >>>>> >> >>&

Re: [PATCH v5 06/12] tests/plugin/mem: migrate to new per_vcpu API

2024-02-28 Thread Alex Bennée
Pierrick Bouvier writes: > On 2/29/24 2:08 AM, Alex Bennée wrote: >> Luc Michel writes: >> >>> Hi Pierrick, >>> >> > > My bad. Other plugins enable only inline when both are supplied, so I > missed this here. > I added an explicit error when

Re: [PATCH v5 06/12] tests/plugin/mem: migrate to new per_vcpu API

2024-02-28 Thread Alex Bennée
_test([i]) ok 4 - do_test([i]) ok 5 - do_test([i]) ok 6 - do_test([i]) ok 7 - do_test([i]) ok 8 - do_test([i]) ok 9 - do_test([i]) ok 10 - do_test([i]) mem accesses: 262917 22:06:57 alex@draig:qemu.git/builds/all on  plugins/next [$?] ➜ ./qemu-hppa -plugin ./tests/plugin/libme

Re: [q] Status of IOMMU virtualization for nested virtualization (userspace PCI drivers in VMs)

2024-02-28 Thread Alex Williamson
ill want iommufd since similar features will not be provided by type1. Thanks, Alex

[PULL 21/29] gdbstub: expose api to find registers

2024-02-28 Thread Alex Bennée
Expose an internal API to QEMU to return all the registers for a vCPU. The list containing the details required to called gdb_read_register(). Based-on: <20231025093128.33116-15-akihiko.od...@daynix.com> Cc: Akihiko Odaki Reviewed-by: Akihiko Odaki Signed-off-by: Alex Bennée Mess

[PULL 17/29] plugins: fix order of init/idle/resume callback

2024-02-28 Thread Alex Bennée
vcpu. Next change in the series will run vcpu_init asynchronously, which will make it run *after* resume callback as well. So we fix this now. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Message-Id: <20240213094009.150349-4-pierrick.bouv...@linaro.org> Signed-off-by: Alex

[PULL 18/29] linux-user: ensure nios2 processes queued work

2024-02-28 Thread Alex Bennée
-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Message-Id: <20240227144335.1196131-19-alex.ben...@linaro.org> diff --git a/linux-user/nios2/cpu_loop.c b/linux-user/nios2/cpu_loop.c index da77ede76bd..7fe08c87501 100644 --- a/linux-user/nios2/cpu_loop.c

[PULL 24/29] tests/tcg: expand insn test case to exercise register API

2024-02-28 Thread Alex Bennée
This ensure we at least read every register the plugin API reports at least once during the check-tcg checks. Signed-off-by: Alex Bennée Message-Id: <20240227144335.1196131-25-alex.ben...@linaro.org> diff --git a/tests/plugin/insn.c b/tests/plugin/insn.c index 5fd3017c2b3..54da06fcf26

[PULL 22/29] plugins: create CPUPluginState and migrate plugin_mask

2024-02-28 Thread Alex Bennée
As we expand the per-vCPU data for plugins we don't want to pollute CPUState. For now this just moves the plugin_mask (renamed to event_mask) as the memory callbacks are accessed directly by TCG generated code. Reviewed-by: Pierrick Bouvier Signed-off-by: Alex Bennée Message-Id

[PULL 19/29] cpu: call plugin init hook asynchronously

2024-02-28 Thread Alex Bennée
hook. The previous change made sure that any idle/resume cb call will not be done before initializing plugin for a given vcpu. Reviewed-by: Richard Henderson Signed-off-by: Pierrick Bouvier Message-Id: <20240213094009.150349-5-pierrick.bouv...@linaro.org> Signed-off-by: Alex Bennée Mess

[PULL 29/29] docs/devel: plugins can trigger a tb flush

2024-02-28 Thread Alex Bennée
From: Pierrick Bouvier When scoreboards need to be reallocated. Signed-off-by: Pierrick Bouvier Reviewed-by: Richard Henderson Message-Id: <20240213094009.150349-8-pierrick.bouv...@linaro.org> Signed-off-by: Alex Bennée Message-Id: <20240227144335.1196131-30-alex.ben...@linaro.o

[PULL 28/29] docs/devel: document some plugin assumptions

2024-02-28 Thread Alex Bennée
While we attempt to hide implementation details from the plugin we shouldn't be totally obtuse. Let the user know what they can and can't expect with the various instrumentation options. Reviewed-by: Pierrick Bouvier Signed-off-by: Alex Bennée Message-Id: <20240227144335.1196131-29-alex.

[PULL 27/29] docs/devel: lift example and plugin API sections up

2024-02-28 Thread Alex Bennée
This makes them a bit more visible in the TCG emulation menu rather than hiding them away bellow the ToC limit. Reviewed-by: Pierrick Bouvier Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Message-Id: <20240227144335.1196131-28-alex.ben...@linaro.org> diff --git a/docs

[PULL 20/29] plugins: Use different helpers when reading registers

2024-02-28 Thread Alex Bennée
From: Akihiko Odaki This avoids optimizations incompatible when reading registers. Signed-off-by: Akihiko Odaki Reviewed-by: Pierrick Bouvier Message-Id: <20231213-gdb-v17-12-777047380...@daynix.com> Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Mess

[PULL 23/29] plugins: add an API to read registers

2024-02-28 Thread Alex Bennée
kihiko Odaki Signed-off-by: Alex Bennée Message-Id: <20240227144335.1196131-24-alex.ben...@linaro.org> diff --git a/include/qemu/qemu-plugin.h b/include/qemu/qemu-plugin.h index 93981f8f89f..45e2ebc8f8f 100644 --- a/include/qemu/qemu-plugin.h +++ b/include/qemu/qemu-plugin.h @@ -11,6 +11,7

<    2   3   4   5   6   7   8   9   10   11   >