Re: [PATCH v5 12/24] savevm: Fix load_snapshot error path crash

2024-03-19 Thread Alex Bennée
Nicholas Piggin writes: > An error path missed setting *errp, which can cause a NULL deref. > > Signed-off-by: Nicholas Piggin Reviewed-by: Alex Bennée -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH v5 10/24] virtio-net: Use replay_schedule_bh_event for bhs that affect machine state

2024-03-19 Thread Alex Bennée
Nicholas Piggin writes: > The regular qemu_bh_schedule() calls result in non-deterministic > execution of the bh in record-replay mode, which causes replay failure. > > Signed-off-by: Nicholas Piggin Reviewed-by: Alex Bennée -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH v5 08/24] replay: Fix migration use of clock

2024-03-19 Thread Alex Bennée
qemu_savevm_wait_unplug(s, MIGRATION_STATUS_SETUP, > MIGRATION_STATUS_ACTIVE); > > -s->setup_time = qemu_clock_get_ms(QEMU_CLOCK_HOST) - setup_start; > +s->setup_time = qemu_clock_get_ms(QEMU_CLOCK_REALTIME) - setup_start; > > trace_migration_thread_setup_complete(); -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH v5 07/24] chardev: set record/replay on the base device of a muxed device

2024-03-19 Thread Alex Bennée
n of the log shows they are not recorded. > > Setting QEMU_CHAR_FEATURE_REPLAY on the base chardev fixes the problem. > > Signed-off-by: Nicholas Piggin Reviewed-by: Alex Bennée -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH v5 06/24] tests/avocado: replay_kernel.py add x86-64 q35 machine test

2024-03-19 Thread Alex Bennée
Nicholas Piggin writes: > The x86-64 pc machine is flaky with record/replay, but q35 is more > stable. Add a q35 test to replay_kernel.py. > > Signed-off-by: Nicholas Piggin Reviewed-by: Alex Bennée Tested-by: Alex Bennée -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH v5 05/24] Revert "replay: stop us hanging in rr_wait_io_event"

2024-03-19 Thread Alex Bennée
me out of synch with > the execution and consumption of events by replay. > > Signed-off-by: Nicholas Piggin Acked-by: Alex Bennée -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH v5 13/24] tests/avocado: replay_linux.py remove the timeout expected guards

2024-03-19 Thread Alex Bennée
i,rng=rng0', > '-object', 'rng-builtin,id=rng0') > > +@skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is > unstable') This needs to apply to both I think: (5/7) ./tests/avocado/replay_linux.py:ReplayLinuxAarch64.test_virt_gicv2: SKIP: Test is unstable (6/7) ./tes

Re: [PATCH v3 0/4] tests/avocado: update sbsa-ref firmware to latest

2024-03-19 Thread Alex Bennée
bsa-ref is supposed to emulate physical hardware. > > Added 'max' tests with 'pauth=off' and 'pauth-impdef=on' variants. Queued to for-9.0/misc-fixes, thanks. -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH 01/22] tcg: Add TCGContext.emit_before_op

2024-03-19 Thread Alex Bennée
AD(, TCGLabel) labels; > +TCGOp *emit_before_op; Could we add some kdoc comments to the TCGContext describing what each variables is for. Is this just a list of ops to emit before the current instruction emulation? Is it cleared between instruction boundaries? -- Alex Bennée Virtualisation Tech Lead @ Linaro

Invitation: QEMU/KVM developers conference call @ Tue 2 Apr 2024 14:00 - 15:00 (BST) (qemu-devel@nongnu.org)

2024-03-19 Thread Alex Bennée
BEGIN:VCALENDAR PRODID:-//Google Inc//Google Calendar 70.9054//EN VERSION:2.0 CALSCALE:GREGORIAN METHOD:REQUEST BEGIN:VTIMEZONE TZID:America/New_York X-LIC-LOCATION:America/New_York BEGIN:DAYLIGHT TZOFFSETFROM:-0500 TZOFFSETTO:-0400 TZNAME:EDT DTSTART:19700308T02

Invitation: QEMU/KVM developers conference call @ Tue 16 Apr 2024 14:00 - 15:00 (BST) (qemu-devel@nongnu.org)

2024-03-19 Thread Alex Bennée
BEGIN:VCALENDAR PRODID:-//Google Inc//Google Calendar 70.9054//EN VERSION:2.0 CALSCALE:GREGORIAN METHOD:REQUEST BEGIN:VTIMEZONE TZID:America/New_York X-LIC-LOCATION:America/New_York BEGIN:DAYLIGHT TZOFFSETFROM:-0500 TZOFFSETTO:-0400 TZNAME:EDT DTSTART:19700308T02

Invitation: QEMU/KVM developers conference call @ Every 2 weeks from 13:00 to 14:00 on Tuesday (GMT) (qemu-devel@nongnu.org)

2024-03-19 Thread Alex Bennée
BEGIN:VCALENDAR PRODID:-//Google Inc//Google Calendar 70.9054//EN VERSION:2.0 CALSCALE:GREGORIAN METHOD:REQUEST BEGIN:VTIMEZONE TZID:America/New_York X-LIC-LOCATION:America/New_York BEGIN:DAYLIGHT TZOFFSETFROM:-0500 TZOFFSETTO:-0400 TZNAME:EDT DTSTART:19700308T02

KVM/QEMU Community Call 5th March Agenda Items

2024-03-19 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: [PATCH 21/22] plugins: Inline plugin_gen_empty_callback

2024-03-18 Thread Alex Bennée
Richard Henderson writes: > Each caller can use tcg_gen_plugin_cb directly. > > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH 20/22] plugins: Move qemu_plugin_insn_cleanup_fn to tcg.c

2024-03-18 Thread Alex Bennée
true); > +} > +#endif > + You could expand the ifdef to the next function and make an alternate empty alloc_tcg_plugin_context. Alternatively maybe we should consider dropping the CONFIG_PLUGIN gymnastics and make it a first class TCG feature? Is the null case still visible on the c

Re: [PATCH 12/22] plugins: Remove plugin helpers

2024-03-18 Thread Alex Bennée
Richard Henderson writes: > These placeholder helpers are no longer required. > > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH v2] vfio/pci: migration: Skip config space check for vendor specific capability during restore/load

2024-03-18 Thread Alex Williamson
On Fri, 15 Mar 2024 23:22:22 +0530 Vinayak Kale wrote: > On 11/03/24 8:32 pm, Alex Williamson wrote: > > External email: Use caution opening links or attachments > > > > > > On Mon, 11 Mar 2024 17:45:19 +0530 > > Vinayak Kale wrote: > > > >>

Re: [PATCH 05/22] plugins: Move function pointer in qemu_plugin_dyn_cb

2024-03-18 Thread Alex Bennée
Richard Henderson writes: > The out-of-line function pointer is mutually exclusive > with inline expansion, so move it into the union. > Wrap the pointer in a structure named 'regular' to match > PLUGIN_CB_REGULAR. > > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée

Re: [PATCH 04/22] plugins: Zero new qemu_plugin_dyn_cb entries

2024-03-18 Thread Alex Bennée
Richard Henderson writes: > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH 02/22] tcg: Make tcg/helper-info.h self-contained

2024-03-18 Thread Alex Bennée
'call_slots' [-Werror=unused-variable] 391 | void *call_slots[MAX_CALL_IARGS]; | ^~ cc1: all warnings being treated as errors the gift that keeps on giving ;-) -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH 03/22] tcg: Pass function pointer to tcg_gen_call*

2024-03-18 Thread Alex Bennée
Richard Henderson writes: > For normal helpers, read the function pointer from the > structure earlier. For plugins, this will allow the > function pointer to come from elsewhere. > > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH 02/22] tcg: Make tcg/helper-info.h self-contained

2024-03-18 Thread Alex Bennée
Richard Henderson writes: > Move MAX_CALL_IARGS from tcg.h and include for > the define of TCG_TARGET_REG_BITS. > > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH] linux-user: replace calloc() with g_new0()

2024-03-17 Thread Alex Bennée
rget_argv = calloc(target_argc + 1, sizeof (char *)); > -if (target_argv == NULL) { > -(void) fprintf(stderr, "Unable to allocate memory for > target_argv\n"); > -exit(EXIT_FAILURE); > - } > +target_argv = g_new0(char *, target_argc + 1); Reviewed-by: Alex Bennée -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH] scsi-generic: fix io_timeout property not applying

2024-03-15 Thread Alex Bennée
si-block, but initialize it nevertheless to be clean. > */ > s->default_scsi_version = -1; > -s->io_timeout = DEFAULT_IO_TIMEOUT; > scsi_generic_read_device_inquiry(s); > } Reviewed-by: Alex Bennée -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: Another CXL/MMIO tcg tlb corner case

2024-03-15 Thread Alex Bennée
= -1)) { > tb_unlock_pages(tb); > tb_set_page_addr0(tb, -1); > +set_can_do_io(db, true); > return NULL; > } > > With that change, things work fine. Not saying that this is a valid fix for > the > issue, but just trying to provide as much information as possible :) I can see why this works, my worry is if we address all the early exit cases here. > > Thanks, > Jorgen -- Alex Bennée Virtualisation Tech Lead @ Linaro

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

2024-03-15 Thread Alex Bennée
Alex Bennée writes: > Hi, > > Over recent years there has been a push to make QEMU more flexible for > EDA type applications. As long time developers know there are a number > of downstream forks of QEMU which have their own solutions for modelling > heterogeneous syste

Re: [PATCH v2 3/4] tests/avocado: use OpenBSD 7.4 for sbsa-ref

2024-03-14 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > On 14/3/24 13:14, Alex Bennée wrote: >> Marcin Juszkiewicz writes: >> >>> 7.4 was released in October 2023, time to update before 7.3 gets dropped. >>> >>> Disabled tests for 'max' cpu as OpenBSD fails there.

Re: [PATCH v2 2/4] tests/avocado: drop virtio-rng from sbsa-ref tests

2024-03-14 Thread Alex Bennée
Peter Maydell writes: > On Thu, 14 Mar 2024 at 12:11, Alex Bennée wrote: >> >> Marcin Juszkiewicz writes: >> >> > sbsa-ref is supposed to emulate real hardware so virtio-rng-pci >> > does not fit here >> >> What is real anyway ;-) >&g

Re: [PATCH v2 3/4] tests/avocado: use OpenBSD 7.4 for sbsa-ref

2024-03-14 Thread Alex Bennée
ng to delete the entries then at least use a @skip instead of commenting. Maybe: @skip("Potential un-diagnosed upstream bug?") but it would be nice to figure out exactly where is breaks. > + > +# @skipUnless(os.getenv('AVOCADO_TIMEOUT_EXPECTED'), 'Test might timeout') &

Re: [PATCH v2 2/4] tests/avocado: drop virtio-rng from sbsa-ref tests

2024-03-14 Thread Alex Bennée
vm.launch() > @@ -179,10 +175,6 @@ def boot_openbsd73(self, cpu): > cpu, > "-drive", > f"file={img_path},format=raw", > -"-device", > -"virtio-rng-pci,rng=rng0", > -"-object", > -"rng-random,id=rng0,filename=/dev/urandom", > ) > > self.vm.launch() -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [RFC PATCH v2] contrib/plugins: control flow plugin (WIP!)

2024-03-14 Thread Alex Bennée
Alex Bennée writes: > This is a simple control flow tracking plugin that uses the latest > inline and conditional operations to detect and track control flow > changes. It is currently an exercise at seeing how useful the changes > are. > > Based-on: <20240312075428.2

[RFC PATCH v2] contrib/plugins: control flow plugin (WIP!)

2024-03-14 Thread Alex Bennée
ro Cc: Pierrick Bouvier Signed-off-by: Alex Bennée Message-Id: <20240311153432.1395190-1-alex.ben...@linaro.org> --- v2 - only need a single call back - drop need for INSN_WIDTH - still don't understand the early exits I'm still seeing weirdness in the generated code, for exampl

[PULL v2 for 9.0 0/7] final maintainer updates (testing, gdbstub)

2024-03-13 Thread Alex Bennée
the over rebuilding of test VMs - support Xfer:siginfo:read in gdbstub - fix double close() in gdbstub Alex Bennée (1): tests/vm: ensure we build everything by default Gustavo Romero (5): gdbstub: Rename back gdb_handlesig

Re: [PATCH v4 05/24] Revert "replay: stop us hanging in rr_wait_io_event"

2024-03-12 Thread Alex Bennée
"Nicholas Piggin" writes: > On Tue Mar 12, 2024 at 11:33 PM AEST, Alex Bennée wrote: >> Nicholas Piggin writes: >> >> > This reverts commit 1f881ea4a444ef36a8b6907b0b82be4b3af253a2. >> > >> > That commit causes reverse_debugging.py test fail

Re: [PATCH v4 3/5] hw/virtio: change dmabuf mutex to QemuMutex

2024-03-12 Thread Alex Bennée
t; > I updated it to QemuMutex after a suggestion from Alex Benee, but I was not > really aware it existed before his comment. So for your question I had to > check what > exactly BQL stands for in this context (big QEMU lock). Therefore, as you can > see, > I am probably not the

Re: Possible memory release problem

2024-03-12 Thread Alex Bennée
NOT_IGNORED(block) { g_free(block->clear_bmap); block->clear_bmap = NULL; g_free(block->bmap); block->bmap = NULL; } xbzrle_cleanup(); compress_threads_save_cleanup(); ram_state_cleanup(rsp); g_free(migration_ops); migration_ops = NULL; } -- Alex Bennée Virtualisation Tech Lead @ Linaro

[PATCH v2] gitlab: aggressively avoid extra GIT data

2024-03-12 Thread Alex Bennée
-by: Alex Bennée --- v2 - make custom runners follow the legacy options --- .gitlab-ci.d/base.yml | 4 .gitlab-ci.d/buildtest-template.yml | 1 + .gitlab-ci.d/buildtest.yml | 2 ++ .gitlab-ci.d/custom-runners.yml | 5 +++-- .gitlab-ci.d/windows.yml| 2

Re: [PATCH 4/5] plugins: conditional callbacks

2024-03-12 Thread Alex Bennée
Pierrick Bouvier writes: > On 3/11/24 14:08, Alex Bennée wrote: >> Pierrick Bouvier writes: >> >>> Extend plugins API to support callback called with a given criteria >>> (evaluated inline). >>> >>> Added functio

Re: [PULL for 9.0 0/8] final maintainer updates (testing, gdbstub)

2024-03-12 Thread Alex Bennée
Peter Maydell writes: > On Tue, 12 Mar 2024 at 11:26, Alex Bennée wrote: >> >> The following changes since commit 7489f7f3f81dcb776df8c1b9a9db281fc21bf05f: >> >> Merge tag 'hw-misc-20240309' of https://github.com/philmd/qemu into >> staging (2024-03-09 20

Re: [PATCH v4 05/24] Revert "replay: stop us hanging in rr_wait_io_event"

2024-03-12 Thread Alex Bennée
> - * the instruction count has reached zero and we have an > - * unconsumed event we should go around again and consume it. > - */ > -if (replay_state.instruction_count == 0 && > replay_state.has_unread_data) { > -return false; > -} else { > -

Re: [PATCH v4 04/24] replay: allow runstate shutdown->running when replaying trace

2024-03-12 Thread Alex Bennée
h a state. > > Reviewed-by: Pavel Dovgalyuk > Signed-off-by: Nicholas Piggin Reviewed-by: Alex Bennée -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH v4 03/24] tests/avocado: excercise scripts/replay-dump.py in replay tests

2024-03-12 Thread Alex Bennée
Signed-off-by: Nicholas Piggin Reviewed-by: Alex Bennée -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH v4 22/24] target/ppc: fix timebase register reset state

2024-03-12 Thread Alex Bennée
%016x cc1: all warnings being treated as errors > } > > return 0; > @@ -333,6 +335,8 @@ static int cpu_post_load(void *opaque, int version_id) > * triggered types (including HDEC) would need to carry more state. > */ > cpu_ppc_store

[PULL 8/8] gdbstub: Fix double close() of the follow-fork-mode socket

2024-03-12 Thread Alex Bennée
it later - before returning - instead. Fixes: Coverity CID 1539966 Fixes: d547e711a8a5 ("gdbstub: Implement follow-fork-mode child") Signed-off-by: Ilya Leoshkevich Signed-off-by: Alex Bennée Message-Id: <20240312001813.13720-1-...@linux.ibm.com> diff --git a/gdbstub/user.c

[PULL 5/8] gdbstub: Save target's siginfo

2024-03-12 Thread Alex Bennée
: <20240309030901.1726211-4-gustavo.rom...@linaro.org> Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson diff --git a/include/gdbstub/user.h b/include/gdbstub/user.h index 4fc88f8a25..3b8358e3da 100644 --- a/include/gdbstub/user.h +++ b/include/gdbstub/user.h @@ -9,11 +9,15 @@ #ifndef GDBSTUB_

[PULL 7/8] tests/tcg: Add multiarch test for Xfer:siginfo:read stub

2024-03-12 Thread Alex Bennée
From: Gustavo Romero Add multiarch test for testing if Xfer:siginfo:read query is properly handled by gdbstub. Signed-off-by: Gustavo Romero Reviewed-by: Richard Henderson Message-Id: <20240309030901.1726211-6-gustavo.rom...@linaro.org> Signed-off-by: Alex Bennée diff --git a/tes

[PULL 2/8] tests/vm: ensure we build everything by default

2024-03-12 Thread Alex Bennée
The "check" target by itself is not enough to ensure we build the user mode binaries. While we can't test them with check-tcg we can at least include them in the build. Signed-off-by: Alex Bennée Reviewed-by: Thomas Huth Cc: Richard Henderson Cc: Gustavo Romero diff --git

[PULL 3/8] gdbstub: Rename back gdb_handlesig

2024-03-12 Thread Alex Bennée
From: Gustavo Romero Rename gdb_handlesig_reason back to gdb_handlesig. There is no need to add a wrapper for gdb_handlesig and rename it when a new parameter is added. Signed-off-by: Gustavo Romero Reviewed-by: Alex Bennée Reviewed-by: Richard Henderson Message-Id: <20240309030901.172621

[PULL 4/8] linux-user: Move tswap_siginfo out of target code

2024-03-12 Thread Alex Bennée
: <20240309030901.1726211-3-gustavo.rom...@linaro.org> Signed-off-by: Alex Bennée diff --git a/linux-user/signal-common.h b/linux-user/signal-common.h index a7df12fc44..f4cbe6185e 100644 --- a/linux-user/signal-common.h +++ b/linux-user/signal-common.h @@ -43,8 +43,6 @@ void host_to_target_sigset_internal(target_si

[PULL 6/8] gdbstub: Add Xfer:siginfo:read stub

2024-03-12 Thread Alex Bennée
further details on the signal, like the fault address/insn when the SIGSEGV is caught. Signed-off-by: Gustavo Romero Message-Id: <20240309030901.1726211-5-gustavo.rom...@linaro.org> Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson diff --git a/gdbstub/internals.h b/gdbstub/internals.h

[PULL 1/8] gitlab: aggressively avoid extra GIT data

2024-03-12 Thread Alex Bennée
we also run a quick du while setting up the build. We also have to have special settings of GIT_FETCH_EXTRA_FLAGS for the Windows build (git too old?) and the migration legacy test where we build an older QEMU alongside the main one. Signed-off-by: Alex Bennée diff --git a/.gitlab-ci.d/base.yml

[PULL for 9.0 0/8] final maintainer updates (testing, gdbstub)

2024-03-12 Thread Alex Bennée
pointless git data - fix the over rebuilding of test VMs - support Xfer:siginfo:read in gdbstub - fix double close() in gdbstub Alex Bennée (2): gitlab: aggressively avoid extra GIT data tests/vm: ensure we build

Re: [PATCH] gdbstub: Fix double close() of the follow-fork-mode socket

2024-03-12 Thread Alex Bennée
ose it again. > > Fix by closing it later - before returning - instead. > > Fixes: Coverity CID 1539966 > Fixes: d547e711a8a5 ("gdbstub: Implement follow-fork-mode child") > Signed-off-by: Ilya Leoshkevich Queued to gdbstub/next, thanks. -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH v3 0/5] Add stub to handle Xfer:siginfo:read query

2024-03-11 Thread Alex Bennée
licitly asks for more information via > printing GBD's special purpose variable '$_siginfo'. Queued to gdbstub/next, thanks. -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH 4/5] plugins: conditional callbacks

2024-03-11 Thread Alex Bennée
t; +op = copy_call(_op, op, cb->f.vcpu_udata, cb_idx); > +op = copy_set_label(_op, op); > +return op; I think we are missing something here to ensure that udata is set correctly for the callback, see my RFC: Subject: [RFC PATCH] contrib/plugins: control flow plugin (WIP!) Date

[RFC PATCH] contrib/plugins: control flow plugin (WIP!)

2024-03-11 Thread Alex Bennée
This is a simple control flow tracking plugin that uses the latest inline and conditional operations to detect and track control flow changes. It is currently an exercise at seeing how useful the changes are. Signed-off-by: Alex Bennée Based-on: 20240229055359.972151-1-pierrick.bouv

Re: [PATCH v2] vfio/pci: migration: Skip config space check for vendor specific capability during restore/load

2024-03-11 Thread Alex Williamson
re/load */ > +memset(pdev->cmask + pos, 0, size); This excludes the entire capability from comparison, including the capability ID, next pointer, and capability length. Even if the contents of the capability are considered volatile vendor information, the header is spec defined

Re: [PULL 26/29] disas: introduce show_opcodes

2024-03-11 Thread Alex Bennée
Thomas Huth writes: > On 06/03/2024 15.40, Alex Bennée wrote: >> 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 whi

Re: [PATCH 4/5] plugins: conditional callbacks

2024-03-11 Thread Alex Bennée
insn_exec_inline_per_vcpu( > struct qemu_plugin_insn *insn, > enum qemu_plugin_op op, > diff --git a/plugins/core.c b/plugins/core.c > index 11f72594229..82d5f17438e 100644 > --- a/plugins/core.c > +++ b/plugins/core.c > @@ -347,6 +347,25 @@ void plugin_register_dyn_cb__udata(GArray **arr, > dyn_cb->type = PLUGIN_CB_REGULAR; > } > > +void plugin_register_dyn_cond_cb__udata(GArray **arr, > +qemu_plugin_vcpu_udata_cb_t cb, > +enum qemu_plugin_cb_flags flags, > +enum qemu_plugin_cond cond, > +qemu_plugin_u64 entry, > +uint64_t imm, > +void *udata) > +{ > +struct qemu_plugin_dyn_cb *dyn_cb = plugin_get_dyn_cb(arr); > + > +dyn_cb->userp = udata; > +/* Note flags are discarded as unused. */ > +dyn_cb->f.vcpu_udata = cb; > +dyn_cb->type = PLUGIN_CB_COND; > +dyn_cb->cond_cb.cond = cond; > +dyn_cb->cond_cb.entry = entry; > +dyn_cb->cond_cb.imm = imm; > +} > + > void plugin_register_vcpu_mem_cb(GArray **arr, > void *cb, > enum qemu_plugin_cb_flags flags, > diff --git a/plugins/qemu-plugins.symbols b/plugins/qemu-plugins.symbols > index a9fac056c7f..aa0a77a319f 100644 > --- a/plugins/qemu-plugins.symbols > +++ b/plugins/qemu-plugins.symbols > @@ -27,6 +27,7 @@ >qemu_plugin_register_vcpu_idle_cb; >qemu_plugin_register_vcpu_init_cb; >qemu_plugin_register_vcpu_insn_exec_cb; > + qemu_plugin_register_vcpu_insn_exec_cond_cb; >qemu_plugin_register_vcpu_insn_exec_inline_per_vcpu; >qemu_plugin_register_vcpu_mem_cb; >qemu_plugin_register_vcpu_mem_inline_per_vcpu; > @@ -34,6 +35,7 @@ >qemu_plugin_register_vcpu_syscall_cb; >qemu_plugin_register_vcpu_syscall_ret_cb; >qemu_plugin_register_vcpu_tb_exec_cb; > + qemu_plugin_register_vcpu_tb_exec_cond_cb; >qemu_plugin_register_vcpu_tb_exec_inline_per_vcpu; >qemu_plugin_register_vcpu_tb_trans_cb; >qemu_plugin_reset; -- Alex Bennée Virtualisation Tech Lead @ Linaro

Re: [PATCH 0/2] Revert "hw/i386/pc: Confine system flash handling to pc_sysfw"

2024-03-09 Thread Alex Williamson
fw.c | 17 + > 4 files changed, 17 insertions(+), 4 deletions(-) > Please apply this, the original commits break my existing VMs. Tested-by: Alex Williamson

[RFC PATCH] tests/vm: ensure we build everything by default

2024-03-09 Thread Alex Bennée
The "check" target by itself is not enough to ensure we build the user mode binaries. While we can't test them with check-tcg we can at least include them in the build. Signed-off-by: Alex Bennée Cc: Richard Henderson Cc: Gustavo Romero --- tests/vm/basevm.py | 2 +- 1 file

Re: [PATCH v2 3/5] gdbstub: Save target's siginfo

2024-03-09 Thread Alex Bennée
Richard Henderson writes: > On 3/8/24 09:25, Alex Bennée wrote: >>make vm-build-[open|net|free]bsd >> see make vm-help for details. > > That won't build freebsd user. > Something I've mentioned to you before... make vm-build-freebsd BUILD_TARGET=all I guess th

Re: [PATCH] pci: Add option to disable device level INTx masking

2024-03-08 Thread Alex Williamson
On Fri, 8 Mar 2024 14:37:06 -0500 "Michael S. Tsirkin" wrote: > On Fri, Mar 08, 2024 at 10:24:14AM -0700, Alex Williamson wrote: > > On Fri, 8 Mar 2024 11:57:38 -0500 > > "Michael S. Tsirkin" wrote: > > > > > On Thu, Mar 07, 2024 at 11:46:42

Re: [PATCH v2 3/5] gdbstub: Save target's siginfo

2024-03-08 Thread Alex Bennée
Gustavo Romero writes: > Hi Alex, > > On 3/7/24 7:33 PM, Alex Bennée wrote: >> Richard Henderson writes: >> >>> On 3/7/24 08:26, Gustavo Romero wrote: >>>> Save target's siginfo into gdbserver_state so it can be used later, for >>>> ex

Re: [PATCH] pci: Add option to disable device level INTx masking

2024-03-08 Thread Alex Williamson
On Fri, 8 Mar 2024 11:57:38 -0500 "Michael S. Tsirkin" wrote: > On Thu, Mar 07, 2024 at 11:46:42AM -0700, Alex Williamson wrote: > > The PCI 2.3 spec added definitions of the INTx disable and status bits, > > in the command and status registers respectively. The

[RFC PATCH] gitlab: aggressively avoid extra GIT data

2024-03-08 Thread Alex Bennée
we also run a quick du while setting up the build. We also have to have special settings of GIT_FETCH_EXTRA_FLAGS for the Windows build (git too old?) and the migration legacy test where we build an older QEMU alongside the main one. Signed-off-by: Alex Bennée --- .gitlab-ci.d/base.yml

Re: [PATCH 1/5] scripts/kernel-doc: teach kdoc about QLIST_ macros

2024-03-08 Thread Alex Bennée
Peter Xu writes: > On Thu, Mar 07, 2024 at 06:11:01PM +0000, Alex Bennée wrote: >> The kernel-doc script does some pre-processing on structure >> definitions before parsing for names. Teach it about QLIST and replace >> with simplified structures representing the base ty

Re: [PATCH 4/5] include/exec: annotate all the MemoryRegion fields

2024-03-07 Thread Alex Bennée
Richard Henderson writes: > On 3/7/24 08:11, Alex Bennée wrote: >> Signed-off-by: Alex Bennée >> --- >> include/exec/memory.h | 47 +++ >> 1 file changed, 43 insertions(+), 4 deletions(-) >> diff --git a/include/exec

Re: [PATCH v2 3/5] gdbstub: Save target's siginfo

2024-03-07 Thread Alex Bennée
-o libqemu-arm-bsd-user.fa.p/gdbstub_user-target.c.o -c ../gdbstub/user-target.c In file included from ../gdbstub/user-target.c:18: ../gdbstub/internals.h:62:21: error: use of undeclared identifier 'MAX_SIGINFO_LENGTH' 62 | uint8_t siginfo[MAX_SIGINFO_LENGTH]; |

Re: [PATCH v2 2/5] linux-user: Move tswap_siginfo out of target code

2024-03-07 Thread Alex Bennée
nding = 0; > > +/* > + * Writes out siginfo values byteswapped, accordingly to the target. It > also > + * cleans the si_type from si_code making it correct for the target. > + */ > +tswap_siginfo(>info, >info); > + I'm not sure I like this, you

Re: [PATCH v2 1/5] gdbstub: Rename back gdb_handlesig

2024-03-07 Thread Alex Bennée
Gustavo Romero writes: > Rename gdb_handlesig_reason back to gdb_handlesig. There is no need to > add a wrapper for gdb_handlesig and rename it when a new parameter is > added. > > Signed-off-by: Gustavo Romero Reviewed-by: Alex Bennée -- Alex Bennée Virtualisation Tech Lead @ Linaro

[PATCH] pci: Add option to disable device level INTx masking

2024-03-07 Thread Alex Williamson
). Add an experimental option to the base set of properties for PCI devices which allows the DisINTx bit to be excluded from wmask, making it read-only to the guest for testing purposes related to INTx masking. Signed-off-by: Alex Williamson --- hw/pci/pci.c | 14 ++ include

[PATCH 4/5] include/exec: annotate all the MemoryRegion fields

2024-03-07 Thread Alex Bennée
Signed-off-by: Alex Bennée --- include/exec/memory.h | 47 +++ 1 file changed, 43 insertions(+), 4 deletions(-) diff --git a/include/exec/memory.h b/include/exec/memory.h index 17b741bc4f5..312ed564dbe 100644 --- a/include/exec/memory.h +++ b/include/exec

[PATCH 1/5] scripts/kernel-doc: teach kdoc about QLIST_ macros

2024-03-07 Thread Alex Bennée
The kernel-doc script does some pre-processing on structure definitions before parsing for names. Teach it about QLIST and replace with simplified structures representing the base type. Signed-off-by: Alex Bennée --- scripts/kernel-doc | 9 - 1 file changed, 8 insertions(+), 1 deletion

[PATCH 5/5] docs/devel: mark out defined functions and structures

2024-03-07 Thread Alex Bennée
This allows sphinx to hyperlink the references to their kdoc definitions for easy navigation. Signed-off-by: Alex Bennée --- docs/devel/memory.rst | 48 +-- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/docs/devel/memory.rst b/docs/devel

[PATCH 0/5] docs: improve the memory API documentation

2024-03-07 Thread Alex Bennée
and ram_device could be cleaned up to a single bool (directly_mapped or use_ops?). Anyway for now just cosmetic improvements to the docs as we are close to softfreeze. Alex. Alex Bennée (5): scripts/kernel-doc: teach kdoc about QLIST_ macros docs: include ramblock.h in the memory API docs include/exec

[PATCH 2/5] docs: include ramblock.h in the memory API docs

2024-03-07 Thread Alex Bennée
The RAMBlock concept is fairly central to RAM-like MemoryRegions so lets update the structure documentation and include in the docs. Signed-off-by: Alex Bennée --- docs/devel/memory.rst | 1 + include/exec/ramblock.h | 76 +++-- 2 files changed, 52

[PATCH 3/5] include/exec: remove warning_printed from MemoryRegion

2024-03-07 Thread Alex Bennée
Since d197063fcf9 (memory: move unassigned_mem_ops to memory.c) this field is unused. Signed-off-by: Alex Bennée --- include/exec/memory.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/exec/memory.h b/include/exec/memory.h index 8626a355b31..17b741bc4f5 100644 --- a/include/exec

[PULL 26/29] disas: introduce show_opcodes

2024-03-06 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. Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Message-Id

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

2024-03-06 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 Message-Id: <20240305121005.3528075-23-alex.ben...@linaro.org> diff --git a/contrib/plugins/hotblocks.c b/contrib/plugins/hotbl

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

2024-03-06 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 Message-Id: <20240305121005.3528075-22-alex.ben...@linaro.org> diff --git a/tests

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

2024-03-06 Thread Alex Bennée
This makes the output suitable when used for plugins. Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Message-Id: <20240305121005.3528075-29-alex.ben...@linaro.org> diff --git a/target/loongarch/disas.c b/target/loongarch/disas.c index 2040f3e44db..63989a6282d 100644 --- a/

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

2024-03-06 Thread Alex Bennée
Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Message-Id: <20240305121005.3528075-28-alex.ben...@linaro.org> 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 m

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

2024-03-06 Thread Alex Bennée
This makes the output suitable when used for plugins. Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Message-Id: <20240305121005.3528075-30-alex.ben...@linaro.org> diff --git a/disas/riscv.c b/disas/riscv.c index 8a546d5ea53..e236c8b5b7c 100644 --- a/disas/riscv.c +++ b

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

2024-03-06 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 Message-Id: <20240305121005.3528075-21-alex.ben...@linaro.org> diff --git a/tests/plugin/insn.c b/tests/p

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

2024-03-06 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

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

2024-03-06 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

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

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: Alex Bennée Reviewed-by: Richard Henderson Signed-off-by: Ilya Leoshkevich Message-Id: <20240219141628.246823-6-...@linux.ibm.com> Signed-off-by: Alex Bennée M

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

2024-03-06 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 Message-Id: <20240305121005.3528075-20-alex.ben...@linaro.org> diff --git a/tests/plugin/mem.c b/tests/

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

2024-03-06 Thread Alex Bennée
ed-off-by: Alex Bennée Message-Id: <20240305121005.3528075-14-alex.ben...@linaro.org> diff --git a/tests/tcg/multiarch/follow-fork-mode.c b/tests/tcg/multiarch/follow-fork-mode.c new file mode 100644 index 000..cb6b032b388 --- /dev/null +++ b/tests/tcg/multiarch/follow-fork-mode.c @

[PULL 15/29] plugins: define qemu_plugin_u64

2024-03-06 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 Message-Id: <20240305121005.3528075-16-alex.ben...@l

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

2024-03-06 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 Message-Id: <20240305121005.3528075-26-alex.ben...@linaro.org> diff --g

[PULL 14/29] plugins: scoreboard API

2024-03-06 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 Message-Id: <20240305121005.3528075-15-alex.ben...@linaro.org> diff --git a/include/qemu/plugin.h b/include/qemu/plugin.h index b3c94a34aa4.

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

2024-03-06 Thread Alex Bennée
-by: Ilya Leoshkevich Message-Id: <20240219141628.246823-8-...@linux.ibm.com> Signed-off-by: Alex Bennée Message-Id: <20240305121005.3528075-9-alex.ben...@linaro.org> diff --git a/include/gdbstub/user.h b/include/gdbstub/user.h index 3f9f45946e0..4c4e5c4c582 100644 --- a/include/gdbstub/

[PULL for 9.0 00/29] maintainer updates (tests, gdbstub, plugins)

2024-03-06 Thread Alex Bennée
): - expand QOS_PATH_MAX_ELEMENT_SIZE to avoid LTO issues - support fork-follow-mode in gdbstub - new thread-safe scoreboard API for TCG plugins - suppress showing opcodes in plugin disassembly Alex Bennée (5): tests

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

2024-03-06 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 Message-Id: <20240305121005.3528075-19-alex.ben...@linaro.org> diff --git a/

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

2024-03-06 Thread Alex Bennée
-10-...@linux.ibm.com> Signed-off-by: Alex Bennée Message-Id: <20240305121005.3528075-11-alex.ben...@linaro.org> diff --git a/gdbstub/internals.h b/gdbstub/internals.h index e6063835b1f..b4905c7181a 100644 --- a/gdbstub/internals.h +++ b/gdbstub/internals.h @@ -197,6 +197,7 @@ void gdb_handle_v_file_rea

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

2024-03-06 Thread Alex Bennée
: <20240219141628.246823-12-...@linux.ibm.com> Signed-off-by: Alex Bennée Message-Id: <20240305121005.3528075-13-alex.ben...@linaro.org> diff --git a/gdbstub/user.c b/gdbstub/user.c index 1a7b582a40d..7f9f19a1249 100644 --- a/gdbstub/user.c +++ b/gdbstub/user.c @@ -25,6 +25,61 @@ #define GDB

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

2024-03-06 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 Message-Id: <20240305121005.3528075-24-alex.ben...@linaro.org> diff --git a/con

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

2024-03-06 Thread Alex Bennée
3-9-...@linux.ibm.com> Signed-off-by: Alex Bennée Message-Id: <20240305121005.3528075-10-alex.ben...@linaro.org> diff --git a/gdbstub/internals.h b/gdbstub/internals.h index 56b7c13b750..e6063835b1f 100644 --- a/gdbstub/internals.h +++ b/gdbstub/internals.h @@ -196,6 +196,7 @@ void gdb_handle_v_file_

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