Re: [PATCH] pnv/xive2: Allow indirect TIMA accesses of all sizes

2023-06-30 Thread Philippe Mathieu-Daudé
Hi Frederic, On 26/6/23 13:25, Frederic Barrat wrote: On 26/06/2023 11:48, Philippe Mathieu-Daudé wrote: On 26/6/23 11:40, Frederic Barrat wrote: Booting linux on the powernv10 machine logs a few errors like: Invalid read at addr 0x38, size 1, region 'xive-ic-tm-indirect', reason: invalid

Re: [PATCH v2 4/4] accel/tcg: Move perf and debuginfo support to tcg

2023-06-30 Thread Philippe Mathieu-Daudé
On 1/7/23 01:40, Ilya Leoshkevich wrote: tcg/ should not depend on accel/tcg/, but perf and debuginfo support provided by the latter are being used by tcg/tcg.c. Since that's the only user, move both to tcg/. Suggested-by: Philippe Mathieu-Daudé Signed-off-by: Ilya Leoshkevich ---

Re: [PULL 17/33] ui/dbus: win32 support

2023-06-30 Thread Philippe Mathieu-Daudé
On 30/6/23 23:41, Marc-André Lureau wrote: Hi On Thu, Jun 29, 2023 at 7:55 PM Bernhard Beschow > wrote: Am 27. Juni 2023 13:02:14 UTC schrieb marcandre.lur...@redhat.com : >From: Marc-André Lureau

[PATCH] ui: Link dbus-display with pixman again

2023-06-30 Thread Philippe Mathieu-Daudé
Since its introduction in commit 142ca628a7 ("ui: add a D-Bus display backend"), dbus_display1 depends on pixman. Unfortunatly the refactor commit 1222070e77 ("meson: ensure dbus-display generated code is built before other units") dropped that dependency. Recently commit 6cc5a6159a ("ui/dbus:

[PATCH v2 1/4] target: Make qemu_target_page_mask() available for *-user

2023-06-30 Thread Ilya Leoshkevich
Currently qemu_target_page_mask() is usable only from the softmmu code. Make it possible to use it from the *-user code as well. Make use of it in perf.c. Signed-off-by: Ilya Leoshkevich --- accel/tcg/perf.c | 2 +- softmmu/physmem.c | 5 - target/meson.build | 2 ++

[PATCH v2 3/4] accel/tcg: Remove #ifdef TARGET_I386 from perf.c

2023-06-30 Thread Ilya Leoshkevich
Preparation for moving perf.c to tcg/. This affects only profiling guest code, which has code in a non-0 based segment, e.g., 16-bit code, which is not particularly important. Suggested-by: Richard Henderson Signed-off-by: Ilya Leoshkevich --- accel/tcg/perf.c | 4 1 file changed, 4

[PATCH v2 0/4] accel/tcg: Move perf and debuginfo support to tcg

2023-06-30 Thread Ilya Leoshkevich
v1: https://lists.gnu.org/archive/html/qemu-devel/2023-06/msg07037.html v1 -> v2: Move qemu_target_page_mask() hunk to patch 1. Fix typos. Hi, This series is a follow-up to discussion in [1]; the goal is to build perf and debuginfo support only one time. I had to move tb_cflags() and

[PATCH v2 2/4] tcg: Make tb_cflags() usable from target-agnostic code

2023-06-30 Thread Ilya Leoshkevich
Currently tb_cflags() is defined in exec-all.h, which is not usable from target-agnostic code. Move it to translation-block.h, which is. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Ilya Leoshkevich --- include/exec/exec-all.h | 6 -- include/exec/translation-block.h | 6

[PATCH v2 4/4] accel/tcg: Move perf and debuginfo support to tcg

2023-06-30 Thread Ilya Leoshkevich
tcg/ should not depend on accel/tcg/, but perf and debuginfo support provided by the latter are being used by tcg/tcg.c. Since that's the only user, move both to tcg/. Suggested-by: Philippe Mathieu-Daudé Signed-off-by: Ilya Leoshkevich --- accel/tcg/meson.build | 2 --

Re: [PATCH 4/4] accel/tcg: Move perf and debuginfo support to tcg

2023-06-30 Thread Philippe Mathieu-Daudé
On 30/6/23 22:36, Ilya Leoshkevich wrote: tcg/ should not depend on accel/tcg/, but perf and debuginfo support provided by the latter are being used by tcg/tcg.c. Since that's the only user, move both to tcg/. Suggested-by: Philippe Mathieu-Daudé Signed-off-by: Ilya Leoshkevich ---

Re: [PATCH 1/4] target: Make qemu_softmmu_page_mask() available for *-user

2023-06-30 Thread Philippe Mathieu-Daudé
On 30/6/23 22:36, Ilya Leoshkevich wrote: Currently qemu_softmmu_page_mask() is usable only from the softmmu s/qemu_softmmu_page_mask/qemu_target_page_mask/? code. Make it possible to use it from the *-user code as wel. Signed-off-by: Ilya Leoshkevich --- softmmu/physmem.c | 5 -

Re: [PATCH 2/4] tcg: Make tb_cflags() usable from target-agnostic code

2023-06-30 Thread Philippe Mathieu-Daudé
On 30/6/23 22:36, Ilya Leoshkevich wrote: Currently tb_cflags() is defined in exec-all.h, which is not usable from target-agnostic code. Move it to translation-block.h, which is. Signed-off-by: Ilya Leoshkevich --- include/exec/exec-all.h | 6 --

Re: [PATCH v3 00/14] Misc clean ups to target/ppc exception handling

2023-06-30 Thread BALATON Zoltan
On Fri, 30 Jun 2023, Daniel Henrique Barboza wrote: Patches 1, 2, 3, 5, 7 and 11 are queued. If you would be so kind to get the remaining patches, rebase them on top of my ppc-next and resend, I believe there's more stuff to be queued. Thanks for taking care of these. I'll do the rebase of

[PATCH] hw/vfio/pci-quirks: Sanitize capability pointer

2023-06-30 Thread Alex Williamson
Coverity reports a tained scalar when traversing the capabilities chain (CID 1516589). In practice I've never seen a device with a chain so broken as to cause an issue, but it's also pretty easy to sanitize. Fixes: f6b30c1984f7 ("hw/vfio/pci-quirks: Support alternate offset for GPUDirect

Re: [PATCH v2] piix: fix regression during unplug in Xen HVM domUs

2023-06-30 Thread Bernhard Beschow
Am 30. Juni 2023 11:32:42 UTC schrieb Olaf Hering : >Fri, 30 Jun 2023 08:05:29 + Bernhard Beschow : > >> Yes. Have a look for piix3/piix4 here: >> https://www.intel.com/design/archives/chipsets/440/index.htm > >This is hidden behind a login or whatever. None of the links ask annoying

Re: Unused variables in dbus_call_update_gl

2023-06-30 Thread Marc-André Lureau
Hi Richard On Fri, Jun 30, 2023 at 4:31 PM Richard Henderson < richard.hender...@linaro.org> wrote: > On 6/29/23 15:15, BALATON Zoltan wrote: > > On Thu, 29 Jun 2023, BALATON Zoltan wrote: > >> Hello, > >> > >> After recent commits I'm now getting: > >> > >> ../ui/dbus-listener.c: In function

[PATCH] audio: dbus requires pixman

2023-06-30 Thread marcandre . lureau
From: Marc-André Lureau Commit commit 6cc5a615 ("ui/dbus: win32 support") has broken audio/dbus compilation when pixman is not included. Fixes: https://gitlab.com/qemu-project/qemu/-/issues/1739 Signed-off-by: Marc-André Lureau --- audio/meson.build | 2 +- 1 file changed, 1 insertion(+), 1

Re: [PULL 17/33] ui/dbus: win32 support

2023-06-30 Thread Marc-André Lureau
Hi On Thu, Jun 29, 2023 at 7:55 PM Bernhard Beschow wrote: > > > Am 27. Juni 2023 13:02:14 UTC schrieb marcandre.lur...@redhat.com: > >From: Marc-André Lureau > > > >D-Bus doesn't support fd-passing on Windows (AF_UNIX doesn't have > >SCM_RIGHTS yet, but there are other means to share objects.

[PATCH v3 4/6] migration: Set migration status early in incoming side

2023-06-30 Thread Fabiano Rosas
We are sending a migration event of MIGRATION_STATUS_SETUP at qemu_start_incoming_migration but never actually setting the state. This creates a window between qmp_migrate_incoming and process_incoming_migration_co where the migration status is still MIGRATION_STATUS_NONE. Calling query-migrate

[PATCH v3 3/6] tests/qtest: migration: Use migrate_incoming_qmp where appropriate

2023-06-30 Thread Fabiano Rosas
Use the new migrate_incoming_qmp helper in the places that currently open-code calling migrate-incoming. Signed-off-by: Fabiano Rosas Reviewed-by: Juan Quintela --- tests/qtest/meson.build | 1 + tests/qtest/migration-test.c | 12 ++--- tests/qtest/virtio-net-failover.c | 77

[PATCH v3 2/6] tests/qtest: migration: Add migrate_incoming_qmp helper

2023-06-30 Thread Fabiano Rosas
file-based migration requires the target to initiate its migration after the source has finished writing out the data in the file. Currently there's no easy way to initiate 'migrate-incoming', allow this by introducing migrate_incoming_qmp helper, similarly to migrate_qmp. Also make sure

[PATCH v3 5/6] tests/qtest: migration: Add support for negative testing of qmp_migrate

2023-06-30 Thread Fabiano Rosas
There is currently no way to write a test for errors that happened in qmp_migrate before the migration has started. Add a version of qmp_migrate that ensures an error happens. To make use of it a test needs to set MigrateCommon.result as MIG_TEST_QMP_ERROR. Signed-off-by: Fabiano Rosas ---

[PATCH v3 6/6] tests/qtest: migration-test: Add tests for file-based migration

2023-06-30 Thread Fabiano Rosas
Add basic tests for file-based migration. Signed-off-by: Fabiano Rosas --- tests/qtest/migration-test.c | 99 1 file changed, 99 insertions(+) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index 2fdf6a115e..a180f53b5a 100644 ---

[PATCH v3 0/6] migration: Test the new "file:" migration

2023-06-30 Thread Fabiano Rosas
Based-on: [PATCH V4 0/2] migration file URI https://lore.kernel.org/r/1688135108-316997-1-git-send-email-steven.sist...@oracle.com Since v2: - removed the extra setup event. Libvirt has been enabling events for a long time, it should be safe - fixed small issues pointed out by Peter (leaking

[PATCH v3 1/6] tests/qtest: migration: Expose migrate_set_capability

2023-06-30 Thread Fabiano Rosas
The following patch will make use of this function from within migrate-helpers.c, so move it there. Reviewed-by: Juan Quintela Reviewed-by: Thomas Huth Signed-off-by: Fabiano Rosas --- tests/qtest/migration-helpers.c | 11 +++ tests/qtest/migration-helpers.h | 3 +++

[PATCH 3/4] accel/tcg: Remove #ifdef TARGET_I386 from perf.c

2023-06-30 Thread Ilya Leoshkevich
Preparation for moving perf.c to tcg/. This affects only profiling guest code, which has code in a non-0 based segment, e.g., 16-bit code, which is not particularly important. Suggested-by: Richard Henderson Signed-off-by: Ilya Leoshkevich --- accel/tcg/perf.c | 4 1 file changed, 4

[PATCH 0/4] accel/tcg: Move perf and debuginfo support to tcg

2023-06-30 Thread Ilya Leoshkevich
Hi, This series is a follow-up to discussion in [1]; the goal is to build perf and debuginfo support only one time. I had to move tb_cflags() and qemu_target_page_mask(), and I'm not sure if my choices there are perfect. Please let me know if there are better locations for them. Best regards,

[PATCH 4/4] accel/tcg: Move perf and debuginfo support to tcg

2023-06-30 Thread Ilya Leoshkevich
tcg/ should not depend on accel/tcg/, but perf and debuginfo support provided by the latter are being used by tcg/tcg.c. Since that's the only user, move both to tcg/. Suggested-by: Philippe Mathieu-Daudé Signed-off-by: Ilya Leoshkevich --- accel/tcg/meson.build | 2 --

[PATCH 2/4] tcg: Make tb_cflags() usable from target-agnostic code

2023-06-30 Thread Ilya Leoshkevich
Currently tb_cflags() is defined in exec-all.h, which is not usable from target-agnostic code. Move it to translation-block.h, which is. Signed-off-by: Ilya Leoshkevich --- include/exec/exec-all.h | 6 -- include/exec/translation-block.h | 6 ++ 2 files changed, 6

[PATCH 1/4] target: Make qemu_softmmu_page_mask() available for *-user

2023-06-30 Thread Ilya Leoshkevich
Currently qemu_softmmu_page_mask() is usable only from the softmmu code. Make it possible to use it from the *-user code as wel. Signed-off-by: Ilya Leoshkevich --- softmmu/physmem.c | 5 - target/meson.build | 2 ++ target/target-common.c | 9 + 3 files changed, 11

Re: [PATCH v3 00/14] Misc clean ups to target/ppc exception handling

2023-06-30 Thread Daniel Henrique Barboza
Zoltan, Patches 1, 2, 3, 5, 7 and 11 are queued. If you would be so kind to get the remaining patches, rebase them on top of my ppc-next and resend, I believe there's more stuff to be queued. Thanks, Daniel On 6/15/23 20:03, BALATON Zoltan wrote: These are some small clean ups for

Re: [PATCH 0/2] target/sparc: Enable MTTCG

2023-06-30 Thread Mark Cave-Ayland
On 30/06/2023 19:05, Richard Henderson wrote: On 6/22/23 16:36, Mark Cave-Ayland wrote: On 20/06/2023 17:40, Richard Henderson wrote: With the addition of TCG_GUEST_DEFAULT_MO, there's nothing in the cpu emulation preventing this from working.  There is some board model work to be done for

Re: [PATCH] sungem: Add WOL MMIO

2023-06-30 Thread Daniel Henrique Barboza
On 6/25/23 17:16, Nicholas Piggin wrote: Apple sungem devices are expected to have WOL MMIO registers. Add a region to prevent transaction failures, and implement the WOL-disable CSR write because the Linux driver reset writes this. Signed-off-by: Nicholas Piggin --- Queued in

Re: [PATCH 08/24] bsd-user: Use page_check_range_empty for MAP_EXCL

2023-06-30 Thread Richard Henderson
On 6/30/23 20:46, Warner Losh wrote: On Fri, Jun 30, 2023 at 7:22 AM Richard Henderson > wrote: The previous check returned -1 when any page within [start, start+len) is unmapped, not when all are unmapped. Cc: Warner Losh

Re: [RFC 5/7] hw/cxl/cxl-mailbox-utils: Add mailbox commands to support add/release dynamic capacity response

2023-06-30 Thread ni...@outlook.com
The 05/15/2023 15:37, Jonathan Cameron wrote: > On Thu, 11 May 2023 17:56:40 + > Fan Ni wrote: > > > From: Fan Ni > > > > Per CXL spec 3.0, we implemented the two mailbox commands: > > Add Dynamic Capacity Response (Opcode 4802h) 8.2.9.8.9.3, and > > Release Dynamic Capacity Response

Re: [PATCH] pnv/xive2: Allow indirect TIMA accesses of all sizes

2023-06-30 Thread Daniel Henrique Barboza
Queued in gitlab.com/danielhb/qemu/tree/ppc-next. Thanks, Daniel On 6/26/23 06:40, Frederic Barrat wrote: Booting linux on the powernv10 machine logs a few errors like: Invalid read at addr 0x38, size 1, region 'xive-ic-tm-indirect', reason: invalid size (min:8 max:8) Invalid write at addr

Re: [PATCH 1/2] target/ppc: Fix icount access for some hypervisor instructions

2023-06-30 Thread Daniel Henrique Barboza
On 6/25/23 07:36, Nicholas Piggin wrote: Several instructions and register access require icount reads and are missing translator_io_start(). Signed-off-by: Nicholas Piggin --- Queued in gitlab.com/danielhb/qemu/tree/ppc-next. Thanks, Daniel target/ppc/translate.c | 7 +++ 1

Re: [PATCH 2/2] tests/avocado: record_replay test for ppc powernv machine

2023-06-30 Thread Daniel Henrique Barboza
On 6/25/23 07:37, Nicholas Piggin wrote: The powernv machine can boot Linux to VFS mount with icount enabled. Add a test case for it. Signed-off-by: Nicholas Piggin --- Queued in gitlab.com/danielhb/qemu/tree/ppc-next. Thanks, Daniel tests/avocado/replay_kernel.py | 16

Re: [PATCH 0/2] target/ppc: Easy parts of the POWER chiptod series

2023-06-30 Thread Daniel Henrique Barboza
On 6/29/23 01:58, Cédric Le Goater wrote: On 6/25/23 14:03, Nicholas Piggin wrote: Cedric kindly reviewed these already so I think they should be good to go now. This is just a rebase and slight rewording the changelog. Still haven't completed the main chiptod device yet. Thanks, Nick

Re: [PATCH 2/2] target/ppc: Add TFMR SPR implementation with read and write helpers

2023-06-30 Thread Daniel Henrique Barboza
On 6/25/23 09:03, Nicholas Piggin wrote: TFMR is the Time Facility Management Register which is specific to POWER CPUs, and used for the purpose of timebase management (generally by firmware, not the OS). Add helpers for the TFMR register, which will form part of the core timebase facility

Re: [PATCH 1/2] target/ppc: Tidy POWER book4 SPR registration

2023-06-30 Thread Daniel Henrique Barboza
On 6/25/23 09:03, Nicholas Piggin wrote: POWER book4 (implementation-specific) SPRs are sometimes in their own functions, but in other cases are mixed with architected SPRs. Do some spring cleaning on these. Reviewed-by: Cédric Le Goater Signed-off-by: Nicholas Piggin --- Queued in

Re: [PATCH] os-posix: Allow 'chroot' via '-run-with' and deprecate the old '-chroot' option

2023-06-30 Thread Ján Tomko
On a Friday in 2023, Thomas Huth wrote: We recently introduced "-run-with" for options that influence the runtime behavior of QEMU. This option has the big advantage that it can group related options (so that it is easier for the users to spot them) and that the options become introspectable via

Re: [PATCH 08/24] bsd-user: Use page_check_range_empty for MAP_EXCL

2023-06-30 Thread Warner Losh
On Fri, Jun 30, 2023 at 7:22 AM Richard Henderson < richard.hender...@linaro.org> wrote: > The previous check returned -1 when any page within > [start, start+len) is unmapped, not when all are unmapped. > > Cc: Warner Losh > Cc: Kyle Evans > Signed-off-by: Richard Henderson > --- >

Re: RFC: bsd-user broken a while ago, is this the right fix?

2023-06-30 Thread Warner Losh
On Fri, Jun 30, 2023 at 12:24 PM Richard Henderson < richard.hender...@linaro.org> wrote: > On 6/26/23 11:52, Richard Henderson wrote: > > On 6/26/23 10:28, Daniel P. Berrangé wrote: > >> Just CC'ing Richard to make sure it catches his attention. > >> > >> On Sat, Jun 24, 2023 at 12:40:33AM

Re: RFC: bsd-user broken a while ago, is this the right fix?

2023-06-30 Thread Richard Henderson
On 6/26/23 11:52, Richard Henderson wrote: On 6/26/23 10:28, Daniel P. Berrangé wrote: Just CC'ing Richard to make sure it catches his attention. On Sat, Jun 24, 2023 at 12:40:33AM -0600, Warner Losh wrote: This change: commit f00506aeca2f6d92318967693f8da8c713c163f3 Merge: d37158bb242

[PATCH v4 19/38] plugins: force slow path when plugins instrument memory ops

2023-06-30 Thread Alex Bennée
The lack of SVE memory instrumentation has been an omission in plugin handling since it was introduced. Fortunately we can utilise the probe_* functions to force all all memory access to follow the slow path. We do this by checking the access type and presence of plugin memory callbacks and if set

[PATCH v4 22/38] docs/devel: add some front matter to the devel index

2023-06-30 Thread Alex Bennée
Give an overview of the most useful bits of the devel documentation to read depending on what the developer wants to do. Reviewed-by: Peter Maydell Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Message-Id:

[PATCH v4 15/38] tests/docker: convert riscv64-cross to lcitool

2023-06-30 Thread Alex Bennée
We still need to base this on Debian Sid until riscv64 is promoted to a release architecture (or another distro provides a full cross compile target). We use the new qemu-minimal project description to avoid bringing in all the extra dependencies because every extra package is another chance for

[PATCH v4 23/38] include/migration: mark vmstate_register() as a legacy function

2023-06-30 Thread Alex Bennée
Mention that QOM-ified devices already have support for registering the description. Reviewed-by: Juan Quintela Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Acked-by: Peter Xu Signed-off-by: Alex Bennée Message-Id: <20230619171437.357374-3-alex.ben...@linaro.org> ---

[PATCH v4 18/38] target/arm: make arm_casq_ptw CONFIG_TCG only

2023-06-30 Thread Alex Bennée
The ptw code is accessed by non-TCG code (specifically arm_pamax and arm_cpu_get_phys_page_attrs_debug) but most of it is really only for TCG emulation. Seeing as we already assert for a non TARGET_AARCH64 build lets extend the test rather than further messing with the ifdef ladder.

[PATCH v4 37/38] docs: Document security implications of debugging

2023-06-30 Thread Alex Bennée
From: Ilya Leoshkevich Now that the GDB stub explicitly implements reading host files (note that it was already possible by changing the emulated code to open and read those files), concerns may arise that it undermines security. Document the status quo, which is that the users are already

[PATCH v4 36/38] gdbstub: Add support for info proc mappings

2023-06-30 Thread Alex Bennée
From: Ilya Leoshkevich Currently the GDB's generate-core-file command doesn't work well with qemu-user: the resulting dumps are huge [1] and at the same time incomplete (argv and envp are missing). The reason is that GDB has no access to proc mappings and therefore has to fall back to using

[PATCH v4 30/38] gdbstub: clean-up vcont handling to avoid goto

2023-06-30 Thread Alex Bennée
We can handle all the error exit cases by using g_autofree() for the one thing that needs cleaning up on the exit. Message-Id: <20230627160943.2956928-29-alex.ben...@linaro.org> Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé --- gdbstub/gdbstub.c

[PATCH v4 33/38] linux-user: Emulate /proc/self/smaps

2023-06-30 Thread Alex Bennée
From: Ilya Leoshkevich /proc/self/smaps is an extension of /proc/self/maps: it provides the same lines, plus additional information about each range. GDB uses /proc/self/smaps when available, which means that generate-core-file tries it first before falling back to /proc/self/maps. This, in

[PATCH v4 26/38] docs/devel: split qom-api reference into new file

2023-06-30 Thread Alex Bennée
Lets try and keep the overview of the sub-system digestible by splitting the core API stuff into a separate file. As QOM and QDEV work together we should also try and enumerate the qdev_ functions. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée Message-Id:

[PATCH v4 29/38] gdbstub: Permit reverse step/break to provide stop response

2023-06-30 Thread Alex Bennée
From: Nicholas Piggin The final part of the reverse step and break handling is to bring the machine back to a debug stop state. gdb expects a response. A gdb 'rsi' command hangs forever because the gdbstub filters out the response (also observable with reverse_debugging.py avocado tests). Fix

[PATCH v4 28/38] gdbstub: lightly refactor connection to avoid snprintf

2023-06-30 Thread Alex Bennée
This may be a bit too much to avoid an snprintf and the slightly dodgy assign to a const variable. But hopefully not. Signed-off-by: Alex Bennée --- v2 - fix checkpatch warning --- gdbstub/softmmu.c | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git

[PATCH v4 17/38] tests/avocado: Make the test_arm_bpim2u_gmac test more reliable

2023-06-30 Thread Alex Bennée
From: Thomas Huth The test_arm_bpim2u_gmac test sometimes fails (ca. 1 out of 20 runs here) since the disk shows up as /dev/mmcblk1 instead of /dev/mmcblk0 in some runs. No matter of the name in /dev, the major:minor encoding seems always to be the same, so we can fix this issue by using the

Re: [PATCH] target/nios2 : Explicitly ask for target-endian loads and stores

2023-06-30 Thread Richard Henderson
On 6/23/23 19:25, Peter Maydell wrote: When we generate code for guest loads and stores, at the moment they end up being requests for a host-endian access. So for target-system-nios2 (little endian) a load like ldwr3,0(r4) results on an x86 host in the TCG IR qemu_ld_a32_i32

[PATCH v4 24/38] include/hw/qdev-core: fixup kerneldoc annotations

2023-06-30 Thread Alex Bennée
Fix up the kerneldoc markup and start documenting the various fields in QDEV related structures. This involved: - moving overall description to a DOC: comment at top - fixing various markup issues for types and structures - adding missing Return: statements - adding some typedefs to hide

[PATCH v4 16/38] tests/avocado: update firmware to enable sbsa-ref/max

2023-06-30 Thread Alex Bennée
From: Marcin Juszkiewicz Update prebuilt firmware images to have TF-A with FEAT_FGT support enabled. This allowed us to enable test for "max" cpu in sbsa-ref machine. Signed-off-by: Marcin Juszkiewicz Message-Id: <20230530152240.79160-1-marcin.juszkiew...@linaro.org> Signed-off-by: Alex Bennée

[PATCH v4 21/38] plugins: update lockstep to use g_memdup2

2023-06-30 Thread Alex Bennée
The old g_memdup is deprecated, use the replacement. Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230627160943.2956928-20-alex.ben...@linaro.org> Reviewed-by: Richard Henderson Signed-off-by: Alex Bennée --- contrib/plugins/lockstep.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH v4 31/38] linux-user: Expose do_guest_openat() and do_guest_readlink()

2023-06-30 Thread Alex Bennée
From: Ilya Leoshkevich These functions will be required by the GDB stub in order to provide the guest view of /proc to GDB. Reviewed-by: Alex Bennée Signed-off-by: Ilya Leoshkevich Reviewed-by: Richard Henderson Message-Id: <20230621203627.1808446-2-...@linux.ibm.com> Signed-off-by: Alex

[PATCH v4 27/38] docs/devel: introduce some key concepts for QOM development

2023-06-30 Thread Alex Bennée
Using QOM correctly is increasingly important to maintaining a modern code base. However the current documentation skips some important concepts before launching into a simple example. Lets: - at least mention properties - mention TYPE_OBJECT and TYPE_DEVICE - talk about why we have

[PATCH v4 20/38] plugins: fix memory leak while parsing options

2023-06-30 Thread Alex Bennée
It was hard to track down this leak as it was an internal allocation by glib and the backtraces did not give much away. The autofree was freeing the allocation with g_free() but not taking care of the individual strings. They should have been freed with g_strfreev() instead. Searching the glib

[PATCH v4 35/38] gdbstub: Report the actual qemu-user pid

2023-06-30 Thread Alex Bennée
From: Ilya Leoshkevich Currently qemu-user reports pid 1 to GDB. Resolve the TODO and report the actual PID. Using getpid() relies on the assumption that there is only one GDBProcess. Add an assertion to make sure that future changes don't break it. Reviewed-by: Alex Bennée Signed-off-by: Ilya

[PATCH v4 25/38] docs/devel/qom.rst: Correct code style

2023-06-30 Thread Alex Bennée
From: Philippe Mathieu-Daudé Per commit 067109a11c ("docs/devel: mention the spacing requirement for QOM"): For a storage structure the first declaration should always be called “parent_obj” and for a class structure the first member should always be called “parent_class” Adapt the QOM

[PATCH v4 34/38] gdbstub: Expose gdb_get_process() and gdb_get_first_cpu_in_process()

2023-06-30 Thread Alex Bennée
From: Ilya Leoshkevich These functions will be needed by user-target.c in order to retrieve the name of the executable. Reviewed-by: Alex Bennée Signed-off-by: Ilya Leoshkevich Message-Id: <20230621203627.1808446-5-...@linux.ibm.com> Signed-off-by: Alex Bennée --- gdbstub/internals.h | 2

[PATCH v4 32/38] linux-user: Add "safe" parameter to do_guest_openat()

2023-06-30 Thread Alex Bennée
From: Ilya Leoshkevich gdbstub cannot meaningfully handle QEMU_ERESTARTSYS, and it doesn't need to. Add a parameter to do_guest_openat() that makes it use openat() instead of safe_openat(), so that it becomes usable from gdbstub. Signed-off-by: Ilya Leoshkevich Reviewed-by: Richard Henderson

[PATCH v4 03/38] gitlab: reduce testing scope of check-gcov

2023-06-30 Thread Alex Bennée
This keeps timing out on gitlab due to some qtests taking a long time. As this is just ensuring the gcov machinery is working and not attempting to be comprehensive lets skip qtest in this run. Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230623122100.1640995-4-alex.ben...@linaro.org>

[PATCH v4 11/38] tests/lcitool: update to latest version

2023-06-30 Thread Alex Bennée
We need this for the riscv64 and gcc-native mappings. As the older alpine release has been dropped from the mappings we also need to bump the version of alpine we use. Message-Id: <20230623122100.1640995-13-alex.ben...@linaro.org> Acked-by: Richard Henderson Signed-off-by: Alex Bennée ---

[PATCH v4 01/38] gitlab: explicit set artifacts publishing criteria

2023-06-30 Thread Alex Bennée
From: Daniel P. Berrangé If not set explicitly, gitlab assumes 'when: on_success" as the publishing criteria for artifacts. This is reasonable if the artifact is an output deliverable of the job. This is useless if the artifact is a log file to be used for debugging job failures. This change

Re: [PATCH 0/2] target/sparc: Enable MTTCG

2023-06-30 Thread Richard Henderson
On 6/22/23 16:36, Mark Cave-Ayland wrote: On 20/06/2023 17:40, Richard Henderson wrote: With the addition of TCG_GUEST_DEFAULT_MO, there's nothing in the cpu emulation preventing this from working.  There is some board model work to be done for sparc64, where max_cpus = 1. I've tried testing

[PATCH v4 09/38] tests/docker: add test-fuzz

2023-06-30 Thread Alex Bennée
Running the fuzzer requires some hoop jumping and some problems only show up in containers. This basically replicates the build-oss-fuzz job from our CI so we can run in the same containers we use in CI. Message-Id: <20230626215926.2522656-10-alex.ben...@linaro.org> Reviewed-by: Alexander Bulekov

[PATCH v4 08/38] tests/qtests: clean-up and fix leak in generic_fuzz

2023-06-30 Thread Alex Bennée
An update to the clang tooling detects more issues with the code including a memory leak from the g_string_new() allocation. Clean up the code to avoid the allocation and use ARRAY_SIZE while we are at it. Signed-off-by: Alex Bennée --- v3 - use g_strconcat instead ---

[PATCH v4 05/38] tests/tcg: add mechanism to handle plugin arguments

2023-06-30 Thread Alex Bennée
We recently missed a regression that should have been picked up by check-tcg. This was because the libmem plugin is effectively a NOP if the user doesn't specify the type to use. Rather than changing the default behaviour add an additional expansion so we can take this into account in future.

[PATCH v4 12/38] tests/lcitool: Bump fedora container versions

2023-06-30 Thread Alex Bennée
From: Erik Skultety Fedora 37 -> 38 Signed-off-by: Erik Skultety Acked-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230627160943.2956928-13-alex.ben...@linaro.org> Message-Id: [AJB: Dropped alpine (in prev commit), reflow commit msg] Signed-off-by: Alex Bennée

[PATCH v4 04/38] docs/devel: remind developers to run CI container pipeline when updating images

2023-06-30 Thread Alex Bennée
From: Ani Sinha When new dependencies and packages are added to containers, its important to run CI container generation pipelines on gitlab to make sure that there are no obvious conflicts between packages that are being added and those that are already present. Running CI container pipelines

[PATCH v4 14/38] tests/lcitool: introduce qemu-minimal

2023-06-30 Thread Alex Bennée
This is a very bare bones set of dependencies for a minimal build of QEMU. This will be useful for minimal cross-compile sanity check based on things like Debian Sid where stuff isn't always in sync. Message-Id: <20230623122100.1640995-16-alex.ben...@linaro.org> Signed-off-by: Alex Bennée ---

[PATCH v4 38/38] tests/tcg: Add a test for info proc mappings

2023-06-30 Thread Alex Bennée
From: Ilya Leoshkevich Add a small test to prevent regressions. Signed-off-by: Ilya Leoshkevich Message-Id: <20230621203627.1808446-9-...@linux.ibm.com> Signed-off-by: Alex Bennée --- tests/tcg/multiarch/Makefile.target | 9 ++- .../multiarch/gdbstub/test-proc-mappings.py | 65

[PATCH v4 07/38] scripts/oss-fuzz: add a suppression for keymap

2023-06-30 Thread Alex Bennée
When updating to the latest fedora the santizer found more leaks inside xkbmap: FAILED: pc-bios/keymaps/ar /builds/stsquad/qemu/build-oss-fuzz/qemu-keymap -f pc-bios/keymaps/ar -l ara = ==3604==ERROR: LeakSanitizer: detected

[PATCH v4 00/38] maintainer omnibus: testing, fuzz, plugins, documentation, gdbstub (pre-PR)

2023-06-30 Thread Alex Bennée
As softfreeze is fast approaching I thought it would be work combining my various trees into an omnibus series to ease the review and merging. The testing updates exposed a number of latent leaks that confused the oss-fuzz jobs (hence the test-fuzz addition to help debug that). This also includes

[PATCH v4 10/38] Makefile: add lcitool-refresh to UNCHECKED_GOALS

2023-06-30 Thread Alex Bennée
This is yet another make target you usually run in the top level of the source directory. Message-Id: <20230623122100.1640995-12-alex.ben...@linaro.org> Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Alex Bennée --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v4 06/38] qemu-keymap: properly check return from xkb_keymap_mod_get_index

2023-06-30 Thread Alex Bennée
We can return XKB_MOD_INVALID for AltGr which rightly gets flagged by sanitisers as an overly wide shift attempt. Properly check the return type and leave the bitmap as zero in that case. Tested output before and after is unchanged with the gb and ara keymaps. Signed-off-by: Alex Bennée

[PATCH v4 13/38] tests/lcitool: add an explicit gcc-native package

2023-06-30 Thread Alex Bennée
We need a native compiler to build the hexagon codegen tools. In our current images we already have a gcc as a side effect of a broken dependency between gcovr and lcov but this will be fixed when we move to bookworm. See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=987818 for details.

[PATCH v4 02/38] gitlab: ensure coverage job also publishes meson log

2023-06-30 Thread Alex Bennée
From: Daniel P. Berrangé The coverage job wants to publish a coverage report on success, but the tests might fail and in that case we need the meson logs for debugging. Signed-off-by: Daniel P. Berrangé Reviewed-by: Richard Henderson Message-Id:

Re: [PATCH] tests/avocado: Make the test_arm_bpim2u_gmac test more reliable

2023-06-30 Thread Alex Bennée
Thomas Huth writes: > The test_arm_bpim2u_gmac test sometimes fails (ca. 1 out of 20 runs > here) since the disk shows up as /dev/mmcblk1 instead of /dev/mmcblk0 > in some runs. No matter of the name in /dev, the major:minor encoding > seems always to be the same, so we can fix this issue by

Re: [PATCH] linux-user/i386: Properly align signal frame

2023-06-30 Thread Richard Henderson
Ping 2. On 6/20/23 15:26, Richard Henderson wrote: Ping. On 5/24/23 07:46, Richard Henderson wrote: The beginning of the structure, with pretaddr, should be just below 16-byte alignment.  Disconnect fpstate from sigframe, just like the kernel does. Signed-off-by: Richard Henderson ---  

Re: [PATCH v3 1/8] target/arm: Add ID_AA64ISAR2_EL1

2023-06-30 Thread Richard Henderson
On 6/19/23 12:51, Peter Maydell wrote: On Mon, 12 Jun 2023 at 14:18, Aaron Lindsay wrote: On Jun 09 13:49, Richard Henderson wrote: On 6/9/23 10:23, Aaron Lindsay wrote: --- a/target/arm/hvf/hvf.c +++ b/target/arm/hvf/hvf.c @@ -847,6 +847,7 @@ static bool

Re: [PATCH v6] riscv: Add support for the Zfa extension

2023-06-30 Thread Richard Henderson
On 6/30/23 19:02, Christoph Muellner wrote: From: Christoph Müllner This patch introduces the RISC-V Zfa extension, which introduces additional floating-point instructions: * fli (load-immediate) with pre-defined immediates * fminm/fmaxm (like fmin/fmax but with different NaN behaviour) *

Re: Request for Assistance: Adding I2C Support in QEMU for Raspberry Pi (BCM2835 Peripherals)

2023-06-30 Thread Shivam
One more thing I have tried to add this -device pca9552,address=0x60 after QEMU command means i2c-bus is added right ?

Re: [PATCH v5] riscv: Add support for the Zfa extension

2023-06-30 Thread Richard Henderson
On 6/30/23 17:11, Christoph Müllner wrote: On Fri, Jun 30, 2023 at 4:03 PM Richard Henderson wrote: On 6/30/23 13:52, Christoph Muellner wrote: +bool trans_fmvh_x_d(DisasContext *ctx, arg_fmvh_x_d *a) +{ +REQUIRE_FPU; +REQUIRE_ZFA(ctx); +REQUIRE_EXT(ctx, RVD); +

Re: [RFC PATCH] tcg: Reduce tcg_assert_listed_vecop() scope

2023-06-30 Thread Richard Henderson
On 6/29/23 11:11, Philippe Mathieu-Daudé wrote: tcg_assert_listed_vecop() is only used in tcg-op-vec.c. Signed-off-by: Philippe Mathieu-Daudé --- RFC: Maybe we plan to use it in tcg-op-gvec.c? Whatever any future reference, it doesn't need to be in tcg/tcg.h. Queued to tcg-next. r~

[PATCH v6] riscv: Add support for the Zfa extension

2023-06-30 Thread Christoph Muellner
From: Christoph Müllner This patch introduces the RISC-V Zfa extension, which introduces additional floating-point instructions: * fli (load-immediate) with pre-defined immediates * fminm/fmaxm (like fmin/fmax but with different NaN behaviour) * fround/froundmx (round to integer) * fcvtmod.w.d

Re: [PATCH] pnv/psi: Allow access to PSI registers through xscom

2023-06-30 Thread Daniel Henrique Barboza
On 6/30/23 07:26, Frederic Barrat wrote: skiboot only uses mmio to access the PSI registers (once the BAR is set) but we don't have any reason to block the accesses through xscom. This patch enables xscom access to the PSI registers. It converts the xscom addresses to mmio addresses, which

Re: [PATCH] target/ppc: Make HDECR underflow edge triggered

2023-06-30 Thread Daniel Henrique Barboza
On 6/25/23 09:20, Nicholas Piggin wrote: HDEC interrupts are edge-triggered on HDECR underflow (notably different from DEC which is level-triggered). HDEC interrupts already clear the irq on delivery so that does not need to be changed. Signed-off-by: Nicholas Piggin --- Queued in

Re: [PATCH] hw/ppc: Fix clock update drift

2023-06-30 Thread Daniel Henrique Barboza
On 6/28/23 23:07, Nicholas Piggin wrote: The clock update logic reads the clock twice to compute the new clock value, with a value derived from the later time subtracted from a value derived from the earlier time. The delta causes time to be lost. This can ultimately result in time becoming

Re: [PATCH] target/ppc: Only generate decodetree files when TCG is enabled

2023-06-30 Thread Daniel Henrique Barboza
On 6/26/23 11:01, Philippe Mathieu-Daudé wrote: No need to generate TCG-specific decodetree files when TCG is disabled. Signed-off-by: Philippe Mathieu-Daudé --- Queued in gitlab.com/danielhb/qemu/tree/ppc-next. Thanks, Daniel target/ppc/meson.build | 2 +- 1 file changed, 1

Re: [PATCH] mv64361: Add dummy gigabit ethernet PHY access registers

2023-06-30 Thread Daniel Henrique Barboza
On 6/14/23 16:21, BALATON Zoltan wrote: On Mon, 5 Jun 2023, BALATON Zoltan wrote: We don't emulate the gigabit ethernet part of the chip but the MorphOS driver accesses these and expects to get some valid looking result otherwise it hangs. Add some minimal dummy implementation to avoid rhis.

Re: Request for Assistance: Adding I2C Support in QEMU for Raspberry Pi (BCM2835 Peripherals)

2023-06-30 Thread Shivam
Hi , I Integrated the i2c controller inside the bcm2835_peripheral.c , but on running this command(sudo i2cdetect -y 1) I am getting error Error: Could not open file `/dev/i2c-1' or `/dev/i2c/1': No such file or directory I am not able to understand how it is mapped to the i2c controller device

  1   2   3   4   5   >