[PATCH 09/21] console/win32: allocate shareable display surface

2023-06-06 Thread marcandre . lureau
From: Marc-André Lureau Introduce qemu_win32_map_alloc() and qemu_win32_map_free() to allocate shared memory mapping. The handle can be used to share the mapping with another process. Teach qemu_create_displaysurface() to allocate shared memory. Following patches will introduce other places for

[PATCH 19/21] ui: add optional d3d texture pointer to scanout texture

2023-06-06 Thread marcandre . lureau
From: Marc-André Lureau The following patch will get the underlying D3D11 Texture2D from the virgl renderer scanout. Pass it along to the texture scanout callbacks as a priliminary step, to simplify review. Signed-off-by: Marc-André Lureau --- include/ui/console.h | 7 +-- includ

[PATCH 02/21] ui/egl: fix make_context_current() callback return value

2023-06-06 Thread marcandre . lureau
From: Marc-André Lureau eglMakeCurrent() returns 1/EGL_TRUE on success. This is not what the callback expects, where 0 indicates success. While at it, print the EGL error to ease debugging. As with virgl_renderer_callbacks, the return value is now checked since version >= 4: https://gitlab.free

[PATCH 03/21] ui/dbus: compile without gio/gunixfdlist.h

2023-06-06 Thread marcandre . lureau
From: Marc-André Lureau D-Bus on windows doesn't support fd-passing. Let's isolate the fdlist-related code as a first step, before adding Windows support, using another mechanism. Signed-off-by: Marc-André Lureau --- audio/dbusaudio.c | 7 +++ ui/dbus-chardev.c | 6 ++ ui/dbus-consol

[PATCH 21/21] ui/dbus: use shared D3D11 Texture2D when possible

2023-06-06 Thread marcandre . lureau
From: Marc-André Lureau When the client implements "org.qemu.Display1.Listener.Win32.D3d11" and we are running on ANGLE/win32, share the scanout texture with the peer process, and draw with ScanoutTexture2d/UpdateTexture2d methods. Signed-off-by: Marc-André Lureau --- ui/dbus-listener.c | 29

[PATCH 18/21] ui/egl: query ANGLE d3d device

2023-06-06 Thread marcandre . lureau
From: Marc-André Lureau Check if ANGLE is being used with D3D backend. Signed-off-by: Marc-André Lureau --- include/ui/egl-helpers.h | 1 + ui/egl-helpers.c | 32 +++- ui/trace-events | 3 +++ 3 files changed, 35 insertions(+), 1 deletion(-) diff

[PATCH 20/21] virtio-gpu-virgl: use D3D11_SHARE_TEXTURE when available

2023-06-06 Thread marcandre . lureau
From: Marc-André Lureau Enable D3D texture sharing when possible, and pass it to the texture display callbacks. Signed-off-by: Marc-André Lureau --- meson.build | 6 ++ hw/display/virtio-gpu-virgl.c | 24 +++- 2 files changed, 25 insertions(+), 5 dele

[PATCH 15/21] ui/dbus: add GL support on win32

2023-06-06 Thread marcandre . lureau
From: Marc-André Lureau Enable usage of dbus,gl= on win32. At this point, the scanout texture is read on the DisplaySurface memory, and the client is then updated with the "2D" API (with shared memory if possible). Signed-off-by: Marc-André Lureau --- ui/dbus-listener.c | 98 ++

[PATCH 11/21] ui/dbus: use shared memory when possible on win32

2023-06-06 Thread marcandre . lureau
From: Marc-André Lureau When the display surface has an associated HANDLE, we can duplicate it to the client process and let it map the memory to avoid expensive copies. Introduce two new win32-specific methods ScanoutMap and UpdateMap. The first is used to inform the listener about the a shared

Re: [PATCH v5 2/9] migration: Implement switchover ack logic

2023-06-06 Thread Avihai Horon
On 06/06/2023 1:06, Alex Williamson wrote: External email: Use caution opening links or attachments On Tue, 30 May 2023 17:48:14 +0300 Avihai Horon wrote: Implement switchover ack logic. This prevents the source from stopping the VM and completing the migration until an ACK is received fro

Re: [PATCH 0/2] allwinner-a10: Fix interrupt controller regression

2023-06-06 Thread Philippe Mathieu-Daudé
On 6/6/23 12:46, Peter Maydell wrote: Peter Maydell (2): hw/intc/allwinner-a10-pic: Handle IRQ levels other than 0 or 1 hw/sd/allwinner-sdhost: Don't send non-boolean IRQ line levels Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH v3 10/23] q800: reimplement mac-io region aliasing using IO memory region

2023-06-06 Thread Philippe Mathieu-Daudé
On 6/6/23 08:33, Mark Cave-Ayland wrote: On 05/06/2023 13:43, Philippe Mathieu-Daudé wrote: On 4/6/23 15:14, Mark Cave-Ayland wrote: The current use of aliased memory regions causes us 2 problems: firstly the output of "info qom-tree" is absolutely huge and difficult to read, and secondly we

Re: [PATCH 2/2] hw/sd/allwinner-sdhost: Don't send non-boolean IRQ line levels

2023-06-06 Thread Philippe Mathieu-Daudé
Hi Peter, On 6/6/23 12:46, Peter Maydell wrote: QEMU allows qemu_irq lines to transfer arbitrary integers. However the convention is that for a simple IRQ line the values transferred are always 0 and 1. The A10 SD controller device instead assumes a 0-vs-non-0 convention, which happens to work

Re: [PATCH 1/2] migration: switchover-hold parameter

2023-06-06 Thread Avihai Horon
On 05/06/2023 19:06, Peter Xu wrote: External email: Use caution opening links or attachments On Mon, Jun 05, 2023 at 03:27:53PM +0300, Avihai Horon wrote: Hi Peter, On 02/06/2023 17:47, Peter Xu wrote: External email: Use caution opening links or attachments Add a new migration paramete

Re: [PATCH] hw/acpi: Fix PM control register access

2023-06-06 Thread Igor Mammedov
On Sun, 28 May 2023 15:57:50 +0200 (CEST) BALATON Zoltan wrote: > On pegasos2 which has ACPI as part of VT8231 south bridge the board > firmware writes PM control register by accessing the second byte so > addr will be 1. This wasn't handled correctly and the write went to > addr 0 instead. This

Re: [PATCH v3] target/riscv: Smepmp: Return error when access permission not allowed in PMP

2023-06-06 Thread Daniel Henrique Barboza
On 6/5/23 13:45, Himanshu Chauhan wrote: On an address match, skip checking for default permissions and return error based on access defined in PMP configuration. v3 Changes: o Removed explicit return of boolean value from comparision of priv/allowed_priv v2 Changes: o Removed goto to ret

Re: [RFC v1 4/4] qemu: adjust queried bar size to power-of-2

2023-06-06 Thread Alex Williamson
On Mon, 5 Jun 2023 16:50:05 -0700 wrote: > From: Ankit Agrawal > > The GPU device memory is reported to the VM as a BAR. The device memory > may not be aligned to the power-of-2, but the QEMU expects the PCI BAR to > be. Align the reported device memory size to the next power-of-2 before > QEMU

Re: [PATCH 2/2] hw/sd/allwinner-sdhost: Don't send non-boolean IRQ line levels

2023-06-06 Thread Peter Maydell
On Tue, 6 Jun 2023 at 13:39, Philippe Mathieu-Daudé wrote: > > Hi Peter, > > On 6/6/23 12:46, Peter Maydell wrote: > > QEMU allows qemu_irq lines to transfer arbitrary integers. However > > the convention is that for a simple IRQ line the values transferred > > are always 0 and 1. The A10 SD con

Re: [PATCH] virtio-net: correctly report maximum tx_queue_size value

2023-06-06 Thread Michael S. Tsirkin
On Mon, Jun 05, 2023 at 04:21:25PM +0200, Laurent Vivier wrote: > Maximum value for tx_queue_size depends on the backend type. > 1024 for vDPA/vhost-user, 256 for all the others. > > The value is returned by virtio_net_max_tx_queue_size() to set the > parameter: > > n->net_conf.tx_queue_size

Re: [PATCH 02/16] hw/riscv/virt.c: skip 'mmu-type' FDT if satp mode not set

2023-06-06 Thread Andrew Jones
On Tue, May 30, 2023 at 04:46:09PM -0300, Daniel Henrique Barboza wrote: > The absence of a satp mode in riscv_host_cpu_init() is causing the > following error: > > $ sudo ./qemu/build/qemu-system-riscv64 -machine virt,accel=kvm \ > -m 2G -smp 1 -nographic -snapshot \ > -kernel ./guest_i

Re: [PATCH 2/2] hw/sd/allwinner-sdhost: Don't send non-boolean IRQ line levels

2023-06-06 Thread Philippe Mathieu-Daudé
On 6/6/23 14:55, Peter Maydell wrote: On Tue, 6 Jun 2023 at 13:39, Philippe Mathieu-Daudé wrote: Hi Peter, On 6/6/23 12:46, Peter Maydell wrote: QEMU allows qemu_irq lines to transfer arbitrary integers. However the convention is that for a simple IRQ line the values transferred are always

[PATCH] xen-block: fix segv on unrealize

2023-06-06 Thread Anthony PERARD via
From: Anthony PERARD Backtrace: qemu_lockcnt_lock (lockcnt=0xb4) at ../util/lockcnt.c:238 aio_set_fd_handler (ctx=0x0, fd=51, is_external=true, io_read=0x0, io_write=0x0, io_poll=0x0, io_poll_ready=0x0, opaque=0x0) at ../util/aio-posix.c:119 xen_device_unbind_event_channel (xendev=0x55c6d

Re: [PATCH 03/16] target/riscv/cpu.c: restrict 'mvendorid' value

2023-06-06 Thread Andrew Jones
On Tue, May 30, 2023 at 04:46:10PM -0300, Daniel Henrique Barboza wrote: > We're going to change the handling of mvendorid/marchid/mimpid by the > KVM driver. Since these are always present in all CPUs let's put the > same validation for everyone. > > It doesn't make sense to allow 'mvendorid' to

[PATCH v3 6/8] gdbstub: Add support for info proc mappings

2023-06-06 Thread 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 heuristics for discovering the

[PATCH v3 3/8] linux-user: Emulate /proc/self/smaps

2023-06-06 Thread 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 turn, causes it to dump the h

[PATCH v3 1/8] linux-user: Expose do_guest_openat() and do_guest_readlink()

2023-06-06 Thread 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 --- linux-user/qemu.h| 3 +++ linux-user/syscall.c | 54 2 files changed, 38 insertions

[PATCH v3 4/8] gdbstub: Expose gdb_get_process() and gdb_get_first_cpu_in_process()

2023-06-06 Thread 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 --- gdbstub/gdbstub.c | 16 gdbstub/internals.h | 2 ++ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/g

[PATCH v3 8/8] tests/tcg: Add a test for info proc mappings

2023-06-06 Thread Ilya Leoshkevich
Add a small test to prevent regressions. Since there are issues with how GDB interprets QEMU's target.xml, enable the test only on aarch64 and s390x for now. Signed-off-by: Ilya Leoshkevich --- tests/tcg/aarch64/Makefile.target | 3 +- tests/tcg/multiarch/Makefile.target |

[PATCH v3 7/8] docs: Document security implications of debugging

2023-06-06 Thread 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 responsible for securing the G

[PATCH v3 2/8] linux-user: Add "safe" parameter to do_guest_openat()

2023-06-06 Thread 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 --- linux-user/qemu.h| 2 +- linux-user/syscall.c |

[PATCH v3 5/8] gdbstub: Report the actual qemu-user pid

2023-06-06 Thread 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 Leoshkevich --- gdbstub

[PATCH v3 0/8] gdbstub: Add support for info proc mappings

2023-06-06 Thread Ilya Leoshkevich
v2: https://lists.gnu.org/archive/html/qemu-devel/2023-05/msg06837.html v2 -> v3: Use openat() instead of safe_openat() (new patch: 2/8). Add /proc/self/smaps emulation (new patch: 3/8). With these 2 changes, the minor issues previously mentioned in the patch 6/8 are g

Re: [PATCH] hw: Fix format for comments

2023-06-06 Thread Igor Mammedov
On Mon, 15 May 2023 03:25:25 -0400 Shaoqin Huang wrote: > Simply fix the #vcpus_count to @vcpus_count in CPUArchId comments. > Since > we are at here, resort the parameters in comments to match the sequence While at it, reorder ... > of parameters which defined in the CPUArch

Re: [PATCH v5 8/9] vfio/migration: Add x-allow-pre-copy VFIO device property

2023-06-06 Thread Cédric Le Goater
Hello Avihai On 6/6/23 13:59, Avihai Horon wrote: On 05/06/2023 17:56, Alex Williamson wrote: External email: Use caution opening links or attachments On Sun, 4 Jun 2023 12:33:43 +0300 Avihai Horon wrote: On 01/06/2023 23:22, Alex Williamson wrote: External email: Use caution opening lin

Re: [PATCH] xen-block: fix segv on unrealize

2023-06-06 Thread Philippe Mathieu-Daudé
On 6/6/23 15:16, Anthony PERARD via wrote: From: Anthony PERARD Backtrace: qemu_lockcnt_lock (lockcnt=0xb4) at ../util/lockcnt.c:238 aio_set_fd_handler (ctx=0x0, fd=51, is_external=true, io_read=0x0, io_write=0x0, io_poll=0x0, io_poll_ready=0x0, opaque=0x0) at ../util/aio-posix.c:119

Re: [PATCH v3 4/6] target/riscv: Create an KVM AIA irqchip

2023-06-06 Thread Daniel Henrique Barboza
On 5/26/23 03:25, Yong-Xuan Wang wrote: implement a function to create an KVM AIA chip Signed-off-by: Yong-Xuan Wang Reviewed-by: Jim Shu --- target/riscv/kvm.c | 83 target/riscv/kvm_riscv.h | 3 ++ 2 files changed, 86 insertions(+) diff

Re: [PATCH v3 1/1] hw/arm/sbsa-ref: use XHCI to replace EHCI

2023-06-06 Thread Marcin Juszkiewicz
W dniu 5.06.2023 o 11:55, Yuquan Wang pisze: The current sbsa-ref cannot use EHCI controller which is only able to do 32-bit DMA, since sbsa-ref doesn't have RAM below 4GB. Hence, this uses XHCI to provide a usb controller with 64-bit DMA capablity instead of EHCI. Please also modify hw/arm/Kco

Re: [PATCH v3 5/6] target/riscv: update APLIC and IMSIC to support KVM AIA

2023-06-06 Thread Daniel Henrique Barboza
On 5/26/23 03:25, Yong-Xuan Wang wrote: - Do not set the mmio operations of APLIC and IMSIC when using KVM AIA - Send interrupt signal to KVM AIA via KVM_IRQ_LINE API Signed-off-by: Yong-Xuan Wang Reviewed-by: Jim Shu --- Reviewed-by: Daniel Henrique Barboza hw/intc/riscv_aplic.c | 1

Re: [PATCH v3 6/6] target/riscv: select KVM AIA in riscv virt machine

2023-06-06 Thread Daniel Henrique Barboza
On 5/26/23 03:25, Yong-Xuan Wang wrote: Select KVM AIA when the host kernel has in-kernel AIA chip support. Signed-off-by: Yong-Xuan Wang Reviewed-by: Jim Shu --- Reviewed-by: Daniel Henrique Barboza hw/riscv/virt.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/hw/

[PATCH] hw/remote/proxy: Remove dubious 'event_notifier-posix.c' include

2023-06-06 Thread Philippe Mathieu-Daudé
event_notifier-posix.c is registered in meson's util_ss[] source set, which is built as libqemuutil.a.p library. Both tools and system emulation binaries are linked with qemuutil, so there is no point in including this source file. Introduced in commit bd36adb8df ("multi-process: create IOHUB obje

[PATCH] hw/timer/nrf51_timer: Don't lose time when timer is queried in tight loop

2023-06-06 Thread Peter Maydell
The nrf51_timer has a free-running counter which we implement using the pattern of using two fields (update_counter_ns, counter) to track the last point at which we calculated the counter value, and the counter value at that time. Then we can find the current counter value by converting the differ

Re: [PATCH 0/4] ppc/pnv: Add chiptod and core timebase state machine models

2023-06-06 Thread Cédric Le Goater
On 6/4/23 01:36, Nicholas Piggin wrote: This adds support for chiptod and core timebase state machine models in the powernv POWER9 and POWER10 models. This does not actually change the time or the value in TB registers (because they are alrady synced in QEMU), but it does go through the motions.

Re: [PATCH] hw/remote/proxy: Remove dubious 'event_notifier-posix.c' include

2023-06-06 Thread Peter Maydell
On Tue, 6 Jun 2023 at 14:50, Philippe Mathieu-Daudé wrote: > > event_notifier-posix.c is registered in meson's util_ss[] source > set, which is built as libqemuutil.a.p library. Both tools and > system emulation binaries are linked with qemuutil, so there is > no point in including this source fil

Re: [PATCH] hw/remote/proxy: Remove dubious 'event_notifier-posix.c' include

2023-06-06 Thread Philippe Mathieu-Daudé
On 6/6/23 15:59, Peter Maydell wrote: On Tue, 6 Jun 2023 at 14:50, Philippe Mathieu-Daudé wrote: event_notifier-posix.c is registered in meson's util_ss[] source set, which is built as libqemuutil.a.p library. Both tools and system emulation binaries are linked with qemuutil, so there is no po

Re: [PATCH 0/4] target/ppc: TCG SMT support for spapr

2023-06-06 Thread Cédric Le Goater
On 6/5/23 13:23, Nicholas Piggin wrote: Previous RFC here https://lists.gnu.org/archive/html/qemu-ppc/2023-05/msg00453.html This series drops patch 1 from the previous, which is more of a standalone bugfix. Also accounted for Cedric's comments, except a nicer way to set cpu_index vs PIR/TIR SP

Re: [PATCH] xen-block: fix segv on unrealize

2023-06-06 Thread Stefan Hajnoczi
Sorry! Reviewed-by: Stefan Hajnoczi

[PATCH 0/5] misc: Enforce .[ch].inc extension for re-included .c/.h files

2023-06-06 Thread Philippe Mathieu-Daudé
Follow the convention to use the .inc extension for .c/.h files re-included, as docummented in Coding Style since commit 6a0057aa22: If you do use template header files they should be named with the ``.c.inc`` or ``.h.inc`` suffix to make it clear they are being included for expansion.

[PATCH 5/5] tests/tcg/aarch64: Rename bti-crt.inc.c -> bti-crt.c.inc

2023-06-06 Thread Philippe Mathieu-Daudé
Since commit 139c1837db ("meson: rename included C source files to .c.inc"), QEMU standard procedure for included C files is to use *.c.inc. Besides, since commit 6a0057aa22 ("docs/devel: make a statement about includes") this is documented as the Coding Style: If you do use template header fil

[PATCH 2/5] target/arm: Rename helper template headers as '.h.inc'

2023-06-06 Thread Philippe Mathieu-Daudé
Since commit 139c1837db ("meson: rename included C source files to .c.inc"), QEMU standard procedure for included C files is to use *.c.inc. Besides, since commit 6a0057aa22 ("docs/devel: make a statement about includes") this is documented as the Coding Style: If you do use template header fil

[PATCH 1/5] bsd-user: Rename elfcore.c -> elfcore.c.inc

2023-06-06 Thread Philippe Mathieu-Daudé
Since commit 139c1837db ("meson: rename included C source files to .c.inc"), QEMU standard procedure for included C files is to use *.c.inc. Besides, since commit 6a0057aa22 ("docs/devel: make a statement about includes") this is documented as the Coding Style: If you do use template header fil

[PATCH 3/5] target/i386: Rename helper template headers as '.h.inc'

2023-06-06 Thread Philippe Mathieu-Daudé
Since commit 139c1837db ("meson: rename included C source files to .c.inc"), QEMU standard procedure for included C files is to use *.c.inc. Besides, since commit 6a0057aa22 ("docs/devel: make a statement about includes") this is documented as the Coding Style: If you do use template header fil

Re: [PATCH 1/2] hw/intc/allwinner-a10-pic: Handle IRQ levels other than 0 or 1

2023-06-06 Thread Guenter Roeck
On Tue, Jun 06, 2023 at 11:46:08AM +0100, Peter Maydell wrote: > In commit 2c5fa0778c3b430 we fixed an endianness bug in the Allwinner > A10 PIC model; however in the process we introduced a regression. > This is because the old code was robust against the incoming 'level' > argument being somethin

Re: [PATCH 2/2] hw/sd/allwinner-sdhost: Don't send non-boolean IRQ line levels

2023-06-06 Thread Guenter Roeck
On Tue, Jun 06, 2023 at 11:46:09AM +0100, Peter Maydell wrote: > QEMU allows qemu_irq lines to transfer arbitrary integers. However > the convention is that for a simple IRQ line the values transferred > are always 0 and 1. The A10 SD controller device instead assumes a > 0-vs-non-0 convention, w

[PATCH 4/5] target: Rename per-target 'helper.h' -> 'helper.h.inc'

2023-06-06 Thread Philippe Mathieu-Daudé
Since commit 139c1837db ("meson: rename included C source files to .c.inc"), QEMU standard procedure for included C files is to use *.c.inc. Besides, since commit 6a0057aa22 ("docs/devel: make a statement about includes") this is documented as the Coding Style: If you do use template header fil

Re: [PATCH] Add epmp to extensions list and rename it to smepmp

2023-06-06 Thread Daniel Henrique Barboza
On 6/6/23 08:38, Himanshu Chauhan wrote: Smepmp is a ratified extension which qemu refers to as epmp. Rename epmp to smepmp and add it to extension list so that it is added to the isa string. Signed-off-by: Himanshu Chauhan --- Reviewed-by: Daniel Henrique Barboza target/riscv/cpu.c

Re: [RFC v1 4/4] qemu: adjust queried bar size to power-of-2

2023-06-06 Thread Philippe Mathieu-Daudé
On 6/6/23 14:54, Alex Williamson wrote: On Mon, 5 Jun 2023 16:50:05 -0700 wrote: From: Ankit Agrawal The GPU device memory is reported to the VM as a BAR. The device memory may not be aligned to the power-of-2, but the QEMU expects the PCI BAR to be. Align the reported device memory size to

Re: [PATCH] hw/remote/proxy: Remove dubious 'event_notifier-posix.c' include

2023-06-06 Thread Thomas Huth
On 06/06/2023 15.49, Philippe Mathieu-Daudé wrote: event_notifier-posix.c is registered in meson's util_ss[] source set, which is built as libqemuutil.a.p library. Both tools and system emulation binaries are linked with qemuutil, so there is no point in including this source file. Introduced in

Re: [PULL v4 07/27] multi-process: add the concept description to docs/devel/qemu-multiprocess

2023-06-06 Thread Philippe Mathieu-Daudé
Hi Jagannathan and Elena, On 10/2/21 10:26, Stefan Hajnoczi wrote: From: John G Johnson Signed-off-by: John G Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Reviewed-by: Stefan Hajnoczi Message-id: 02a68adef99f5df6a380bf8fd7b90948777e411c.1611938319.git.jag.ra...@

Re: [PATCH] hw/remote/proxy: Remove dubious 'event_notifier-posix.c' include

2023-06-06 Thread Paolo Bonzini
Queued, thanks. Paolo

[PATCH v2] 9pfs: prevent opening special files (CVE-2023-2861)

2023-06-06 Thread Christian Schoenebeck
The 9p protocol does not specifically define how server shall behave when client tries to open a special file, however from security POV it does make sense for 9p server to prohibit opening any special file on host side in general. A sane Linux 9p client for instance would never attempt to open a s

Re: [PATCH 1/5] bsd-user: Rename elfcore.c -> elfcore.c.inc

2023-06-06 Thread Richard Henderson
On 6/6/23 07:12, Philippe Mathieu-Daudé wrote: Since commit 139c1837db ("meson: rename included C source files to .c.inc"), QEMU standard procedure for included C files is to use *.c.inc. Besides, since commit 6a0057aa22 ("docs/devel: make a statement about includes") this is documented as the C

Re: [PATCH 5/5] tests/tcg/aarch64: Rename bti-crt.inc.c -> bti-crt.c.inc

2023-06-06 Thread Richard Henderson
On 6/6/23 07:12, Philippe Mathieu-Daudé wrote: Since commit 139c1837db ("meson: rename included C source files to .c.inc"), QEMU standard procedure for included C files is to use *.c.inc. Besides, since commit 6a0057aa22 ("docs/devel: make a statement about includes") this is documented as the C

[PULL 00/21] (Mostly) build system patches for 2023-06-06

2023-06-06 Thread Paolo Bonzini
The following changes since commit 369081c4558e7e940fa36ce59bf17b2e390f55d3: Merge tag 'pull-tcg-20230605' of https://gitlab.com/rth7680/qemu into staging (2023-06-05 13:16:56 -0700) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git tags/for-upstream for you to fe

[PULL 04/21] meson.build: Group the UI entries in a separate summary section

2023-06-06 Thread Paolo Bonzini
From: Thomas Huth Let's make it easier for the users to spot UI-related entries in the summary of the meson output. Signed-off-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230602171832.533739-2-th...@redhat.com> Signed-off-by: Paolo Bonzini

[PULL 02/21] atomics: eliminate mb_read/mb_set

2023-06-06 Thread Paolo Bonzini
qatomic_mb_read and qatomic_mb_set were the very first atomic primitives introduced for QEMU; their semantics are unclear and they provide a false sense of safety. The last use of qatomic_mb_read() has been removed, so delete it. qatomic_mb_set() instead can survive as an optimized qatomic_set()+s

[PULL 18/21] pc-bios/s390-ccw: always build network bootloader

2023-06-06 Thread Paolo Bonzini
In the beginning, the network bootloader was considered experimental and thus optional, but it is well established nowadays and configure always checks for roms/SLOF before compiling pc-bios/s390-ccw. Therefore, it makes sense to always build it together with the other part of the s390-ccw bios.

[PULL 01/21] meson: Avoid implicit declaration of absent functions

2023-06-06 Thread Paolo Bonzini
From: Michal Privoznik While detecting a presence of a function via 'cc.links()' gives desired result (i.e. detects whether function is present), it also produces a warning on systems where the function is not present (into meson-log.txt), e.g.: qemu.git/build/meson-private/tmph74x3p38/testfil

[PULL 16/21] meson: subprojects: replace submodules with wrap files

2023-06-06 Thread Paolo Bonzini
Compared to submodules, .wrap files have several advantages: * option parsing and downloading is delegated to meson * the commit is stored in a text file instead of a magic entry in the git tree object * we could stop shipping external dependencies that are only used as a fallback, but not b

[PULL 08/21] scsi/qemu-pr-helper: Drop support for 'old' libmultipath API

2023-06-06 Thread Paolo Bonzini
From: Philippe Mathieu-Daudé Commit 1b0578f5c4 ("qemu-pr-helper: Fix build on CentOS 7") added code to probe for 'old' libmultipath API on CentOS 7. However since merge commit 8c345b3e6a (June 2021) we don't build/test CentOS 7 as it felt out of our list of supported distrib versions. Therefore w

[PULL 11/21] mkvenv: always pass locally-installed packages to pip

2023-06-06 Thread Paolo Bonzini
Let pip decide whether a new version should be installed or the current one is okay. This ensures that the virtual environment is updated (either upgraded or downgraded) whenever a new version of a package is requested. The hardest part here is figuring out if a package is installed in the venv (

[PULL 03/21] scripts: remove dead file

2023-06-06 Thread Paolo Bonzini
scripts/test-driver.py was used when "make check" was already using meson introspection data, but it did not execute "meson test". It is dead since commit 3d2f73ef75e ("build: use "meson test" as the test harness", 2021-12-23). Signed-off-by: Paolo Bonzini --- scripts/test-driver.py | 35 --

[PULL 12/21] configure: remove --with-git= option

2023-06-06 Thread Paolo Bonzini
The scenario for which --with-git= was introduced was to use a SOCKS proxy such as tsocks. However, this was back in 2017 when QEMU's submodules used the git:// protocol, and it is not as important when using the "smart HTTP" backend; for example, neither "meson subprojects download" nor scripts/c

[PULL 07/21] meson.build: Use -Wno-undef only for SDL2 versions that need it

2023-06-06 Thread Paolo Bonzini
From: Thomas Huth There is no need to disable this useful compiler warning for all versions of the SDL. Unfortunately, various versions are buggy (beside SDL 2.0.8, the version 2.26.0 and 2.26.1 are broken, too, see https://github.com/libsdl-org/SDL/issues/6619 ), but we can use a simple compiler

[PULL 10/21] tests: Use separate virtual environment for avocado

2023-06-06 Thread Paolo Bonzini
This reverts commits eea2d141179 ("Makefile: remove $(TESTS_PYTHON)", 2023-05-26) and 9c6692db550 ("tests: Use configure-provided pyvenv for tests", 2023-05-18). Right now, there is a conflict between wanting a ">=" constraint when using a distro-provided package and wanting a "==" constraint when

[PULL 05/21] meson.build: Group the network backend entries in a separate summary section

2023-06-06 Thread Paolo Bonzini
From: Thomas Huth Let's make it easier for the users to spot network-related entries in the summary of the meson output. Signed-off-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230602171832.533739-3-th...@redhat.com> Signed-off-by: Paolo Bo

[PULL 09/21] Revert "tests/requirements.txt: bump up avocado-framework version to 101.0"

2023-06-06 Thread Paolo Bonzini
This reverts commit ec5ffa0056389c3c10ea2de1e78366f66f4e5abc. Bumping avocado to version 101 has two issues. First, there are problems where Avocado is not logging of command lines or terminal output, and not collecting Python logs outside the avocado namespace. Second, the recent changes to Pyt

[PULL 15/21] build: log submodule update from git-submodule.sh

2023-06-06 Thread Paolo Bonzini
Print exactly which submodules have been updated, by reusing the logic of "git-submodule.sh validate" after executing "git submodule update --init'. Reviewed-by: Alex Bennée Signed-off-by: Paolo Bonzini --- Makefile | 4 +--- scripts/git-submodule.sh | 16 +++- 2 fi

[PULL 06/21] meson.build: Group the audio backend entries in a separate summary section

2023-06-06 Thread Paolo Bonzini
From: Thomas Huth Let's make it easier for the users to spot audio-related entries in the summary of the meson output. Signed-off-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-Id: <20230602171832.533739-4-th...@redhat.com> Signed-off-by: Paolo Bonz

[PULL 21/21] configure: remove --with-git-submodules=

2023-06-06 Thread Paolo Bonzini
Reuse --enable/--disable-download to control git submodules as well. Adjust the error messages of git-submodule.sh to refer to the new option. Reviewed-by: Daniel P. Berrangé Signed-off-by: Paolo Bonzini --- configure | 40 +-- .../ci/org.cent

[PULL 20/21] build: remove git submodule handling from main makefile

2023-06-06 Thread Paolo Bonzini
The only remaining user of submodules at build time is roms/SLOF, which is handled in pc-bios/s390-ccw/Makefile. Remove the relevant code from the main makefile. Reviewed-by: Daniel P. Berrangé Signed-off-by: Paolo Bonzini --- .gitlab-ci.d/buildtest-template.yml | 3 +-- Makefile

[PULL 19/21] meson: subprojects: replace berkeley-{soft, test}float-3 with wraps

2023-06-06 Thread Paolo Bonzini
Unlike other subprojects, these require an overlay directory to include meson rules to build the libraries. The rules are basically lifted from tests/fp/meson.build, with a few changes to create platform.h and publish a dependency. The build defines are passed through a subproject option, and pos

[PULL 14/21] git-submodule: allow partial update of .git-submodule-status

2023-06-06 Thread Paolo Bonzini
Allow a specific subdirectory to run git-submodule.sh with only a subset of submodules, without removing the others from the .git-submodule-status file. This also allows scripts/git-submodule.sh to be more lenient: validating an empty set of submodules is not a mistake. Reviewed-by: Alex Bennée

[PULL 13/21] configure: rename --enable-pypi to --enable-download, control subprojects too

2023-06-06 Thread Paolo Bonzini
The behavior of --{enable,disable}-pypi is similar to that of -Dwrapmode={default,nodownload} respectively. In particular, in both cases a feature needs to be explicitly enabled for the dependency to be downloaded. So, use a single option to control both cases. Now, --enable-slirp will trigger c

[PULL 17/21] configure: move SLOF submodule handling to pc-bios/s390-ccw

2023-06-06 Thread Paolo Bonzini
Move the handling of the roms/SLOF submodule out of the main Makefile, since we are going to remove submodules from the build process of QEMU. Acked-by: Thomas Huth Reviewed-by: Daniel P. Berrangé Signed-off-by: Paolo Bonzini --- .gitlab-ci.d/buildtest-template.yml | 2 +- configure

Re: [PATCH 2/5] target/arm: Rename helper template headers as '.h.inc'

2023-06-06 Thread Richard Henderson
On 6/6/23 07:12, Philippe Mathieu-Daudé wrote: Since commit 139c1837db ("meson: rename included C source files to .c.inc"), QEMU standard procedure for included C files is to use *.c.inc. Besides, since commit 6a0057aa22 ("docs/devel: make a statement about includes") this is documented as the C

Re: [PATCH 3/5] target/i386: Rename helper template headers as '.h.inc'

2023-06-06 Thread Richard Henderson
On 6/6/23 07:12, Philippe Mathieu-Daudé wrote: Since commit 139c1837db ("meson: rename included C source files to .c.inc"), QEMU standard procedure for included C files is to use *.c.inc. Besides, since commit 6a0057aa22 ("docs/devel: make a statement about includes") this is documented as the C

Re: [PATCH 4/5] target: Rename per-target 'helper.h' -> 'helper.h.inc'

2023-06-06 Thread Richard Henderson
On 6/6/23 07:12, Philippe Mathieu-Daudé wrote: Since commit 139c1837db ("meson: rename included C source files to .c.inc"), QEMU standard procedure for included C files is to use *.c.inc. Besides, since commit 6a0057aa22 ("docs/devel: make a statement about includes") this is documented as the C

Re: [RFC PATCH v2 1/9] target/tricore: Remove pointless CONFIG_SOFTMMU guard

2023-06-06 Thread Richard Henderson
On 6/5/23 15:24, Philippe Mathieu-Daudé wrote: We don't build any user emulation target for Tricore, only the system emulation. No need to check for it as it is always defined. Signed-off-by: Philippe Mathieu-Daudé --- target/tricore/helper.c | 2 -- 1 file changed, 2 deletions(-) Reviewed-

[PATCH 0/3] migration: Fix multifd cancel test

2023-06-06 Thread Fabiano Rosas
When doing cleanup of the multifd send threads we're calling QLIST_REMOVE concurrently on the migration_threads list. This seems to be the source of the crashes we've seen on the multifd/tcp/plain/cancel tests. I'm running the test in a loop and after a few dozen iterations I see the crash in dmes

[PATCH 2/3] migration/multifd: Protect accesses to migration_threads

2023-06-06 Thread Fabiano Rosas
This doubly linked list is common for all the multifd and migration threads so we need to avoid concurrent access. Add a mutex to protect the data from concurrent access. This fixes a crash when removing two MigrationThread objects from the list at the same time during cleanup of multifd threads.

[PATCH 1/3] migration/multifd: Rename threadinfo.c functions

2023-06-06 Thread Fabiano Rosas
The code in threadinfo.c is only used for the QMP command query-migrationthreads. Make it explicit that this is something related to QMP. The current names are also too generic for a piece of code that doesn't affect the migration directly in any way. Signed-off-by: Fabiano Rosas --- migration/

[PATCH 3/3] tests/qtest: Re-enable multifd cancel test

2023-06-06 Thread Fabiano Rosas
We've found the source of flakiness in this test, so re-enable it. Signed-off-by: Fabiano Rosas --- tests/qtest/migration-test.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index b0c355bbd9..800ad23b75

Re: [RFC PATCH v2 2/9] target/i386: Check for USER_ONLY definition instead of SOFTMMU one

2023-06-06 Thread Richard Henderson
On 6/5/23 15:24, Philippe Mathieu-Daudé wrote: Since we *might* have user emulation with softmmu, replace the system emulation check by !user emulation one. Signed-off-by: Philippe Mathieu-Daudé --- target/i386/tcg/translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [RFC PATCH v2 3/9] target/m68k: Check for USER_ONLY definition instead of SOFTMMU one

2023-06-06 Thread Richard Henderson
On 6/5/23 15:24, Philippe Mathieu-Daudé wrote: Since we*might* have user emulation with softmmu, replace the system emulation check by !user emulation one. Invert some if() ladders for clarity. Signed-off-by: Philippe Mathieu-Daudé --- target/m68k/helper.h| 2 +- target/m68k/cpu.c

Re: [RFC PATCH v2 5/9] hw/core/cpu: Check for USER_ONLY definition instead of SOFTMMU one

2023-06-06 Thread Richard Henderson
On 6/5/23 15:24, Philippe Mathieu-Daudé wrote: Since we*might* have user emulation with softmmu, replace the system emulation check by !user emulation one. Invert the #ifdef'ry in TCGCPUOps structure for clarity. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/core/cpu.h | 4 +

Re: [RFC PATCH v2 4/9] target/ppc: Check for USER_ONLY definition instead of SOFTMMU one

2023-06-06 Thread Richard Henderson
On 6/5/23 15:24, Philippe Mathieu-Daudé wrote: Since we*might* have user emulation with softmmu, replace the system emulation check by !user emulation one. Signed-off-by: Philippe Mathieu-Daudé --- target/ppc/cpu_init.c| 20 ++-- target/ppc/helper_regs.c | 6 ++ 2 f

Re: [RFC PATCH v2 6/9] accel/tcg: Check for USER_ONLY definition instead of SOFTMMU one

2023-06-06 Thread Richard Henderson
On 6/5/23 15:24, Philippe Mathieu-Daudé wrote: Since we*might* have user emulation with softmmu, replace the system emulation check by !user emulation one. Invert some if() ladders for clarity. Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/internal.h | 6 +++--- accel/tcg/cpu-exec.c |

Re: [RFC v1 0/4] Expose GPU memory as coherently CPU accessible

2023-06-06 Thread Cédric Le Goater
Hello Ankit, On 6/6/23 01:50, ank...@nvidia.com wrote: From: Ankit Agrawal NVIDIA is building systems which allows the CPU to coherently access GPU memory. This GPU device memory can be added and managed by the kernel memory manager. The patch holds the required changes in QEMU to expose this

Re: [RFC PATCH v2 9/9] meson: Replace softmmu_ss -> system_ss

2023-06-06 Thread Richard Henderson
On 6/5/23 15:24, Philippe Mathieu-Daudé wrote: We use the user_ss[] array to hold the user emulation sources, and the softmmu_ss[] array to hold the system emulation ones. Hold the latter in the 'system_ss[]' array for parity with user emulation. Mechanical change doing: $ sed -i -e s/softmm

Re: [PATCH v3 03/15] hw/pci: Add a pci_device_iommu_memory_region() helper

2023-06-06 Thread Peter Xu
On Tue, Jun 06, 2023 at 12:22:16PM +0100, Joao Martins wrote: > On 05/06/2023 17:57, Peter Xu wrote: > > On Tue, May 30, 2023 at 06:59:25PM +0100, Joao Martins wrote: > >> Much like pci_device_iommu_address_space() fetches the IOMMU AS, add a > >> pci_device_iommu_memory_region() which lets it retu

<    1   2   3   4   >