Re: [PATCH 2/2] tests/qemu-iotests: Indent expected error messages

2025-08-01 Thread Daniel P . Berrangé
On Fri, Aug 01, 2025 at 04:59:50PM +0200, Martin Kletzander wrote: > From: Martin Kletzander > > When running all tests the expected "killed" messages are indented > differently than the actual ones, by three more spaces. Change it so > that the messages match and tests pass. This would break t

Re: [RFC PATCH 1/2] system/os-win32: Remove unused Error** argument in qemu_socket_unselect

2025-07-16 Thread Daniel P . Berrangé
On Wed, Jul 16, 2025 at 12:41:31PM +0200, Markus Armbruster wrote: > Daniel P. Berrangé writes: > > > On Tue, Jul 15, 2025 at 10:35:16AM +0200, Philippe Mathieu-Daudé wrote: > >> @errp is always NULL. Remove it, as unused. > >> > >> Signed-off-by: Philipp

[PATCH 13/14] iotests/151: ensure subprocesses are cleaned up

2025-07-15 Thread Daniel P . Berrangé
-by: Daniel P. Berrangé --- tests/qemu-iotests/151 | 5 + 1 file changed, 5 insertions(+) diff --git a/tests/qemu-iotests/151 b/tests/qemu-iotests/151 index f2ff9c5dac..06ee3585db 100755 --- a/tests/qemu-iotests/151 +++ b/tests/qemu-iotests/151 @@ -263,6 +263,11 @@ class

Re: [PATCH 09/14] functional: ensure sockets and files are closed

2025-07-15 Thread Daniel P . Berrangé
On Tue, Jul 15, 2025 at 05:03:07PM +0200, Thomas Huth wrote: > On 15/07/2025 16.30, Daniel P. Berrangé wrote: > > The multiprocess and virtio_gpu tests open sockets but then forget > > to close them, which triggers resource leak warnings > > > > The virtio_gpu test als

[PATCH 12/14] iotests/147: ensure temporary sockets are closed before exiting

2025-07-15 Thread Daniel P . Berrangé
This avoids the python resource leak detector from issuing warnings in the iotests. Signed-off-by: Daniel P. Berrangé --- tests/qemu-iotests/147 | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/qemu-iotests/147 b/tests/qemu-iotests/147 index 6d6f077a14..3e14bd389a 100755 --- a/tests

[PATCH 01/14] python: Replace asyncio.get_event_loop for Python 3.14

2025-07-15 Thread Daniel P . Berrangé
/3.14/whatsnew/3.14.html#id7 Thanks: Miro Hrončok, Daniel P. Berrangé Signed-off-by: Richard W.M. Jones --- python/qemu/qmp/legacy.py | 5 - python/qemu/qmp/qmp_tui.py | 2 +- python/tests/protocol.py | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/python/qemu/qmp

[PATCH 14/14] iotests/check: always enable all python warnings

2025-07-15 Thread Daniel P . Berrangé
. Signed-off-by: Daniel P. Berrangé --- tests/qemu-iotests/check | 4 1 file changed, 4 insertions(+) diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check index 545f9ec7bd..d9b7c1d598 100755 --- a/tests/qemu-iotests/check +++ b/tests/qemu-iotests/check @@ -21,6 +21,7 @@ import sys

[PATCH 05/14] python: drop 'asyncio_run' back compat helper

2025-07-15 Thread Daniel P . Berrangé
Our minimum python is now 3.9, so back compat with python 3.6 is no longer required. Signed-off-by: Daniel P. Berrangé --- python/qemu/qmp/util.py | 19 --- python/tests/protocol.py | 2 +- 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/python/qemu/qmp/util.py

[PATCH 07/14] iotests: drop compat for old version context manager

2025-07-15 Thread Daniel P . Berrangé
Our minimum python is now 3.9, so back compat with prior python versions is no longer required. Signed-off-by: Daniel P. Berrangé --- tests/qemu-iotests/testenv.py| 7 ++- tests/qemu-iotests/testrunner.py | 9 ++--- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a

[PATCH 06/14] python: drop 'create_task' back compat helper

2025-07-15 Thread Daniel P . Berrangé
Our minimum python is now 3.9, so back compat with python 3.6 is no longer required. Signed-off-by: Daniel P. Berrangé --- python/qemu/qmp/protocol.py | 7 +++ python/qemu/qmp/qmp_tui.py | 8 python/qemu/qmp/util.py | 33 + python/tests

[PATCH 09/14] functional: ensure sockets and files are closed

2025-07-15 Thread Daniel P . Berrangé
The multiprocess and virtio_gpu tests open sockets but then forget to close them, which triggers resource leak warnings The virtio_gpu test also fails to close a log file it opens. Signed-off-by: Daniel P. Berrangé --- tests/functional/test_multiprocess.py | 3 +++ tests/functional

[PATCH 10/14] functional: always enable all python warnings

2025-07-15 Thread Daniel P . Berrangé
. Signed-off-by: Daniel P. Berrangé --- tests/functional/qemu_test/testcase.py | 4 1 file changed, 4 insertions(+) diff --git a/tests/functional/qemu_test/testcase.py b/tests/functional/qemu_test/testcase.py index 71c7160adc..2a78e735f1 100644 --- a/tests/functional/qemu_test/testcase.py

[PATCH 02/14] python: avoid deprecation warning with get_event_loop

2025-07-15 Thread Daniel P . Berrangé
We need to call get_event_loop but have no way of knowing ahead of time whether the current thread has an event loop of not. We can handle a missing event loop, but we need to hide the warning python will emit to avoid tripping up iotests expected output. Signed-off-by: Daniel P. Berrangé

[PATCH 04/14] python: drop 'wait_closed' back compat helper

2025-07-15 Thread Daniel P . Berrangé
Our minimum python is now 3.9, so back compat with python 3.6 is no longer required. Signed-off-by: Daniel P. Berrangé --- python/qemu/qmp/protocol.py | 3 +-- python/qemu/qmp/util.py | 29 - 2 files changed, 1 insertion(+), 31 deletions(-) diff --git a/python

[PATCH 08/14] functional: ensure log handlers are closed

2025-07-15 Thread Daniel P . Berrangé
This avoids a resource leak warning from python when the log handler is garbage collected. Signed-off-by: Daniel P. Berrangé --- tests/functional/qemu_test/testcase.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/functional/qemu_test/testcase.py b/tests/functional/qemu_test

[PATCH 11/14] python: ensure QEMUQtestProtocol closes its socket

2025-07-15 Thread Daniel P . Berrangé
While QEMUQtestMachine closes the socket that was passed to QEMUQtestProtocol, the python resource leak manager still believes that the copy QEMUQtestProtocol holds is open. We must explicitly call close to avoid this leak warnnig. Signed-off-by: Daniel P. Berrangé --- python/qemu/machine

[PATCH 03/14] python: drop 'is_closing' back compat helper

2025-07-15 Thread Daniel P . Berrangé
Our minimum python is now 3.9, so back compat with python 3.6 is no longer required. Signed-off-by: Daniel P. Berrangé --- python/qemu/qmp/protocol.py | 3 +-- python/qemu/qmp/util.py | 16 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/python/qemu/qmp

[PATCH 00/14] python: misc cleanups for python code

2025-07-15 Thread Daniel P . Berrangé
7; but this doesn't cover all possible iotest usage. So there might still be some resource leaks hiding in there which will cause failures for devs running tests with unusual config scenarios. Daniel P. Berrangé (13): python: avoid deprecation warning with get_event_loop python: drop '

Re: [RFC PATCH 2/2] system/os-win32: Remove unused Error** argument in qemu_socket_select

2025-07-15 Thread Daniel P . Berrangé
On Tue, Jul 15, 2025 at 10:35:17AM +0200, Philippe Mathieu-Daudé wrote: > @errp is always NULL. Remove it, as unused. > > Signed-off-by: Philippe Mathieu-Daudé > --- > include/system/os-win32.h | 2 +- > util/aio-win32.c | 2 +- > util/oslib-win32.c| 13 + > 3 file

Re: [RFC PATCH 1/2] system/os-win32: Remove unused Error** argument in qemu_socket_unselect

2025-07-15 Thread Daniel P . Berrangé
On Tue, Jul 15, 2025 at 10:35:16AM +0200, Philippe Mathieu-Daudé wrote: > @errp is always NULL. Remove it, as unused. > > Signed-off-by: Philippe Mathieu-Daudé > --- > include/system/os-win32.h | 2 +- > io/channel-socket.c | 4 ++-- > util/oslib-win32.c| 6 +++--- > 3 files change

Re: [PATCH 1/2] block/rbd: support selected key-value-pairs via QAPI

2025-06-16 Thread Daniel P . Berrangé
On Mon, Jun 16, 2025 at 02:29:56PM +0200, Fiona Ebner wrote: > Am 16.06.25 um 11:41 schrieb Daniel P. Berrangé: > > On Thu, May 15, 2025 at 01:29:07PM +0200, Fiona Ebner wrote: > >> @@ -4327,6 +4360,9 @@ > >> # authentication. This maps to Ceph configuration optio

Re: [PATCH 1/2] block/rbd: support selected key-value-pairs via QAPI

2025-06-16 Thread Daniel P . Berrangé
On Mon, Jun 16, 2025 at 11:25:54AM +0200, Ilya Dryomov wrote: > On Thu, May 15, 2025 at 1:29 PM Fiona Ebner wrote: > > > > Currently, most Ceph configuration options are not exposed via QAPI. > > While it is possible to specify a dedicated Ceph configuration file, > > specialized options are often

Re: [PATCH 1/2] block/rbd: support selected key-value-pairs via QAPI

2025-06-16 Thread Daniel P . Berrangé
On Thu, May 15, 2025 at 01:29:07PM +0200, Fiona Ebner wrote: > Currently, most Ceph configuration options are not exposed via QAPI. > While it is possible to specify a dedicated Ceph configuration file, > specialized options are often only required for a selection of images > on the RBD storage, no

Re: [PATCH] virtio: avoid cost of -ftrivial-auto-var-init in hot path

2025-06-10 Thread Daniel P . Berrangé
; > > > This issue was found using perf-top(1). virtqueue_split_pop() was one of > > the top CPU consumers and the "annotate" feature showed that the memory > > zeroing instructions at the beginning of the functions were hot. > > > > Fixes: 7ff9f

Re: [PATCH 00/31] Skip automatic zero-init of large arrays / structs in I/O paths

2025-06-10 Thread Daniel P . Berrangé
On Tue, Jun 10, 2025 at 05:00:43PM +0200, Philippe Mathieu-Daudé wrote: > On 10/6/25 14:56, Daniel P. Berrangé wrote: > > On Tue, Jun 10, 2025 at 02:49:02PM +0200, Philippe Mathieu-Daudé wrote: > > > On 10/6/25 14:36, Daniel P. Berrangé wrote: > > > > This seri

Re: [PATCH 11/31] hw/audio/gus: skip automatic zero-init of large array

2025-06-10 Thread Daniel P . Berrangé
Mistake in $SUBJECT - should be 'hw/audio/marvell_88w8618:' prefix On Tue, Jun 10, 2025 at 01:36:49PM +0100, Daniel P. Berrangé wrote: > The 'mv88w8618_audio_callback' method has a 4k byte array used for > copying data between the audio backend and device. Skip the aut

[PATCH 15/31] hw/dma/xlnx_csu_dma: skip automatic zero-init of large array

2025-06-10 Thread Daniel P . Berrangé
The 'xlnx_csu_dma_src_notify' method has a 4k byte array used for copying DMA data. Skip the automatic zero-init of this array to eliminate the performance overhead in the I/O hot path. The 'buf' array will be fully initialized when data is copied. Signed-off-by: Daniel P. B

Re: [PATCH 00/31] Skip automatic zero-init of large arrays / structs in I/O paths

2025-06-10 Thread Daniel P . Berrangé
On Tue, Jun 10, 2025 at 02:49:02PM +0200, Philippe Mathieu-Daudé wrote: > On 10/6/25 14:36, Daniel P. Berrangé wrote: > > This series is an extension of Stefan's proposal: > > > >https://lists.nongnu.org/archive/html/qemu-devel/2025-06/msg00736.html > > >

[PATCH 31/31] net/stream: skip automatic zero-init of large array

2025-06-10 Thread Daniel P . Berrangé
cket. Signed-off-by: Daniel P. Berrangé --- net/stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/stream.c b/net/stream.c index 4de5613844..6152d2a05e 100644 --- a/net/stream.c +++ b/net/stream.c @@ -148,7 +148,7 @@ static gboolean net_stream_send(QIOChannel *ioc,

[PATCH 24/31] hw/ppc/pnv_occ: skip automatic zero-init of large struct

2025-06-10 Thread Daniel P . Berrangé
uest. Signed-off-by: Daniel P. Berrangé --- hw/ppc/pnv_occ.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ppc/pnv_occ.c b/hw/ppc/pnv_occ.c index fa6f31cb8d..24b789c191 100644 --- a/hw/ppc/pnv_occ.c +++ b/hw/ppc/pnv_occ.c @@ -789,7 +789,7 @@ static bool occ_opal_process

[PATCH 12/31] hw/audio/sb16: skip automatic zero-init of large array

2025-06-10 Thread Daniel P . Berrangé
vice memory. Signed-off-by: Daniel P. Berrangé --- hw/audio/sb16.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/audio/sb16.c b/hw/audio/sb16.c index 19fd3b9020..bac64118fe 100644 --- a/hw/audio/sb16.c +++ b/hw/audio/sb16.c @@ -1181,7 +1181,7 @@ static int write_audi

[PATCH 28/31] hw/scsi/megasas: skip automatic zero-init of large arrays

2025-06-10 Thread Daniel P . Berrangé
initialized with memset(). The compiler ought to be intelligent enough to turn the memset() into a static initialization operation, and thus not duplicate the automatic zero-init. Replacing memset() with '{}' makes it unambiguous that the arrays are statically initialized. Signed-off-by: Da

[PATCH 19/31] hw/net/rtl8139: skip automatic zero-init of large array

2025-06-10 Thread Daniel P . Berrangé
The 'rtl8139_transmit_one' method has a 8k byte array used for copying data between guest and host. Skip the automatic zero-init of this array to eliminate the performance overhead in the I/O hot path. The 'txbuffer' will be fully initialized when reading PCI DMA buffers. Sig

[PATCH 18/31] hw/misc/aspeed_hace: skip automatic zero-init of large array

2025-06-10 Thread Daniel P . Berrangé
n data that needs to be hashed. Signed-off-by: Daniel P. Berrangé --- hw/misc/aspeed_hace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/misc/aspeed_hace.c b/hw/misc/aspeed_hace.c index 8924a30eff..726368fbbc 100644 --- a/hw/misc/aspeed_hace.c +++ b/hw/misc/aspeed_hac

[PATCH 14/31] hw/char/sclpconsole-lm: skip automatic zero-init of large array

2025-06-10 Thread Daniel P . Berrangé
is converted between EBCDIC and ASCII. Signed-off-by: Daniel P. Berrangé --- hw/char/sclpconsole-lm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/char/sclpconsole-lm.c b/hw/char/sclpconsole-lm.c index e9580aacba..3e40d5e434 100644 --- a/hw/char/sclpconsole-lm.c +++ b/hw/c

[PATCH 03/31] block: skip automatic zero-init of large array in ioq_submit

2025-06-10 Thread Daniel P . Berrangé
The 'ioq_submit' method has a struct array that is 8k in size. Skip the automatic zero-init of this array to eliminate the performance overhead in the I/O hot path. The 'iocbs' array will selectively initialized when processing the I/O data. Signed-off-by: Daniel P. Berran

[PATCH 27/31] hw/scsi/lsi53c895a: skip automatic zero-init of large array

2025-06-10 Thread Daniel P . Berrangé
The 'lsi_memcpy' method has a 4k byte array used for copying data to/from the device. Skip the automatic zero-init of this array to eliminate the performance overhead in the I/O hot path. The 'buf' array will be fully initialized when data is copied. Signed-off-by: Daniel

[PATCH 16/31] hw/display/vmware_vga: skip automatic zero-init of large struct

2025-06-10 Thread Daniel P . Berrangé
ocessing a cursor definition message from the guest. Signed-off-by: Daniel P. Berrangé --- hw/display/vmware_vga.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/display/vmware_vga.c b/hw/display/vmware_vga.c index 544bb65320..bc1a8ed466 100644 --- a/hw/display/vmware_vga.

[PATCH 06/31] chardev/char-socket: skip automatic zero-init of large array

2025-06-10 Thread Daniel P . Berrangé
socket. Signed-off-by: Daniel P. Berrangé --- chardev/char-socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chardev/char-socket.c b/chardev/char-socket.c index e8dd2931dc..1e8313915b 100644 --- a/chardev/char-socket.c +++ b/chardev/char-socket.c @@ -497,7 +497,

[PATCH 21/31] hw/net/virtio-net: skip automatic zero-init of large arrays

2025-06-10 Thread Daniel P . Berrangé
ys will be selectively initialized as required when processing network buffers. Signed-off-by: Daniel P. Berrangé --- hw/net/virtio-net.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 221252e00a..eb93607b8c 100644 --

[PATCH 13/31] hw/audio/via-ac97: skip automatic zero-init of large array

2025-06-10 Thread Daniel P . Berrangé
memory. Signed-off-by: Daniel P. Berrangé --- hw/audio/via-ac97.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/audio/via-ac97.c b/hw/audio/via-ac97.c index 1e0a5c7398..d5231e1cf2 100644 --- a/hw/audio/via-ac97.c +++ b/hw/audio/via-ac97.c @@ -175,7 +175,7 @@ static void

[PATCH 09/31] hw/audio/es1370: skip automatic zero-init of large array

2025-06-10 Thread Daniel P . Berrangé
data from the audio backend and/or device memory. Signed-off-by: Daniel P. Berrangé --- hw/audio/es1370.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/audio/es1370.c b/hw/audio/es1370.c index 8efb969212..a6a32a6348 100644 --- a/hw/audio/es1370.c +++ b/hw/audio/es137

[PATCH 25/31] hw/ppc/spapr_tpm_proxy: skip automatic zero-init of large arrays

2025-06-10 Thread Daniel P . Berrangé
data from the proxy FD. Signed-off-by: Daniel P. Berrangé --- hw/ppc/spapr_tpm_proxy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/ppc/spapr_tpm_proxy.c b/hw/ppc/spapr_tpm_proxy.c index 862eeaa50a..1297b3ad56 100644 --- a/hw/ppc/spapr_tpm_proxy.c ++

[PATCH 11/31] hw/audio/gus: skip automatic zero-init of large array

2025-06-10 Thread Daniel P . Berrangé
ing data from device memory. Signed-off-by: Daniel P. Berrangé --- hw/audio/marvell_88w8618.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/audio/marvell_88w8618.c b/hw/audio/marvell_88w8618.c index 6d3ebbb0c8..c5c79d083a 100644 --- a/hw/audio/marvell_88w8618.c +++ b/hw/aud

[PATCH 26/31] hw/usb/hcd-ohci: skip automatic zero-init of large array

2025-06-10 Thread Daniel P . Berrangé
mory. Signed-off-by: Daniel P. Berrangé --- hw/usb/hcd-ohci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/usb/hcd-ohci.c b/hw/usb/hcd-ohci.c index 71b54914d3..72a9f9f474 100644 --- a/hw/usb/hcd-ohci.c +++ b/hw/usb/hcd-ohci.c @@ -577,7 +577,7 @@ static int ohci_service_is

[PATCH 20/31] hw/net/tulip: skip automatic zero-init of large array

2025-06-10 Thread Daniel P . Berrangé
The 'tulip_setup_frame' method has a 4k byte array used for copynig DMA data from the device. Skip the automatic zero-init of this array to eliminate the performance overhead in the I/O hot path. The 'buf' array will be fully initialized when reading data from the device. Sig

[PATCH 02/31] hw/virtio/virtio: avoid cost of -ftrivial-auto-var-init in hot path

2025-06-10 Thread Daniel P . Berrangé
of the functions were hot. Fixes: 7ff9ff039380 ("meson: mitigate against use of uninitialize stack for exploits") Cc: Daniel P. Berrangé Signed-off-by: Stefan Hajnoczi --- hw/virtio/virtio.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/virtio/virtio.c b/

[PATCH 30/31] net/socket: skip automatic zero-init of large array

2025-06-10 Thread Daniel P . Berrangé
cket. Signed-off-by: Daniel P. Berrangé --- net/socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/socket.c b/net/socket.c index 8e3702e1f3..784dda686f 100644 --- a/net/socket.c +++ b/net/socket.c @@ -157,7 +157,7 @@ static void net_socket_send(void *opaque)

[PATCH 23/31] hw/nvme/ctrl: skip automatic zero-init of large arrays

2025-06-10 Thread Daniel P . Berrangé
; makes it unambiguous that the array is statically initialized. Signed-off-by: Daniel P. Berrangé --- hw/nvme/ctrl.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/nvme/ctrl.c b/hw/nvme/ctrl.c index fd935507bc..220002830d 100644 --- a/hw/nvme/ctrl.c +++ b/hw/nvme/ctrl

[PATCH 07/31] hw/audio/ac97: skip automatic zero-init of large arrays

2025-06-10 Thread Daniel P . Berrangé
ialized when reading data from the audio backend and/or device memory. Signed-off-by: Daniel P. Berrangé --- hw/audio/ac97.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/audio/ac97.c b/hw/audio/ac97.c index 669a0463cc..eb7a847080 100644 --- a/hw/audio/ac97.c +++

[PATCH 17/31] hw/hyperv/syndbg: skip automatic zero-init of large array

2025-06-10 Thread Daniel P . Berrangé
data is read off the network socket. Signed-off-by: Daniel P. Berrangé --- hw/hyperv/syndbg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/hyperv/syndbg.c b/hw/hyperv/syndbg.c index 8b8a14750d..ac7e15f6f1 100644 --- a/hw/hyperv/syndbg.c +++ b/hw/hyperv/syndbg.c @@ -192,7 +192,

[PATCH 29/31] hw/ufs/lu: skip automatic zero-init of large array

2025-06-10 Thread Daniel P . Berrangé
uest. Signed-off-by: Daniel P. Berrangé --- hw/ufs/lu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ufs/lu.c b/hw/ufs/lu.c index 57b307ea56..2d8ffd72c5 100644 --- a/hw/ufs/lu.c +++ b/hw/ufs/lu.c @@ -194,7 +194,7 @@ static int ufs_emulate_wlun_inquiry(UfsRequest *req, uint

[PATCH 22/31] hw/net/xgamc: skip automatic zero-init of large array

2025-06-10 Thread Daniel P . Berrangé
tch the data to send. Signed-off-by: Daniel P. Berrangé --- hw/net/xgmac.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/net/xgmac.c b/hw/net/xgmac.c index 9c87c4e70f..d45f872467 100644 --- a/hw/net/xgmac.c +++ b/hw/net/xgmac.c @@ -207,7 +207,7 @@ static void xgmac_ene

[PATCH 08/31] hw/audio/cs4231a: skip automatic zero-init of large arrays

2025-06-10 Thread Daniel P . Berrangé
when reading a block of data from the guest. The 'linbuf' array will be fully initialized when converting the audio samples. Signed-off-by: Daniel P. Berrangé --- hw/audio/cs4231a.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/audio/cs4231a.c b/hw/au

[PATCH 04/31] chardev/char-fd: skip automatic zero-init of large array

2025-06-10 Thread Daniel P . Berrangé
socket. Signed-off-by: Daniel P. Berrangé --- chardev/char-fd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chardev/char-fd.c b/chardev/char-fd.c index 23bfe3c0b1..6f03adf872 100644 --- a/chardev/char-fd.c +++ b/chardev/char-fd.c @@ -50,7 +50,7 @@ static gboolean fd_chr_r

[PATCH 10/31] hw/audio/gus: skip automatic zero-init of large array

2025-06-10 Thread Daniel P . Berrangé
a from device memory. Signed-off-by: Daniel P. Berrangé --- hw/audio/gus.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/audio/gus.c b/hw/audio/gus.c index 87e8634893..c36df0240f 100644 --- a/hw/audio/gus.c +++ b/hw/audio/gus.c @@ -183,7 +183,7 @@ static int GUS_read_DMA (voi

[PATCH 05/31] chardev/char-pty: skip automatic zero-init of large array

2025-06-10 Thread Daniel P . Berrangé
The 'pty_chr_read' method has a 4k byte array used for copying data between the PTY and device. Skip the automatic zero-init of this array to eliminate the performance overhead in the I/O hot path. The 'buf' array will be fully initialized when reading data off the PTY. Sig

[PATCH 01/31] include/qemu/compiler: add QEMU_UNINITIALIZED attribute macro

2025-06-10 Thread Daniel P . Berrangé
rdening feature, when using this to flag variables, it is important that the code is double-checked to ensure there is no possible use of uninitialized data in the method. Signed-off-by: Stefan Hajnoczi [DB: split off patch & rewrite guidance on when to use the annotation] Signed-off-by:

[PATCH 00/31] Skip automatic zero-init of large arrays / structs in I/O paths

2025-06-10 Thread Daniel P . Berrangé
kipping zero-init. I did reasonable review in each case to identify that the data was indeed initialized explicitly later in the method. Daniel P. Berrangé (29): block: skip automatic zero-init of large array in ioq_submit chardev/char-fd: skip automatic zero-init of large array chardev/char

Re: [PATCH] virtio: avoid cost of -ftrivial-auto-var-init in hot path

2025-06-05 Thread Daniel P . Berrangé
On Wed, Jun 04, 2025 at 03:18:43PM -0400, Stefan Hajnoczi wrote: > Since commit 7ff9ff039380 ("meson: mitigate against use of uninitialize > stack for exploits") the -ftrivial-auto-var-init=zero compiler option is > used to zero local variables. While this reduces security risks > associated with u

Re: [PATCH v4 04/19] target/i386/cpu: Remove X86CPU::check_cpuid field

2025-06-05 Thread Daniel P . Berrangé
On Thu, Jun 05, 2025 at 11:09:30AM +0200, Igor Mammedov wrote: > On Tue, 3 Jun 2025 23:54:19 +0800 > Xiaoyao Li wrote: > > > On 6/3/2025 11:02 PM, Igor Mammedov wrote: > > > On Wed, 28 May 2025 13:23:49 +0800 > > > Zhao Liu wrote: > > > > > >> On Wed, May 28, 2025 at 10:09:56AM +0800, Xiaoyao

Re: [PATCH v4 04/19] target/i386/cpu: Remove X86CPU::check_cpuid field

2025-06-05 Thread Daniel P . Berrangé
On Tue, Jun 03, 2025 at 05:02:38PM +0200, Igor Mammedov wrote: > On Wed, 28 May 2025 13:23:49 +0800 > Zhao Liu wrote: > > > On Wed, May 28, 2025 at 10:09:56AM +0800, Xiaoyao Li wrote: > > > Date: Wed, 28 May 2025 10:09:56 +0800 > > > From: Xiaoyao Li > > > Subject: Re: [PATCH v4 04/19] target/i3

Re: [PATCH] virtio: avoid cost of -ftrivial-auto-var-init in hot path

2025-06-05 Thread Daniel P . Berrangé
MU ? > > Fixes: 7ff9ff039380 ("meson: mitigate against use of uninitialize stack for > exploits") > Cc: Daniel P. Berrangé > Signed-off-by: Stefan Hajnoczi > --- > include/qemu/compiler.h | 12 ++++ > hw/virtio/virtio.c | 8 >

Re: [PATCH v2] hw/core/qdev-properties-system: Add missing return in set_drive_helper()

2025-05-30 Thread Daniel P . Berrangé
644 > --- a/hw/core/qdev-properties-system.c > +++ b/hw/core/qdev-properties-system.c > @@ -145,6 +145,7 @@ static void set_drive_helper(Object *obj, Visitor *v, > const char *name, > if (ctx != bdrv_get_aio_context(bs)) { > error_setg(errp, "Different ai

Re: [PATCH v4 3/3] nbd: Set unix socket send buffer on Linux

2025-05-19 Thread Daniel P . Berrangé
ffer size | time| user| system | > |-|-|-|-| > | default | 3.582 | 4.595 | 2.392 | > | 524288 | 1.499 | 4.384 | 1.482 | > | 1048576 | 1.377 | 4.381 | 1.345 | > | 2097152 | 1.388 | 4.389 | 1.354 |

Re: [PATCH v4 2/3] nbd: Set unix socket send buffer on macOS

2025-05-19 Thread Daniel P . Berrangé
; | default | 13.085 | 5.664 | 6.461 | > | 65536 | 3.299 | 5.106 | 2.515 | > | 131072 | 2.396 | 4.989 | 2.069 | > | 262144 | 1.607 | 4.724 | 1.555 | > | 524288 | 1.271 | 4.528 | 1.224 | > | 1048576 | 1.294 | 4.565 | 1.3

Re: [PATCH v4 1/3] io: Add helper for setting socket send buffer size

2025-05-19 Thread Daniel P . Berrangé
ket buffer size is not a fatal error, but the > caller may want to warn about the failure. > > Signed-off-by: Nir Soffer > --- > include/io/channel-socket.h | 13 + > io/channel-socket.c | 11 +++ > 2 files changed, 24 insertions(+) Review

Re: [RFC PATCH v2 0/4] Revival of patches to implement NBD client multi-conn

2025-04-29 Thread Daniel P . Berrangé
On Mon, Apr 28, 2025 at 01:46:43PM -0500, Eric Blake wrote: > This is a rebase of patches that Rich Jones first posted in 2023: > https://lists.gnu.org/archive/html/qemu-devel/2023-03/msg03320.html > > I'm still leaving the series in an RFC state while I'm trying to > improve the code to better pl

Re: [PATCH 01/19] hw/core/loader.c: Fix type conflict of GLib function pointers

2025-04-16 Thread Daniel P . Berrangé
On Wed, Apr 16, 2025 at 11:00:37AM +0200, Paolo Bonzini wrote: > Il mer 16 apr 2025, 10:29 Daniel P. Berrangé ha > scritto: > > > > -secs = g_list_sort(secs, sort_secs); > > > +secs = g_list_sort_with_data(secs, sort_secs, NULL); > > > > I don'

Re: [PATCH 01/19] hw/core/loader.c: Fix type conflict of GLib function pointers

2025-04-16 Thread Daniel P . Berrangé
On Wed, Apr 16, 2025 at 05:14:06PM +0900, Kohei Tokunaga wrote: > On emscripten, function pointer casts can cause function call failure. > This commit fixes the function definition to match to the type of the > function call using g_list_sort_with_data. > > Signed-off-by: Kohei Tokunaga > --- >

Re: [PATCH 00/10] Enable QEMU to run on browsers

2025-04-11 Thread Daniel P . Berrangé
On Wed, Apr 09, 2025 at 03:21:15PM -0400, Stefan Hajnoczi wrote: > On Mon, Apr 07, 2025 at 11:45:51PM +0900, Kohei Tokunaga wrote: > > This patch series enables QEMU's system emulator to run in a browser using > > Emscripten. > > It includes implementations and workarounds to address browser enviro

Re: [PATCH] qcow2: Don't crash qemu-img info with missing crypto header

2025-03-18 Thread Daniel P . Berrangé
tests/qcow2-encryption | 75 +++ > tests/qemu-iotests/tests/qcow2-encryption.out | 32 > 3 files changed, 109 insertions(+), 2 deletions(-) > create mode 100755 tests/qemu-iotests/tests/qcow2-encryption > create mode 100644 tests/qemu-iotests/tests/qcow2-

Re: [PATCH 1/2] scsi-disk: Advertise FUA support by default

2025-03-04 Thread Daniel P . Berrangé
On Tue, Mar 04, 2025 at 03:52:31PM +, Alberto Faria wrote: > FUA emulation code is already is place. > > Signed-off-by: Alberto Faria > --- > hw/scsi/scsi-disk.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c > index e7f738

Re: [PATCH] trace/simple: Fix hang when using simpletrace with fork()

2025-02-26 Thread Daniel P . Berrangé
On Wed, Feb 26, 2025 at 10:38:56AM +0100, Thomas Huth wrote: > On 26/02/2025 10.15, Daniel P. Berrangé wrote: > > On Wed, Feb 26, 2025 at 09:50:15AM +0100, Thomas Huth wrote: > > > When compiling QEMU with --enable-trace-backends=simple , the > > > iotest 233 is curr

Re: [PATCH] trace/simple: Fix hang when using simpletrace with fork()

2025-02-26 Thread Daniel P . Berrangé
On Wed, Feb 26, 2025 at 10:29:59AM +0100, Kevin Wolf wrote: > Am 26.02.2025 um 09:50 hat Thomas Huth geschrieben: > > When compiling QEMU with --enable-trace-backends=simple , the > > iotest 233 is currently hanging. This happens because qemu-nbd > > calls trace_init_backends() first - which causes

Re: [PATCH] trace/simple: Fix hang when using simpletrace with fork()

2025-02-26 Thread Daniel P . Berrangé
On Wed, Feb 26, 2025 at 09:50:15AM +0100, Thomas Huth wrote: > When compiling QEMU with --enable-trace-backends=simple , the > iotest 233 is currently hanging. This happens because qemu-nbd > calls trace_init_backends() first - which causes simpletrace to > install its writer thread and the atexit(

Re: Problem with iotest 233

2025-02-25 Thread Daniel P . Berrangé
On Tue, Feb 25, 2025 at 06:52:43PM +0100, Thomas Huth wrote: > On 25/02/2025 18.44, Thomas Huth wrote: > > On 25/02/2025 11.12, Kevin Wolf wrote: > > > Am 25.02.2025 um 08:20 hat Thomas Huth geschrieben: > > > > > > > >   Hi! > > > > > > > > I'm facing a weird hang in iotest 233 on my Fedora 41 l

Re: [PATCH 10/11] bochs-rs: Add bochs block driver reimplementation in Rust

2025-02-12 Thread Daniel P . Berrangé
On Wed, Feb 12, 2025 at 01:58:15PM +0100, Kevin Wolf wrote: > Am 12.02.2025 um 10:41 hat Daniel P. Berrangé geschrieben: > > On Wed, Feb 12, 2025 at 09:14:57AM +0000, Daniel P. Berrangé wrote: > > > On Tue, Feb 11, 2025 at 10:43:27PM +0100, Kevin Wolf wrote: > > > &

Re: [PATCH 10/11] bochs-rs: Add bochs block driver reimplementation in Rust

2025-02-12 Thread Daniel P . Berrangé
On Wed, Feb 12, 2025 at 09:14:57AM +, Daniel P. Berrangé wrote: > On Tue, Feb 11, 2025 at 10:43:27PM +0100, Kevin Wolf wrote: > > This adds a separate block driver for the bochs image format called > > 'bochs-rs' so that for the moment both the C implementation and th

Re: [PATCH 10/11] bochs-rs: Add bochs block driver reimplementation in Rust

2025-02-12 Thread Daniel P . Berrangé
On Tue, Feb 11, 2025 at 10:43:27PM +0100, Kevin Wolf wrote: > This adds a separate block driver for the bochs image format called > 'bochs-rs' so that for the moment both the C implementation and the Rust > implementation can be present in the same build. The intention is to > remove the C implemen

Re: [PATCH] block-backend: Fix argument order when calling 'qapi_event_send_block_io_error()'

2025-01-27 Thread Daniel P . Berrangé
worry about libvirt needs to add back compat to workaround the initially broken 9.2.0 release events. > --- > block/block-backend.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Daniel P. Berrangé > > diff --git a/block/block-backend.c b/block/block-back

Re: libnfs 6.0.0 breaks qemu compilation

2025-01-23 Thread Daniel P . Berrangé
Is anyone planning to pick this up and turn it into a formal patch for QEMU ? We're hitting this breakage again in Fedora with libnfs6 and its also hit homebrew and probably other distros too. On Sun, Dec 15, 2024 at 12:52:47PM +1000, ronnie sahlberg wrote: > Maybe something like this: > --- > d

Re: [PATCH 2/2] qapi/crypto: support enable encryption/decryption in parallel

2025-01-17 Thread Daniel P . Berrangé
On Thu, Nov 28, 2024 at 06:51:22PM +0800, t...@chinatelecom.cn wrote: > From: Guoyi Tu > > add encrypt-in-parallel option to enable encryption/decryption > in parallel > > Signed-off-by: Guoyi Tu > --- > block/crypto.c | 8 > block/crypto.h | 9 + > qapi/block-core

Re: [PATCH 0/2] support block encryption/decryption in parallel

2025-01-17 Thread Daniel P . Berrangé
On Thu, Jan 16, 2025 at 01:37:44PM +0100, Kevin Wolf wrote: > Am 13.12.2024 um 16:56 hat Daniel P. Berrangé geschrieben: > > On Thu, Nov 28, 2024 at 06:51:20PM +0800, t...@chinatelecom.cn wrote: > > > From: Guoyi Tu > > > > > > Currently, disk I/O encr

Re: [PATCH 11/21] hw/i386/pc: Remove deprecated pc-q35-2.5 and pc-i440fx-2.5 machines

2025-01-16 Thread Daniel P . Berrangé
c| 3 --- > hw/i386/pc_piix.c | 13 - > hw/i386/pc_q35.c| 13 - > 5 files changed, 2 insertions(+), 34 deletions(-) On the assumption this series isn't sent in a PULL until 10.1.0 dev cycle Reviewed-by: Daniel P. Berrangé

Re: [PATCH 02/21] hw/i386/pc: Remove deprecated pc-q35-2.4 and pc-i440fx-2.4 machines

2025-01-16 Thread Daniel P . Berrangé
insertions(+), 26 deletions(-) I'll give this: Reviewed-by: Daniel P. Berrangé on the basis that this patch series isn't added to a PULL until the 10.1.0 dev cycle opens. > > diff --git a/docs/about/removed-features.rst b/docs/about/removed-features.rst > index c6616ce05e5..

Re: [PATCH 21/21] hw/net/vmxnet3: Merge DeviceRealize in InstanceInit

2025-01-16 Thread Daniel P . Berrangé
- > 1 file changed, 1 insertion(+), 14 deletions(-) Reviewed-by: Daniel P. Berrangé With regards, Daniel -- |: https://berrange.com -o-https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o-https://fstop138.berrange.com :| |: https://ent

Re: [PATCH 20/21] hw/net/vmxnet3: Remove VMXNET3_COMPAT_FLAG_DISABLE_PCIE definition

2025-01-16 Thread Daniel P . Berrangé
l the > code around VMXNET3_COMPAT_FLAG_DISABLE_PCIE. > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/net/vmxnet3.c | 11 +-- > 1 file changed, 1 insertion(+), 10 deletions(-) Reviewed-by: Daniel P. Berrangé With regards, Daniel -- |: https://berrange.com -o-https://www.fl

Re: [PATCH 19/21] hw/net/vmxnet3: Remove VMXNET3_COMPAT_FLAG_OLD_MSI_OFFSETS definition

2025-01-16 Thread Daniel P . Berrangé
l the > code around VMXNET3_COMPAT_FLAG_OLD_MSI_OFFSETS. > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/net/vmxnet3.c | 20 ++-- > 1 file changed, 6 insertions(+), 14 deletions(-) Reviewed-by: Daniel P. Berrangé With regards, Daniel -- |: https://berrange.com -o-ht

Re: [PATCH 18/21] hw/scsi/vmw_pvscsi: Convert DeviceRealize -> InstanceInit

2025-01-16 Thread Daniel P . Berrangé
> 1 file changed, 3 insertions(+), 10 deletions(-) Reviewed-by: Daniel P. Berrangé With regards, Daniel -- |: https://berrange.com -o-https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o-https://fstop138.berrange.com :| |: https://ent

Re: [PATCH 17/21] hw/scsi/vmw_pvscsi: Remove PVSCSI_COMPAT_DISABLE_PCIE_BIT definition

2025-01-16 Thread Daniel P . Berrangé
OMPAT_DISABLE_PCIE_BIT. > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/scsi/vmw_pvscsi.c | 44 > 1 file changed, 8 insertions(+), 36 deletions(-) Reviewed-by: Daniel P. Berrangé With regards, Daniel -- |: https://berrange.c

Re: [PATCH 16/21] hw/scsi/vmw_pvscsi: Remove PVSCSI_COMPAT_OLD_PCI_CONFIGURATION definition

2025-01-16 Thread Daniel P . Berrangé
t; all the code around PVSCSI_COMPAT_OLD_PCI_CONFIGURATION. > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/scsi/vmw_pvscsi.c | 12 ++-- > 1 file changed, 2 insertions(+), 10 deletions(-) Reviewed-by: Daniel P. Berrangé With regards, Daniel -- |: https://berrange.com -o-ht

Re: [PATCH 15/21] hw/block/fdc-isa: Remove 'fallback' property

2025-01-16 Thread Daniel P . Berrangé
manually setting the > default value in isabus_fdc_realize(). > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/block/fdc-isa.c | 4 +--- > 1 file changed, 1 insertion(+), 3 deletions(-) Reviewed-by: Daniel P. Berrangé With regards, Daniel -- |: https://berrange.com -

Re: [PATCH 14/21] hw/core/machine: Remove hw_compat_2_5[] array

2025-01-16 Thread Daniel P . Berrangé
t; hw/core/machine.c | 9 - > 2 files changed, 12 deletions(-) Reviewed-by: Daniel P. Berrangé With regards, Daniel -- |: https://berrange.com -o-https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o-https://fstop138.berrange.com :| |: ht

Re: [PATCH 13/21] hw/nvram/fw_cfg: Remove legacy FW_CFG_ORDER_OVERRIDE

2025-01-16 Thread Daniel P . Berrangé
files changed, 9 insertions(+), 141 deletions(-) Reviewed-by: Daniel P. Berrangé > > diff --git a/include/hw/boards.h b/include/hw/boards.h > index e9e33c57f27..a231c8cecee 100644 > --- a/include/hw/boards.h > +++ b/include/hw/boards.h > @@ -284,8 +284,7 @@ stru

Re: [PATCH 12/21] hw/i386/x86: Remove X86MachineClass::save_tsc_khz field

2025-01-16 Thread Daniel P . Berrangé
e Mathieu-Daudé > --- > include/hw/i386/x86.h | 5 - > hw/i386/x86.c | 1 - > target/i386/machine.c | 5 ++--- > 3 files changed, 2 insertions(+), 9 deletions(-) Reviewed-by: Daniel P. Berrangé With regards, Daniel -- |: https://berrange.com -o-https://www.flickr.co

Re: [PATCH 10/21] hw/virtio/virtio-pci: Remove VIRTIO_PCI_FLAG_DISABLE_PCIE definition

2025-01-16 Thread Daniel P . Berrangé
_PCI_FLAG_DISABLE_PCIE. > > Signed-off-by: Philippe Mathieu-Daudé > --- > include/hw/virtio/virtio-pci.h | 4 > hw/virtio/virtio-pci.c | 5 + > 2 files changed, 1 insertion(+), 8 deletions(-) Reviewed-by: Daniel P. Berrangé With regards, Daniel -- |

Re: [PATCH 09/21] hw/virtio/virtio-pci: Remove VIRTIO_PCI_FLAG_MIGRATE_EXTRA definition

2025-01-16 Thread Daniel P . Berrangé
PCI_FLAG_MIGRATE_EXTRA. > > Signed-off-by: Philippe Mathieu-Daudé > --- > include/hw/virtio/virtio-pci.h | 4 > hw/virtio/virtio-pci.c | 10 -- > 2 files changed, 14 deletions(-) Reviewed-by: Daniel P. Berrangé With regards, Daniel -- |: https://berrang

Re: [PATCH 08/21] hw/net/e1000: Remove unused E1000_FLAG_MAC flag

2025-01-16 Thread Daniel P . Berrangé
AC. > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/net/e1000.c | 63 +- > 1 file changed, 11 insertions(+), 52 deletions(-) Reviewed-by: Daniel P. Berrangé > > diff --git a/hw/net/e1000.c b/hw/net/e1000.c > index 3d0b2277

Re: [PATCH 07/21] hw/core/machine: Remove hw_compat_2_4[] array

2025-01-16 Thread Daniel P . Berrangé
t; hw/core/machine.c | 9 - > 2 files changed, 12 deletions(-) Reviewed-by: Daniel P. Berrangé With regards, Daniel -- |: https://berrange.com -o-https://www.flickr.com/photos/dberrange :| |: https://libvirt.org -o-https://fstop138.berrange.com :| |: ht

  1   2   3   4   5   6   7   8   9   10   >