Re: [PATCH v8 0/7] Allow to enable multifd and postcopy migration together

2025-04-11 Thread Prasad Pandit
Hi, On Fri, 11 Apr 2025 at 01:48, Fabiano Rosas wrote: > That's what it looks like. It could be some error condition that is not > being propagated properly. The thread hits an error and exits without > informing the rest of migration. * The gdb(1) hanging in the postcopy_ram_fault_thread() is n

Re: [PATCH 1/2] hw: usb: xhci: Add property to support writing ERSTBA in high-low order

2025-04-11 Thread Nicholas Piggin
On Sun Apr 6, 2025 at 12:00 AM AEST, Guenter Roeck wrote: > According to the XHCI specification, ERSTBA should be written in Low-High > order. The Linux kernel writes the high word first. This results in an > initialization failure. This should probably be reworded, it's not so much that Linux doe

Re: [PATCH 2/2] hw/usb/hcd-dwc3: Set erstba-hi-lo property

2025-04-11 Thread Nicholas Piggin
On Sun Apr 6, 2025 at 12:00 AM AEST, Guenter Roeck wrote: > The dwc3 hardware requires the ERSTBA address to be written in > high-low order. > > From information found in the Linux kernel: In fact this info could be contained within this patch rather than duplicated in both. This is the one for th

Re: [PATCH v2] target/i386: Fix model number of Zhaoxin YongFeng vCPU template

2025-04-11 Thread Ewan Hai
On 4/11/25 11:22 AM, Zhao Liu wrote: On Thu, Apr 10, 2025 at 10:07:15PM +0800, Ewan Hai wrote: Date: Thu, 10 Apr 2025 22:07:15 +0800 From: Ewan Hai Subject: Re: [PATCH v2] target/i386: Fix model number of Zhaoxin YongFeng vCPU template On 4/10/25 8:22 PM, Paolo Bonzini wrote: On 4/7/25

[PATCH v3 5/8] tests/qtest/xhci: add a test for TR NOOP commands

2025-04-11 Thread Nicholas Piggin
Run some TR NOOP commands through the transfer ring. Signed-off-by: Nicholas Piggin --- tests/qtest/usb-hcd-xhci-test.c | 36 - 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/tests/qtest/usb-hcd-xhci-test.c b/tests/qtest/usb-hcd-xhci-test.c index b9

[PATCH v3 2/8] hw/usb/xhci: Rename and move HCD register region constants to header

2025-04-11 Thread Nicholas Piggin
This also adds some missing constants rather than open-coding offsets and sizes. Signed-off-by: Nicholas Piggin --- hw/usb/hcd-xhci.h | 16 hw/usb/hcd-xhci.c | 48 ++- 2 files changed, 38 insertions(+), 26 deletions(-) diff --git a/hw

[PATCH v3 1/8] hw/usb/xhci: Move HCD constants to a header and add register constants

2025-04-11 Thread Nicholas Piggin
Prepare to use some of these constants in xhci qtest code. Signed-off-by: Nicholas Piggin --- hw/usb/hcd-xhci.h | 214 ++ hw/usb/hcd-xhci.c | 450 +++--- 2 files changed, 360 insertions(+), 304 deletions(-) diff --git a/hw/usb/hcd-xhci

[PATCH v3 4/8] hw/usb/xhci: Support TR NOOP commands

2025-04-11 Thread Nicholas Piggin
Implement XHCI TR NOOP commands by setting up then immediately completing the packet. The IBM AIX XHCI HCD driver uses NOOP commands to check driver and hardware health, which works after this change. Signed-off-by: Nicholas Piggin --- hw/usb/hcd-xhci.c | 28 +++- 1 file

[PATCH v3 7/8] hw/usb/hcd-xhci-pci: Make PCI device more configurable

2025-04-11 Thread Nicholas Piggin
To prepare to support another USB PCI Host Controller, make some PCI configuration dynamic. Signed-off-by: Nicholas Piggin --- hw/usb/hcd-xhci-pci.h | 9 hw/usb/hcd-xhci-pci.c | 118 +- 2 files changed, 103 insertions(+), 24 deletions(-) diff --git

[PATCH v3 3/8] tests/qtest/xhci: Add controller and device setup and ring tests

2025-04-11 Thread Nicholas Piggin
Add tests which init the host controller registers to the point where command and event rings, irqs are operational. Enumerate ports and set up an attached device context that enables device transfer ring to be set up and tested. This test does a bunch of things at once and is not yet well librifi

[PATCH v3 0/8] usb/xhci: TR NOOP, TI HCD device, more qtests

2025-04-11 Thread Nicholas Piggin
This series adds better support qtests support for the xhci controller, adds support for the "TR NOOP" command used by AIX, and adds a new USB controller model from TI that PowerVM and AIX use. This series depends on some of the qtests changes from this one: https://lore.kernel.org/qemu-devel/202

[PATCH v3 8/8] hw/usb/hcd-xhci-pci: Add TI TUSB73X0 XHCI controller model

2025-04-11 Thread Nicholas Piggin
The TI TUSB73X0 controller has some interesting differences from NEC, notably a separate BAR for MSIX, and PM capabilities. The spec is freely available without sign-up. This controller is accepted by IBM Power proprietary firmware and software (when the subsystem IDs are set to Power servers, whi

[PATCH v3 6/8] tests/qtest/xhci: test the qemu-xhci device

2025-04-11 Thread Nicholas Piggin
Add support in the test code for running multiple drivers, and add tests for the qemu-xhci device. Signed-off-by: Nicholas Piggin --- tests/qtest/usb-hcd-xhci-test.c | 96 + 1 file changed, 63 insertions(+), 33 deletions(-) diff --git a/tests/qtest/usb-hcd-xhci-t

Re: [PATCH] virtio-net: Copy all for dhclient workaround

2025-04-11 Thread Akihiko Odaki
On 2025/04/07 17:29, Antoine Damhet wrote: On Sat, Apr 05, 2025 at 05:04:28PM +0900, Akihiko Odaki wrote: The goal of commit 7987d2be5a8b ("virtio-net: Copy received header to buffer") was to remove the need to patch the (const) input buffer with a recomputed UDP checksum by copying headers to a

[PATCH v2 05/10] usb/msd: Allow CBW packet size greater than 31

2025-04-11 Thread Nicholas Piggin
The CBW structure is 31 bytes, so CBW DATAOUT packets must be at least 31 bytes. QEMU enforces exactly 31 bytes, but this is inconsistent with how it handles CSW packets (where it allows greater than or equal to 13 bytes) despite wording in the spec[*] being similar for both packet types: "shall en

[PATCH v2 03/10] usb/msd: Improved handling of mass storage reset

2025-04-11 Thread Nicholas Piggin
The mass storage reset request handling does not reset in-flight SCSI requests or USB MSD packets. Implement this by calling the device reset handler which should take care of everything. Signed-off-by: Nicholas Piggin --- hw/usb/dev-storage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-

[PATCH v2 10/10] usb/msd: Add more tracing

2025-04-11 Thread Nicholas Piggin
Add tracing for more received packet types, cbw_state changes, and some more SCSI callbacks. These were useful in debugging relaxed packet ordering support. Signed-off-by: Nicholas Piggin --- hw/usb/dev-storage.c | 23 +-- hw/usb/trace-events | 9 - 2 files changed,

[PATCH v2 06/10] usb/msd: Split async packet tracking into data and csw

2025-04-11 Thread Nicholas Piggin
The async packet handling logic has places that infer whether the async packet is data or CSW, based on context. This is not wrong, it just makes the logic easier to follow if they are categorised when they are accepted. Signed-off-by: Nicholas Piggin --- include/hw/usb/msd.h | 5 +- hw/usb/de

[PATCH v2 01/10] usb/msd: Split in and out packet handling

2025-04-11 Thread Nicholas Piggin
Split in and out packet handling int otheir own functions, to make them a bit more managable. Signed-off-by: Nicholas Piggin --- hw/usb/dev-storage.c | 266 +++ 1 file changed, 145 insertions(+), 121 deletions(-) diff --git a/hw/usb/dev-storage.c b/hw/usb

[PATCH v2 08/10] usb/msd: Rename mode to cbw_state, and tweak names

2025-04-11 Thread Nicholas Piggin
This reflects a little better what it does, particularly with a subsequent change to relax the order packets are seen in. This field is not the general state of the MSD state machine, rather it follows packets that are completed as part of a CBW command. The difference is a bit subtle, so for a co

[PATCH v2 09/10] usb/msd: Permit a DATA-IN or CSW packet before CBW packet

2025-04-11 Thread Nicholas Piggin
The USB MSD protocol has 3 packets that make up a command, and only one command may be active at any time. - CBW to start a command (that contains a SCSI request). - DATA (IN or OUT) to request data transfer between host and SCSI layer. - CSW to return status and complete the command. DATA is omi

[PATCH v2 02/10] usb/msd: Ensure packet structure layout is correct

2025-04-11 Thread Nicholas Piggin
These structures are hardware interfaces, ensure the layout is correct. Signed-off-by: Nicholas Piggin --- hw/usb/dev-storage.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/usb/dev-storage.c b/hw/usb/dev-storage.c index 2d7306b0572..87c22476f6b 100644 --- a/hw/usb/d

[PATCH v2 04/10] usb/msd: Improve packet validation error logging

2025-04-11 Thread Nicholas Piggin
Errors in incoming USB MSD packet format or context would typically be guest software errors. Log these under guest errors. Signed-off-by: Nicholas Piggin --- hw/usb/dev-storage.c | 53 +++- 1 file changed, 42 insertions(+), 11 deletions(-) diff --git a/h

[PATCH v2 00/10] usb/msd: Permit relaxed ordering of IN packets

2025-04-11 Thread Nicholas Piggin
This series ultimately permits relaxed ordering of USB mass-storage packets from the host, as allowed by the usbmassbulk 1.0 spec, but not usually seen in drivers. AIX drivers do require this ordering. Since v1: https://lore.kernel.org/qemu-devel/20241212091323.1442995-1-npig...@gmail.com/ - Reb

[PATCH v2 07/10] usb/msd: Add some additional assertions

2025-04-11 Thread Nicholas Piggin
Add more assertions to help verify internal logic. Signed-off-by: Nicholas Piggin --- hw/usb/dev-storage.c | 23 +++ 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/hw/usb/dev-storage.c b/hw/usb/dev-storage.c index a9d8d4e8618..3b806872587 100644 --- a/hw/usb/d

Re: [PATCH v2 1/2] file-posix: probe discard alignment on Linux block devices

2025-04-11 Thread Hanna Czenczek
On 10.04.25 20:41, Stefan Hajnoczi wrote: Populate the pdiscard_alignment block limit so the block layer is able align discard requests correctly. Signed-off-by: Stefan Hajnoczi --- block/file-posix.c | 56 +- 1 file changed, 55 insertions(+), 1 de

Re: [PATCH v2 2/2] block/io: skip head/tail requests on EINVAL

2025-04-11 Thread Hanna Czenczek
On 10.04.25 20:41, Stefan Hajnoczi wrote: When guests send misaligned discard requests, the block layer breaks them up into a misaligned head, an aligned main body, and a misaligned tail. The file-posix block driver on Linux returns -EINVAL on misaligned discard requests. This causes bdrv_co_pdi

Re: [PATCH] migration: add FEATURE_SEEKABLE to QIOChannelBlock

2025-04-11 Thread Marco Cavenati
On Thursday, April 10, 2025 21:52 CEST, Fabiano Rosas wrote: > We'll need to add the infrastructure to reject multifd and direct-io > before this. The rest of the capabilities should not affect mapped-ram, > so it's fine (for now) if we don't honor them. Ok, thanks for the update. > What about

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

2025-04-11 Thread Paolo Bonzini
On 4/10/25 15:13, Kohei Tokunaga wrote: > The biggest problem I'm seeing is we no longer support 64-bit guests on > 32-bit hosts, and don't plan to revert that. Yes, so the sixth patch ("[PATCH 06/10] include/exec: Allow using 64bit guest addresses on emscripten") should be considered as a tempo

RE: Configuring onboard devices, in particular memory contents (was: [PATCH v1 0/1] hw/misc/aspeed_sbc: Implement OTP memory and controller)

2025-04-11 Thread Kane Chen
Hi Markus, Thank you for the background information. Since the OTP device is part of the Secure Boot Controller (SBC), I plan to register it in the global table. I believe this will simplify usage. Meanwhile, based on Philippe's comment, I’m working on `aspeed_otp.c` to handle low-level OTP op

[PATCH v1 3/3] target/s390x: Return UVC cmd code, RC and RRC value when DIAG 308 Subcode 10 fails to enter secure mode

2025-04-11 Thread Gautam Gala
Extend DIAG308 subcode 10 to return the UVC RC, RRC and command code in bit positions 32-47, 16-31, and 0-15 of register R1 + 1 if the function does not complete successfully (in addition to the previously returned diag response code in bit position 47-63). Signed-off-by: Gautam Gala --- hw/s390

Re: Issue with stoptrigger.c Plugin in QEMU Emulation

2025-04-11 Thread Saanjh Sengupta
Hi, Thank you for responding. The error is consistent while executing a command on the latest master branch (commit ID: 56c6e249b6988c1b6edc2dd34ebb0f1e570a1365) for the v10.0.0-rc3 release. Could you please confirm if you are using the same command (like I do in my case), and if possible, sh

Re: Configuring onboard devices, in particular memory contents

2025-04-11 Thread Cédric Le Goater
On 4/11/25 11:08, Kane Chen wrote: Hi Markus, Thank you for the background information. Since the OTP device is part of the Secure Boot Controller (SBC), I plan to register it in the global table. I believe this will simplify usage. Meanwhile, based on Philippe's comment, I’m working on `aspe

[PATCH v1 0/3] target/s390x - DIAG 308 extend subcode 10 to return UVC cmd id, RC and RRC values upon failure to enter secure mode

2025-04-11 Thread Gautam Gala
DIAG 308 (subcode 10 - performing secure execution unpack) response code when the configuration is unable to enter secure mode has limited usability as it is a fixed value (0xa02) for variety of different reasons. The aim is to extend this DIAG to return UVC command ID, RC and RRC values in additio

[PATCH v1 2/3] target/s390x: introduce function when exiting PV

2025-04-11 Thread Gautam Gala
introduce a static function when exiting PV. The function replaces an existing macro (s390_pv_cmd_exit). Signed-off-by: Gautam Gala --- target/s390x/kvm/pv.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/target/s390x/kvm/pv.c b/target/s390x/kvm/pv.c index

[PATCH v1 1/3] target/s390x: Introduce constant when checking if PV header couldn't be decrypted

2025-04-11 Thread Gautam Gala
Introduce a named constant when checking the Set Secure Configuration parameters UV call return code for the case where no valid host key was found and therefore the PV header couldn't be decrypted (0x108). Signed-off-by: Gautam Gala --- target/s390x/kvm/pv.c | 3 ++- 1 file changed, 2 insertion

Re: [PATCH V1 0/6] fast qom tree get

2025-04-11 Thread Daniel P . Berrangé
On Wed, Apr 09, 2025 at 09:58:13AM +0200, Peter Krempa via Devel wrote: > On Wed, Apr 09, 2025 at 09:39:02 +0200, Markus Armbruster via Devel wrote: > > Hi Steve, I apologize for the slow response. > > > > Steve Sistare writes: > > > > > Using qom-list and qom-get to get all the nodes and proper

Re: [RFC PATCH-for-8.0 09/10] hw/virtio: Extract vhost_user_ram_slots_max() to vhost-user-target.c

2025-04-11 Thread Philippe Mathieu-Daudé
On 10/4/25 19:29, Pierrick Bouvier wrote: On 4/10/25 10:21, Philippe Mathieu-Daudé wrote: On 10/4/25 16:36, Pierrick Bouvier wrote: On 4/10/25 05:14, Philippe Mathieu-Daudé wrote: Hi Pierrick, On 13/12/22 00:05, Philippe Mathieu-Daudé wrote: The current definition of VHOST_USER_MAX_RAM_SLOTS

Re: [PATCH for-10.0] scsi-disk: Apply error policy for host_status errors again

2025-04-11 Thread Kevin Wolf
Am 10.04.2025 um 17:28 hat Paolo Bonzini geschrieben: > On Thu, Apr 10, 2025 at 4:25 PM Paolo Bonzini wrote: > > You should set ret = 0 here to avoid going down the > > scsi_sense_from_errno() path. > > > > Otherwise, > > > > Reviewed-by: Paolo Bonzini > > Okay, going down the scsi_sense_from_er

Re: [PATCH v2 02/10] usb/msd: Ensure packet structure layout is correct

2025-04-11 Thread Philippe Mathieu-Daudé
On 11/4/25 10:04, Nicholas Piggin wrote: These structures are hardware interfaces, ensure the layout is correct. Signed-off-by: Nicholas Piggin --- hw/usb/dev-storage.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH v2 03/10] usb/msd: Improved handling of mass storage reset

2025-04-11 Thread Philippe Mathieu-Daudé
On 11/4/25 10:04, Nicholas Piggin wrote: The mass storage reset request handling does not reset in-flight SCSI requests or USB MSD packets. Implement this by calling the device reset handler which should take care of everything. Signed-off-by: Nicholas Piggin --- hw/usb/dev-storage.c | 2 +-

[PATCH 5/5] vfio/iommufd: Drop HostIOMMUDeviceCaps from HostIOMMUDevice

2025-04-11 Thread Zhenzhong Duan
Because hiod_iommufd_get_cap() was dropped, HostIOMMUDeviceCaps is not useful any more, drop it. This also hides HostIOMMUDeviceCaps from vIOMMU so the only way to check cap is through .get_cap() interface. This makes HostIOMMUDevice exposing data to vIOMMU as small as possible. Signed-off-by: Zh

[PATCH 3/5] vfio/iommufd: Implement .get_cap() in TYPE_HOST_IOMMU_DEVICE_IOMMUFD_VFIO sub-class

2025-04-11 Thread Zhenzhong Duan
Now we have saved a copy of host iommu capabilities in VFIODevice, implemented hiod_iommufd_vfio_get_cap() by querying the caps copy in sub-class. This overrides .get_cap() implementation hiod_iommufd_vfio_get_cap() in TYPE_HOST_IOMMU_DEVICE_IOMMUFD parent class. Vendor caps are checked for a spec

[PATCH 1/5] vfio/iommufd: Save host iommu capabilities in VFIODevice.caps

2025-04-11 Thread Zhenzhong Duan
The saved caps copy can be used to check dirty tracking capability. The capabilities is gotten through IOMMUFD interface, so define a new structure HostIOMMUDeviceIOMMUFDCaps which contains vendor caps raw data in "include/system/iommufd.h". This is a prepare work for moving .realize() after .att

Re: [PATCH for-10.0] scsi-disk: Apply error policy for host_status errors again

2025-04-11 Thread Paolo Bonzini
On Fri, Apr 11, 2025 at 12:18 PM Kevin Wolf wrote: > > Okay, going down the scsi_sense_from_errno() path is more or less > > harmless because status and sense end up unused; even though ENODEV is > > not something that the function handles, that can be added as a > > cleanup in 10.1. > > Yes, it c

[PATCH 0/5] cleanup interfaces

2025-04-11 Thread Zhenzhong Duan
Hi, This series addresses Cédric's suggestion[1] and Donald's suggestion[2] to move realize() call after attach_device(). Also addresses Eric and Nicolin's suggestion[3] to use a union to hold different vendor capabilities. [1] https://lists.gnu.org/archive/html/qemu-devel/2025-04/msg01211.html

[PATCH 2/5] vfio: Move realize() after attach_device()

2025-04-11 Thread Zhenzhong Duan
Previously device attaching depends on realize() getting host iommu capabilities to check dirty tracking support. Now we save a caps copy in VFIODevice and check that copy for dirty tracking support, there is no dependency any more, move realize() call after attach_device() call in vfio_device_att

Re: [PATCH v2 02/10] usb/msd: Ensure packet structure layout is correct

2025-04-11 Thread Philippe Mathieu-Daudé
On 11/4/25 10:04, Nicholas Piggin wrote: These structures are hardware interfaces, ensure the layout is correct. Signed-off-by: Nicholas Piggin --- hw/usb/dev-storage.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/usb/dev-storage.c b/hw/usb/dev-storage.c index 2

[PATCH 4/5] backends/iommufd: Drop hiod_iommufd_get_cap()

2025-04-11 Thread Zhenzhong Duan
Because sub-class TYPE_HOST_IOMMU_DEVICE_IOMMUFD_VFIO has it's own implementation of .get_cap(), hiod_iommufd_get_cap() isn't used any more, drop it. Signed-off-by: Zhenzhong Duan --- backends/iommufd.c | 23 --- 1 file changed, 23 deletions(-) diff --git a/backends/iommufd.

Re: [PATCH v2 02/10] usb/msd: Ensure packet structure layout is correct

2025-04-11 Thread Philippe Mathieu-Daudé
On 11/4/25 12:21, Philippe Mathieu-Daudé wrote: On 11/4/25 10:04, Nicholas Piggin wrote: These structures are hardware interfaces, ensure the layout is correct. Signed-off-by: Nicholas Piggin ---   hw/usb/dev-storage.c | 5 -   1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hw

Re: [PATCH v2 08/10] usb/msd: Rename mode to cbw_state, and tweak names

2025-04-11 Thread Philippe Mathieu-Daudé
On 11/4/25 10:04, Nicholas Piggin wrote: This reflects a little better what it does, particularly with a subsequent change to relax the order packets are seen in. This field is not the general state of the MSD state machine, rather it follows packets that are completed as part of a CBW command.

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 v2 10/10] usb/msd: Add more tracing

2025-04-11 Thread Philippe Mathieu-Daudé
On 11/4/25 10:04, Nicholas Piggin wrote: Add tracing for more received packet types, cbw_state changes, and some more SCSI callbacks. These were useful in debugging relaxed packet ordering support. Signed-off-by: Nicholas Piggin --- hw/usb/dev-storage.c | 23 +-- hw/usb/t

Re: [PATCH v2 08/10] usb/msd: Rename mode to cbw_state, and tweak names

2025-04-11 Thread Philippe Mathieu-Daudé
On 11/4/25 10:04, Nicholas Piggin wrote: This reflects a little better what it does, particularly with a subsequent change to relax the order packets are seen in. This field is not the general state of the MSD state machine, rather it follows packets that are completed as part of a CBW command.

Re: [PATCH v2 07/10] usb/msd: Add some additional assertions

2025-04-11 Thread Philippe Mathieu-Daudé
On 11/4/25 10:04, Nicholas Piggin wrote: Add more assertions to help verify internal logic. Signed-off-by: Nicholas Piggin --- hw/usb/dev-storage.c | 23 +++ 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/hw/usb/dev-storage.c b/hw/usb/dev-storage.c index a

Re: [PATCH v3 1/5] io: Fix partial struct copy in qio_dns_resolver_lookup_sync_inet()

2025-04-11 Thread Daniel P . Berrangé
On Tue, Apr 08, 2025 at 01:25:00PM +0200, Juraj Marcin wrote: > From: Juraj Marcin > > Commit aec21d3175 (qapi: Add InetSocketAddress member keep-alive) > introduces the keep-alive flag, but this flag is not copied together > with other options in qio_dns_resolver_lookup_sync_inet(). > > This pa

Management applications and CPU feature flags (was: [PATCH V1 0/6] fast qom tree get)

2025-04-11 Thread Markus Armbruster
Daniel P. Berrangé writes: > On Wed, Apr 09, 2025 at 09:58:13AM +0200, Peter Krempa via Devel wrote: >> On Wed, Apr 09, 2025 at 09:39:02 +0200, Markus Armbruster via Devel wrote: >> > Hi Steve, I apologize for the slow response. >> > >> > Steve Sistare writes: >> > >> > > Using qom-list and qo

Re: [PATCH v3 2/5] util/qemu-sockets: Refactor setting client sockopts into a separate function

2025-04-11 Thread Daniel P . Berrangé
On Tue, Apr 08, 2025 at 01:25:01PM +0200, Juraj Marcin wrote: > From: Juraj Marcin > > This is done in preparation for enabling the SO_KEEPALIVE support for > server sockets and adding settings for more TCP keep-alive socket > options. > > Signed-off-by: Juraj Marcin > --- > util/qemu-sockets.

Re: Management applications and CPU feature flags (was: [PATCH V1 0/6] fast qom tree get)

2025-04-11 Thread Daniel P . Berrangé
On Fri, Apr 11, 2025 at 12:40:46PM +0200, Markus Armbruster wrote: > Daniel P. Berrangé writes: > > > On Wed, Apr 09, 2025 at 09:58:13AM +0200, Peter Krempa via Devel wrote: > >> On Wed, Apr 09, 2025 at 09:39:02 +0200, Markus Armbruster via Devel wrote: > >> > Hi Steve, I apologize for the slow r

Re: [PATCH v1 01/24] Add -boot-certificates /path/dir:/path/file option in QEMU command line

2025-04-11 Thread Thomas Huth
On 08/04/2025 17.55, Zhuoying Cai wrote: The `-boot-certificates /path/dir:/path/file` option is implemented to provide path to either a directory or a single certificate. Multiple paths can be delineated using a colon. Signed-off-by: Zhuoying Cai --- qemu-options.hx | 11 +++ syste

Re: [PATCH 08/10] hw/9pfs: Allow using hw/9pfs with emscripten

2025-04-11 Thread Kohei Tokunaga
Hi Christian, > > Emscripten's fiber does not support submitting coroutines to other > > threads. So this commit modifies hw/9pfs/coth.h to disable this behavior > > when compiled with Emscripten. > > The lack of being able to dispatch a coroutine to a worker thread is one > thing, however it woul

Re: [PATCH 1/5] vfio/iommufd: Save host iommu capabilities in VFIODevice.caps

2025-04-11 Thread Joao Martins
On 11/04/2025 11:17, Zhenzhong Duan wrote: > The saved caps copy can be used to check dirty tracking capability. > > The capabilities is gotten through IOMMUFD interface, so define a > new structure HostIOMMUDeviceIOMMUFDCaps which contains vendor > caps raw data in "include/system/iommufd.h". >

Re: [PATCH 07/10] tcg: Add a TCG backend for WebAssembly

2025-04-11 Thread Philippe Mathieu-Daudé
Hi Kohei, On 7/4/25 16:45, Kohei Tokunaga wrote: A TB consists of a wasmTBHeader followed by the data listed below. The wasmTBHeader contains pointers for each element: - TCI code - Wasm code - Array of function indices imported into the Wasm instance - Counter tracking the number of TB executi

Re: [PATCH 2/5] vfio: Move realize() after attach_device()

2025-04-11 Thread Philippe Mathieu-Daudé
Hi, On 11/4/25 12:17, Zhenzhong Duan wrote: Previously device attaching depends on realize() getting host iommu capabilities to check dirty tracking support. Now we save a caps copy in VFIODevice and check that copy for dirty tracking support, there is no dependency any more, move realize() cal

Re: [PATCH 01/10] various: Fix type conflict of GLib function pointers

2025-04-11 Thread Kohei Tokunaga
Hi Paolo, > > 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. > > > > - qtest_set_command_cb passed to g_once should match to GThreadFunc > > Sending an alternative patch that doesn'

Re: [PATCH 02/10] various: Define macros for dependencies on emscripten

2025-04-11 Thread Kohei Tokunaga
Hi Paolo, > > +#ifdef EMSCRIPTEN > > +/* > > + * emscripten exposes copy_file_range declaration but doesn't provide the > > + * implementation in the final link. Define the stub here but avoid type > > + * conflict with the emscripten's header. > > + */ > > +ssize_t copy_file_range(int in_fd, off_

Re: [PATCH 05/10] meson: Add wasm build in build scripts

2025-04-11 Thread Kohei Tokunaga
Hi Paolo, > > > >> has_int128_type is set to false on emscripten as of now to avoid errors by > > > >> libffi. > > > > > > What is the error here? How hard would it be to test for it? > > > > When has_int128_type=true, I encountered a runtime error from libffi. To > > reproduce this, we need to a

Re: [PATCH 1/5] vfio/iommufd: Save host iommu capabilities in VFIODevice.caps

2025-04-11 Thread Cédric Le Goater
On 4/11/25 12:17, Zhenzhong Duan wrote: The saved caps copy can be used to check dirty tracking capability. The capabilities is gotten through IOMMUFD interface, so define a new structure HostIOMMUDeviceIOMMUFDCaps which contains vendor caps raw data in "include/system/iommufd.h". This is a pre

[PATCH v2 0/2] scsi-disk: Add FUA write support

2025-04-11 Thread Alberto Faria
Add scsi-disk support for Force Unit Access (FUA) writes. The first patch lets us avoid FUA emulation when the underlying driver supports it natively. The second patch makes scsi-disk devices advertise FUA support by default. v2: - Drop FUA write emulation logic since the block layer already does

[PATCH v2 1/2] scsi-disk: Add native FUA write support

2025-04-11 Thread Alberto Faria
Simply propagate the FUA flag on write requests to the driver. The block layer will emulate it if necessary. Signed-off-by: Alberto Faria --- hw/scsi/scsi-disk.c | 43 ++- 1 file changed, 10 insertions(+), 33 deletions(-) diff --git a/hw/scsi/scsi-disk.c

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

2025-04-11 Thread Alberto Faria
Allow the guest to submit FUA requests directly, instead of forcing it to emulate them using a regular flush. Signed-off-by: Alberto Faria --- hw/core/machine.c | 1 + hw/scsi/scsi-disk.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/core/machine.c b/hw/core/machine.

Re: [PATCH 2/5] vfio: Move realize() after attach_device()

2025-04-11 Thread Cédric Le Goater
On 4/11/25 12:17, Zhenzhong Duan wrote: Previously device attaching depends on realize() getting host iommu capabilities to check dirty tracking support. Now we save a caps copy in VFIODevice and check that copy for dirty tracking support, there is no dependency any more, move realize() call aft

Re: Management applications and CPU feature flags

2025-04-11 Thread Markus Armbruster
Daniel P. Berrangé writes: > On Fri, Apr 11, 2025 at 12:40:46PM +0200, Markus Armbruster wrote: >> Daniel P. Berrangé writes: >> >> > On Wed, Apr 09, 2025 at 09:58:13AM +0200, Peter Krempa via Devel wrote: >> >> On Wed, Apr 09, 2025 at 09:39:02 +0200, Markus Armbruster via Devel wrote: >> >> >

[PATCH v9 1/7] migration/multifd: move macros to multifd header

2025-04-11 Thread Prasad Pandit
From: Prasad Pandit Move MULTIFD_ macros to the header file so that they are accessible from other source files. Reviewed-by: Fabiano Rosas Signed-off-by: Prasad Pandit --- migration/multifd.c | 5 - migration/multifd.h | 5 + 2 files changed, 5 insertions(+), 5 deletions(-) v8: no c

[PATCH v9 0/7] Allow to enable multifd and postcopy migration together

2025-04-11 Thread Prasad Pandit
From: Prasad Pandit Hello, * This series (v9) does minor refactoring and reordering changes as suggested in the review of earlier series (v8). Also tried to reproduce/debug a qtest hang issue, but it could not be reproduced. From the shared stack traces it looked like Postcopy thread was

[PATCH v9 6/7] tests/qtest/migration: consolidate set capabilities

2025-04-11 Thread Prasad Pandit
From: Prasad Pandit Migration capabilities are set in multiple '.start_hook' functions for various tests. Instead, consolidate setting capabilities in 'migrate_start_set_capabilities()' function which is called from the 'migrate_start()' function. While simplifying the capabilities setting, it he

[PATCH v9 2/7] migration: refactor channel discovery mechanism

2025-04-11 Thread Prasad Pandit
From: Prasad Pandit The various logical migration channels don't have a standardized way of advertising themselves and their connections may be seen out of order by the migration destination. When a new connection arrives, the incoming migration currently make use of heuristics to determine which

[PATCH v9 5/7] migration: enable multifd and postcopy together

2025-04-11 Thread Prasad Pandit
From: Prasad Pandit Enable Multifd and Postcopy migration together. The migration_ioc_process_incoming() routine checks magic value sent on each channel and helps to properly setup multifd and postcopy channels. The Precopy and Multifd threads work during the initial guest RAM transfer. When mig

[PATCH v9 7/7] tests/qtest/migration: add postcopy tests with multifd

2025-04-11 Thread Prasad Pandit
From: Prasad Pandit Add new qtests to run postcopy migration with multifd channels enabled. Signed-off-by: Prasad Pandit --- tests/qtest/migration/compression-tests.c | 16 tests/qtest/migration/postcopy-tests.c| 27 + tests/qtest/migration/precopy-tests.c | 19 +++

[PATCH v9 3/7] migration: Add save_postcopy_prepare() savevm handler

2025-04-11 Thread Prasad Pandit
From: Peter Xu Add a savevm handler for a module to opt-in sending extra sections right before postcopy starts, and before VM is stopped. RAM will start to use this new savevm handler in the next patch to do flush and sync for multifd pages. Note that we choose to do it before VM stopped becaus

[PATCH v9 4/7] migration/ram: Implement save_postcopy_prepare()

2025-04-11 Thread Prasad Pandit
From: Peter Xu Implement save_postcopy_prepare(), preparing for the enablement of both multifd and postcopy. Signed-off-by: Peter Xu Signed-off-by: Prasad Pandit --- migration/ram.c | 37 + 1 file changed, 37 insertions(+) v8: reorder patch and some typogr

Re: Management applications and CPU feature flags

2025-04-11 Thread David Hildenbrand
On 11.04.25 13:43, Markus Armbruster wrote: Daniel P. Berrangé writes: On Fri, Apr 11, 2025 at 12:40:46PM +0200, Markus Armbruster wrote: Daniel P. Berrangé writes: On Wed, Apr 09, 2025 at 09:58:13AM +0200, Peter Krempa via Devel wrote: On Wed, Apr 09, 2025 at 09:39:02 +0200, Markus Armbr

Re: Issue with stoptrigger.c Plugin in QEMU Emulation

2025-04-11 Thread Alex Bennée
Saanjh Sengupta writes: > Hi, > > I am writing to seek assistance with an issue I am experiencing while using > the stoptrigger.c plugin in QEMU emulation. I am > currently utilising the latest QEMU version, 9.2.92, and attempting to > emulate the Debian 11 as the operating system. > > The com

Re: [PATCH] migration: add FEATURE_SEEKABLE to QIOChannelBlock

2025-04-11 Thread Fabiano Rosas
"Marco Cavenati" writes: > On Thursday, April 10, 2025 21:52 CEST, Fabiano Rosas wrote: > >> We'll need to add the infrastructure to reject multifd and direct-io >> before this. The rest of the capabilities should not affect mapped-ram, >> so it's fine (for now) if we don't honor them. > > Ok, t

Re: [PATCH v1 01/24] Add -boot-certificates /path/dir:/path/file option in QEMU command line

2025-04-11 Thread Daniel P . Berrangé
On Fri, Apr 11, 2025 at 12:44:17PM +0200, Thomas Huth wrote: > On 08/04/2025 17.55, Zhuoying Cai wrote: > > The `-boot-certificates /path/dir:/path/file` option is implemented > > to provide path to either a directory or a single certificate. > > > > Multiple paths can be delineated using a colon.

Re: [PATCH v1 02/24] hw/s390x/ipl: Create certificate store

2025-04-11 Thread Thomas Huth
On 08/04/2025 17.55, Zhuoying Cai wrote: Create a certificate store for boot certificates used for secure IPL. Load certificates from the -boot-certificate option into the cert store. Currently, only x509 certificates in DER format and uses SHA-256 hashing algorithm are supported, as these are

Re: [PATCH v1 02/24] hw/s390x/ipl: Create certificate store

2025-04-11 Thread Daniel P . Berrangé
On Tue, Apr 08, 2025 at 11:55:04AM -0400, Zhuoying Cai wrote: > Create a certificate store for boot certificates used for secure IPL. > > Load certificates from the -boot-certificate option into the cert store. > > Currently, only x509 certificates in DER format and uses SHA-256 hashing > algorit

Re: [PATCH] virtio-net: Copy all for dhclient workaround

2025-04-11 Thread Antoine Damhet
On Fri, Apr 11, 2025 at 05:01:01PM +0900, Akihiko Odaki wrote: > On 2025/04/07 17:29, Antoine Damhet wrote: > > On Sat, Apr 05, 2025 at 05:04:28PM +0900, Akihiko Odaki wrote: > > > The goal of commit 7987d2be5a8b ("virtio-net: Copy received header to > > > buffer") was to remove the need to patch t

Re: [PATCH v1 03/24] s390x: Guest support for Certificate Store Facility (CS)

2025-04-11 Thread Thomas Huth
On 08/04/2025 17.55, Zhuoying Cai wrote: DIAG 320 is supported when the certificate-store (CS) facility is installed. Availability of CS facility is determined by byte 134 bit 5 of the SCLP Read Info block. Signed-off-by: Zhuoying Cai --- ... diff --git a/target/s390x/cpu_features.c b/target

Re: [PATCH v1 01/24] Add -boot-certificates /path/dir:/path/file option in QEMU command line

2025-04-11 Thread Daniel P . Berrangé
On Fri, Apr 11, 2025 at 01:57:26PM +0100, Daniel P. Berrangé wrote: > On Fri, Apr 11, 2025 at 12:44:17PM +0200, Thomas Huth wrote: > > On 08/04/2025 17.55, Zhuoying Cai wrote: > > > The `-boot-certificates /path/dir:/path/file` option is implemented > > > to provide path to either a directory or a

Re: [PULL 8/9] meson: Disallow 64-bit on 32-bit emulation

2025-04-11 Thread Daniel P . Berrangé
On Sat, Feb 08, 2025 at 12:57:23PM -0800, Richard Henderson wrote: > For system mode, we can rarely support the amount of RAM that > the guest requires. TCG emulation is restricted to round-robin > mode, which solves many of the atomicity issues, but not those > associated with virtio. In any case

Re: [PATCH v1 04/24] s390x/diag: Introduce DIAG 320 for certificate store facility

2025-04-11 Thread Thomas Huth
On 08/04/2025 17.55, Zhuoying Cai wrote: From: Collin Walling ... Signed-off-by: Zhuoying Cai So the patch is from Collin, but S-o-b only by you? Looks weird, this should either have an additional S-o-b by Collin, too, or not have that "From:" line at all? ... diff --git a/include/hw/s

Re: [PATCH 1/4] target/arm/ptw: extract arm_mmu_idx_to_security_space

2025-04-11 Thread Philippe Mathieu-Daudé
On 10/4/25 23:00, Pierrick Bouvier wrote: We'll reuse this function later. Signed-off-by: Pierrick Bouvier --- target/arm/ptw.c | 21 ++--- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/target/arm/ptw.c b/target/arm/ptw.c index 8d4e9e07a94..5e196cfa955 100644

Re: [PATCH v3 3/5] util/qemu-sockets: Refactor success and failure paths in inet_listen_saddr()

2025-04-11 Thread Daniel P . Berrangé
On Tue, Apr 08, 2025 at 01:25:02PM +0200, Juraj Marcin wrote: > From: Juraj Marcin > > To get a listening socket, we need to first create a socket, try binding > it to a certain port, and lastly starting listening to it. Each of these > operations can fail due to various reasons, one of them bein

Re: [PATCH v3 5/5] utils/qemu-sockets: Introduce inet socket options controlling TCP keep-alive

2025-04-11 Thread Daniel P . Berrangé
On Tue, Apr 08, 2025 at 01:25:04PM +0200, Juraj Marcin wrote: > From: Juraj Marcin > > With the default TCP stack configuration, it could be even 2 hours > before the connection times out due to the other side not being > reachable. However, in some cases, the application needs to be aware of > a

Re: [PATCH v1 06/24] s390x/diag: Implement DIAG 320 subcode 1

2025-04-11 Thread Thomas Huth
On 08/04/2025 17.55, Zhuoying Cai wrote: DIAG 320 subcode 1 provides information needed to determine the amount of storage to store one or more certificates. The subcode value is denoted by setting the left-most bit of an 8-byte field. The verification-certificate-storage-size block (VCSSB) con

Re: Management applications and CPU feature flags

2025-04-11 Thread Cornelia Huck
On Fri, Apr 11 2025, Jiri Denemark wrote: > On Fri, Apr 11, 2025 at 13:43:39 +0200, Markus Armbruster wrote: >> Daniel P. Berrangé writes: >> > On Fri, Apr 11, 2025 at 12:40:46PM +0200, Markus Armbruster wrote: >> >> Daniel P. Berrangé writes: >> >> > Considering the bigger picture QMP design,

Re: [PATCH 08/10] hw/9pfs: Allow using hw/9pfs with emscripten

2025-04-11 Thread Kohei Tokunaga
Hi Paolo, > > Emscripten's fiber does not support submitting coroutines to other > > threads. > > Does it work as long as the thread does not rewind? The structure used by Fiber includes a thread-specific field related to rewind [1], which prevents it from being shared across threads. The behavio

Re: [PATCH v1 08/24] s390x/diag: Introduce DIAG 508 for secure IPL operations

2025-04-11 Thread Thomas Huth
On 08/04/2025 17.55, Zhuoying Cai wrote: From: Collin Walling In order to support secure IPL (aka secure boot) for the s390-ccw BIOS, a new s390 DIAGNOSE instruction is introduced to leverage QEMU for handling operations such as signature verification and certificate retrieval. Currently, only

Re: [PATCH v1 09/24] s390x/diag: Implement DIAG 508 subcode 2 for signature verification

2025-04-11 Thread Thomas Huth
On 08/04/2025 17.55, Zhuoying Cai wrote: From: Collin Walling DIAG 508 subcode 2 performs signature-verfication on signed components. A signed component may be a Linux kernel image, or any other signed binary. **Verification of initrd is not supported.** The instruction call expects two item-p

  1   2   >