Re: [PATCH v5 00/13] Improve futex usage

2025-06-06 Thread Akihiko Odaki
On 2025/06/07 5:38, Paolo Bonzini wrote: On Fri, Jun 6, 2025 at 11:46 AM Akihiko Odaki wrote: This conditional is unnecessary; docs/about/build-platforms.rst says we only supports MinGW. I failed to catch this problem because I ran MinGW on Windows, which is case-insensitive. Since it is case-

[PATCH v5 1/1] hw/riscv: fix PLIC hart topology configuration string when not getting CPUState correctly

2025-06-06 Thread Chao Liu
riscv_plic_hart_config_string() when getting CPUState via qemu_get_cpu() should be consistent with keeping sifive_plic_realize() by hartid_base + cpu_index. A better approach is to use cpu_by_arch_id() instead of qemu_get_cpu(), in riscv cpu_by_arch_id() uses the mhartid. For non-numa or single-c

[PATCH v5 0/1] fix the way riscv_plic_hart_config_string() gets the CPUState

2025-06-06 Thread Chao Liu
Hi, Thanks to Daniel's testing, I have fixed this bug. PATCHv5: The differences are as follows: ``` @@ -790,10 +790,11 @@ static void sifive_u_soc_realize(DeviceState *dev, Error **errp) MemoryRegion *mask_rom = g_new(MemoryRegion, 1); MemoryRegion *l2lim_mem = g_new(MemoryRegion, 1

Re: [PATCH v1] migration: Wait for cpr.sock file to appear before connecting

2025-06-06 Thread Steven Sistare
On 6/6/2025 2:06 PM, JAEHOON KIM wrote: On 6/6/2025 12:04 PM, Steven Sistare wrote: On 6/6/2025 12:06 PM, Daniel P. Berrangé wrote: On Fri, Jun 06, 2025 at 11:50:10AM -0400, Steven Sistare wrote: On 6/6/2025 11:43 AM, Daniel P. Berrangé wrote: On Fri, Jun 06, 2025 at 10:37:28AM -0500, JAEHOON

[PATCH v3 09/23] vfio-user: implement message send infrastructure

2025-06-06 Thread John Levon
Add plumbing for sending vfio-user messages on the control socket. Add initial version negotation on connection. Originally-by: John Johnson Signed-off-by: Jagannathan Raman Signed-off-by: Elena Ufimtseva Signed-off-by: John Levon --- hw/vfio-user/protocol.h | 62 + hw/vfio-user/proxy.

[PATCH v3 13/23] vfio-user: set up PCI in vfio_user_pci_realize()

2025-06-06 Thread John Levon
Re-use PCI setup functions from hw/vfio/pci.c to realize the vfio-user PCI device. Originally-by: John Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John Levon --- hw/vfio-user/pci.c | 29 + 1 file changed, 29 insertions(+)

[PATCH v3 04/23] vfio: mark posted writes in region write callbacks

2025-06-06 Thread John Levon
For vfio-user, the region write implementation needs to know if the write is posted; add the necessary plumbing to support this. Signed-off-by: John Levon Reviewed-by: Cédric Le Goater --- include/hw/vfio/vfio-device.h | 4 ++-- include/hw/vfio/vfio-region.h | 1 + hw/vfio/device.c

[PATCH v3 07/23] vfio-user: connect vfio proxy to remote server

2025-06-06 Thread John Levon
Introduce the vfio-user "proxy": this is the client code responsible for sending and receiving vfio-user messages across the control socket. The new files hw/vfio-user/proxy.[ch] contain some basic plumbing for managing the proxy; initialize the proxy during realization of the VFIOUserPCIDevice in

[PATCH v3 18/23] vfio-user: implement VFIO_USER_DMA_MAP/UNMAP

2025-06-06 Thread John Levon
From: John Levon When the vfio-user container gets mapping updates, share them with the vfio-user by sending a message; this can include the region fd, allowing the server to directly mmap() the region as needed. For performance, we only wait for the message responses when we're doing with a ser

[PATCH v3 22/23] vfio-user: add coalesced posted writes

2025-06-06 Thread John Levon
Add new message to send multiple writes to server in a single message. Prevents the outgoing queue from overflowing when a long latency operation is followed by a series of posted writes. Originally-by: John Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by:

[PATCH v3 08/23] vfio-user: implement message receive infrastructure

2025-06-06 Thread John Levon
Add the basic implementation for receiving vfio-user messages from the control socket. Originally-by: John Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John Levon --- meson.build | 1 + hw/vfio-user/protocol.h | 56 ++ hw/vfio-u

[PATCH v3 19/23] vfio-user: implement VFIO_USER_DMA_READ/WRITE

2025-06-06 Thread John Levon
Unlike most other messages, this is a server->client message, for when a server wants to do "DMA"; this is slow, so normally the server has memory directly mapped instead. Originally-by: John Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John Levon ---

[PATCH v3 03/23] vfio: add per-region fd support

2025-06-06 Thread John Levon
For vfio-user, each region has its own fd rather than sharing vbasedev's. Add the necessary plumbing to support this, and use the correct fd in vfio_region_mmap(). Signed-off-by: John Levon --- include/hw/vfio/vfio-device.h | 7 +-- hw/vfio/device.c | 29 +++

[PATCH v3 06/23] vfio-user: add vfio-user class and container

2025-06-06 Thread John Levon
Introduce basic plumbing for vfio-user behind a new --enable-vfio-user-client option. We introduce VFIOUserContainer in hw/vfio-user/container.c, which is a container type for the "IOMMU" type "vfio-iommu-user", and share some common container code from hw/vfio/container.c. Add hw/vfio-user/pci.c

[PATCH v3 15/23] vfio-user: forward MSI-X PBA BAR accesses to server

2025-06-06 Thread John Levon
For vfio-user, the server holds the pending IRQ state; set up an I/O region for the MSI-X PBA so we can ask the server for this state on a PBA read. Originally-by: John Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John Levon --- hw/vfio/pci.h |

[PATCH v3 20/23] vfio-user: add 'x-msg-timeout' option

2025-06-06 Thread John Levon
By default, the vfio-user subsystem will wait 5 seconds for a message reply from the server. Add an option to allow this to be configurable. Originally-by: John Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John Levon --- hw/vfio-user/proxy.h | 1 + hw

[PATCH v3 16/23] vfio-user: set up container access to the proxy

2025-06-06 Thread John Levon
The user container will shortly need access to the underlying vfio-user proxy; set this up. Originally-by: John Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John Levon --- hw/vfio-user/container.h | 2 ++ hw/vfio-user/container.c | 43 +++

[PATCH v3 05/23] vfio-user: introduce vfio-user protocol specification

2025-06-06 Thread John Levon
From: Thanos Makatos This patch introduces the vfio-user protocol specification (formerly known as VFIO-over-socket), which is designed to allow devices to be emulated outside QEMU, in a separate process. vfio-user reuses the existing VFIO defines, structs and concepts. It has been earlier discu

[PATCH v3 23/23] docs: add vfio-user documentation

2025-06-06 Thread John Levon
Add some basic documentation on vfio-user usage. Signed-off-by: John Levon --- docs/system/device-emulation.rst | 1 + docs/system/devices/vfio-user.rst | 24 2 files changed, 25 insertions(+) create mode 100644 docs/system/devices/vfio-user.rst diff --git a/docs/sys

[PATCH v3 02/23] vfio: enable per-IRQ MSI-X masking

2025-06-06 Thread John Levon
If VFIO_IRQ_INFO_MASKABLE is set for VFIO_PCI_MSIX_IRQ_INDEX, record this in ->can_mask_msix, and use it to individually mask MSI-X interrupts as needed. Originally-by: John Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John Levon --- hw/vfio/pci.h

[PATCH v3 01/23] vfio: export PCI helpers needed for vfio-user

2025-06-06 Thread John Levon
The vfio-user code will need to re-use various parts of the vfio PCI code. Export them in hw/vfio/pci.h, and rename them to the vfio_pci_* namespace. Signed-off-by: John Levon --- hw/vfio/pci.h| 11 ++ hw/vfio/pci.c| 48 ++-- hw/vfi

[PATCH v3 11/23] vfio-user: implement VFIO_USER_DEVICE_GET_REGION_INFO

2025-06-06 Thread John Levon
Add support for getting region info for vfio-user. As vfio-user has one fd per region, enable ->use_region_fds. Originally-by: John Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John Levon --- hw/vfio-user/device.h | 2 ++ hw/vfio-user/protocol.h

[PATCH v3 21/23] vfio-user: support posted writes

2025-06-06 Thread John Levon
Support an asynchronous send of a vfio-user socket message (no wait for a reply) when the write is posted. This is only safe when no regions are mappable by the VM. Add an option to explicitly disable this as well. Signed-off-by: John Levon --- hw/vfio-user/proxy.h | 5 + hw/vfio-user/devi

[PATCH v3 12/23] vfio-user: implement VFIO_USER_REGION_READ/WRITE

2025-06-06 Thread John Levon
Originally-by: John Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John Levon --- hw/vfio-user/protocol.h | 12 +++ hw/vfio-user/device.c | 67 +++ hw/vfio-user/trace-events | 1 + 3 files changed, 80 insert

[PATCH v3 17/23] vfio-user: implement VFIO_USER_DEVICE_RESET

2025-06-06 Thread John Levon
Hook this call up to the legacy reset handler for vfio-user-pci. Originally-by: John Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John Levon --- hw/vfio-user/device.h | 2 ++ hw/vfio-user/device.c | 12 hw/vfio-user/pci.c| 15 +++

[PATCH v3 14/23] vfio-user: implement VFIO_USER_DEVICE_GET/SET_IRQ*

2025-06-06 Thread John Levon
IRQ setup uses the same semantics as the traditional vfio path, but we need to share the corresponding file descriptors with the server as necessary. Originally-by: John Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John Levon --- hw/vfio-user/protocol

[PATCH v3 00/23] vfio-user client

2025-06-06 Thread John Levon
The series contains an implement of a vfio-user client in QEMU, along with a few more preparatory patches. The vfio-user protocol allows for implementing (PCI) devices in another userspace process; SPDK is one example, which includes a virtual NVMe implementation. The vfio-user framework consists

[PATCH v3 10/23] vfio-user: implement VFIO_USER_DEVICE_GET_INFO

2025-06-06 Thread John Levon
Add support for getting basic device information. Originally-by: John Johnson Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John Levon --- hw/vfio-user/device.h | 23 ++ hw/vfio-user/protocol.h | 12 ++ hw/vfio-user/proxy.h |

Re: [RFC PATCH 12/25] accel/mshv: Add vCPU creation and execution loop

2025-06-06 Thread Nuno Das Neves
On 5/20/2025 6:50 AM, Paolo Bonzini wrote: > On 5/20/25 13:30, Magnus Kulke wrote: >> +    int ret; >> +    hv_message exit_msg = { 0 }; > > You probably don't want to fill 512 bytes on every vmentry.  Maybe pass > &exit_msg up from mshv_cpu_exec()? > >> +    /* >> + * Read cpu->exit

[PATCH 4/4] MAINTAINERS: Add docs/requirements.txt

2025-06-06 Thread John Snow
From: Akihiko Odaki Add docs/requirements.txt to "Sphinx documentation configuration and build machinery". Signed-off-by: Akihiko Odaki Signed-off-by: John Snow --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index aa6763077ea..76674c88b0e 100644

[PATCH 1/4] python: update requirements for Sphinx

2025-06-06 Thread John Snow
In advance of actually bumping the build system requirements for Sphinx, bump the version used for the static analysis tests. Update the minimum requirements accordingly. This changes the test environment without actually changing the build requirements, and no extra changes are needed for the tes

Re: [PATCH 19/21] migration: Allow migrate commands to provide the migration config

2025-06-06 Thread Peter Xu
On Fri, Jun 06, 2025 at 05:23:18PM -0300, Fabiano Rosas wrote: > Peter Xu writes: > > > On Mon, Jun 02, 2025 at 10:38:08PM -0300, Fabiano Rosas wrote: > >> Allow the migrate and migrate_incoming commands to pass the migration > >> configuration options all at once, dispensing the use of > >> migr

[PATCH 3/4] docs: Require sphinx>=6.2

2025-06-06 Thread John Snow
From: Akihiko Odaki This makes docs/sphinx/compat.py unnecessary. The accepted range of the sphinx_rtd_theme version was also changed to >=1.2.1 for compatibility with sphinx>=6.2. Signed-off-by: Akihiko Odaki [Minor edits for rebase and CI verdancy. --js] Signed-off-by: John Snow --- docs/sp

[PATCH 0/4] Docs: bump sphinx version to 6.2.1

2025-06-06 Thread John Snow
This is a re-send of Akihiko Odaki's series, rebased and altered to cope with the new QAPI static analysis tests now running on GitLab CI. Changes in this "v1": - Update python static analysis testing configuration to work with the new Sphinx minimum version - Small adjustments to qapi_domai

[PATCH 2/4] docs: Bump sphinx to 6.2.1

2025-06-06 Thread John Snow
From: Akihiko Odaki sphinx 5.3.0 fails with Python 3.13.1: ../docs/meson.build:37: WARNING: /home/me/qemu/build/pyvenv/bin/sphinx-build: Extension error: Could not import extension sphinx.builders.epub3 (exception: No module named 'imghdr') ../docs/meson.build:39:6: ERROR: Problem encountered:

Re: [PATCH v5 00/13] Improve futex usage

2025-06-06 Thread Paolo Bonzini
On Fri, Jun 6, 2025 at 11:46 AM Akihiko Odaki wrote: > This conditional is unnecessary; docs/about/build-platforms.rst says we > only supports MinGW. > > I failed to catch this problem because I ran MinGW on Windows, which is > case-insensitive. Since it is case-insensitive, the lowercase name wil

Re: [PATCH 19/21] migration: Allow migrate commands to provide the migration config

2025-06-06 Thread Fabiano Rosas
Peter Xu writes: > On Mon, Jun 02, 2025 at 10:38:08PM -0300, Fabiano Rosas wrote: >> Allow the migrate and migrate_incoming commands to pass the migration >> configuration options all at once, dispensing the use of >> migrate-set-parameters and migrate-set-capabilities. >> >> The motivation of t

Re: [QEMU PATCH v3 9/9] cxl-mailbox-utils: 0x5605 - FMAPI Initiate DC Release

2025-06-06 Thread Anisa Su
On Fri, Jun 06, 2025 at 11:48:33AM -0700, Fan Ni wrote: > On Fri, Jun 06, 2025 at 11:43:51AM -0700, Fan Ni wrote: > > On Thu, Jun 05, 2025 at 11:42:23PM +, anisa.su...@gmail.com wrote: > > > From: Anisa Su > > > > > > FM DCD Managment command 0x5605 implemented per CXL r3.2 Spec Section > >

Re: [PULL 00/31] Threading, Rust, i386 changes for 2025-06-06

2025-06-06 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/10.1 for any user-visible changes. signature.asc Description: PGP signature

Re: [PATCH 19/21] migration: Allow migrate commands to provide the migration config

2025-06-06 Thread Peter Xu
On Mon, Jun 02, 2025 at 10:38:08PM -0300, Fabiano Rosas wrote: > Allow the migrate and migrate_incoming commands to pass the migration > configuration options all at once, dispensing the use of > migrate-set-parameters and migrate-set-capabilities. > > The motivation of this is to simplify the int

Re: [PULL v2 0/6] Python patches

2025-06-06 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/10.1 for any user-visible changes. signature.asc Description: PGP signature

Re: [RFC PATCH 18/25] target/i386/mshv: Implement mshv_arch_put_registers()

2025-06-06 Thread Wei Liu
On Wed, May 28, 2025 at 04:30:55PM +0200, Magnus Kulke wrote: > On Tue, May 20, 2025 at 10:22:27PM +, Wei Liu wrote: > > On Tue, May 20, 2025 at 01:30:11PM +0200, Magnus Kulke wrote: > > > +/* > > > + * TODO: support asserting an interrupt using interrup_bitmap > > > + * it should b

Re: [PATCH 18/21] qapi/migration: Deprecate capabilities commands

2025-06-06 Thread Peter Xu
On Mon, Jun 02, 2025 at 10:38:07PM -0300, Fabiano Rosas wrote: > The concept of capabilities is being merged into the concept of > parameters. From now on, the commands that handle capabilities are > deprecated in favor of the commands that handle parameters. > > Affected commands: > > - migrate-

Re: [PATCH 17/21] migration: Remove s->capabilities

2025-06-06 Thread Peter Xu
On Mon, Jun 02, 2025 at 10:38:06PM -0300, Fabiano Rosas wrote: > Last patch added capabilities to s->parameters. Now we can replace all > instances of s->capabilities with s->parameters: > > - The -global properties now get set directly in s->parameters. > > - Accessors from options.c now read fr

Re: [RFC PATCH 18/25] target/i386/mshv: Implement mshv_arch_put_registers()

2025-06-06 Thread Wei Liu
On Tue, May 20, 2025 at 01:30:11PM +0200, Magnus Kulke wrote: > Write CPU register state to MSHV vCPUs. Various mapping functions to > prepare the payload for the HV call have been implemented. > > Signed-off-by: Magnus Kulke > --- [...] > + > +static void populate_hv_table_reg(const struct Segme

Controlling time in QEMU

2025-06-06 Thread Pierrick Bouvier
Hi, I recently needed to slow down time within a virtual machine, due to a timeout being hit because my QEMU binary which was not fast enough (gcov debug build if you're curious about the use case). Currently, people tend to use -icount shift=X with low values for that, as it roughly maps ti

Re: [PATCH 15/21] migration: Add capabilities into MigrationParameters

2025-06-06 Thread Peter Xu
On Mon, Jun 02, 2025 at 10:38:04PM -0300, Fabiano Rosas wrote: > Add capabilities to MigrationParameters. This structure will hold all > migration options. Capabilities will go away in the next patch. > > Also add capabilities to MigrationParameter as the enum needs to be > kept in sync with Migra

Re: [PATCH 14/21] migration: Cleanup hmp_info_migrate_parameters

2025-06-06 Thread Peter Xu
On Mon, Jun 02, 2025 at 10:38:03PM -0300, Fabiano Rosas wrote: > Do a cleanup of hmp_info_migrate_parameters() before adding more lines > into it: > > - Make sure every parameter asserts that the has_* field is > set. qmp_query_migrate_parameters should have set them all. > > - Remove the if (p

Re: [QEMU PATCH v3 9/9] cxl-mailbox-utils: 0x5605 - FMAPI Initiate DC Release

2025-06-06 Thread Fan Ni
On Fri, Jun 06, 2025 at 11:43:51AM -0700, Fan Ni wrote: > On Thu, Jun 05, 2025 at 11:42:23PM +, anisa.su...@gmail.com wrote: > > From: Anisa Su > > > > FM DCD Managment command 0x5605 implemented per CXL r3.2 Spec Section > > 7.6.7.6.6 > > > > Signed-off-by: Anisa Su > > See below .. > >

Re: [QEMU PATCH v3 9/9] cxl-mailbox-utils: 0x5605 - FMAPI Initiate DC Release

2025-06-06 Thread Fan Ni
On Thu, Jun 05, 2025 at 11:42:23PM +, anisa.su...@gmail.com wrote: > From: Anisa Su > > FM DCD Managment command 0x5605 implemented per CXL r3.2 Spec Section > 7.6.7.6.6 > > Signed-off-by: Anisa Su See below .. > --- > hw/cxl/cxl-mailbox-utils.c | 62

[RFC PATCH v12 4/4] s390: implementing CHSC SEI for AP config change

2025-06-06 Thread Rorie Reyes
Handle interception of the CHSC SEI instruction for requests indicating the guest's AP configuration has changed. If configuring --without-default-devices, hw/s390x/ap-stub.c was created to handle such circumstance. Also added the following to hw/s390x/meson.build if CONFIG_VFIO_AP is false, it wi

[RFC PATCH v12 2/4] hw/vfio/ap: store object indicating AP config changed in a queue

2025-06-06 Thread Rorie Reyes
Creates an object indicating that an AP configuration change event has been received and stores it in a queue. These objects will later be used to store event information for an AP configuration change when the CHSC instruction is intercepted. Signed-off-by: Rorie Reyes --- hw/vfio/ap.c | 12 +++

Re: [PATCH 05/21] migration: Add a flag to track block-bitmap-mapping input

2025-06-06 Thread Fabiano Rosas
Peter Xu writes: > On Fri, Jun 06, 2025 at 12:43:04PM -0300, Fabiano Rosas wrote: >> Peter Xu writes: >> >> > On Mon, Jun 02, 2025 at 10:37:54PM -0300, Fabiano Rosas wrote: >> >> The QAPI converts an empty list on the block-bitmap-mapping input into >> >> a NULL BitmapMigrationNodeAliasList. Th

[RFC PATCH v12 3/4] hw/vfio/ap: Storing event information for an AP configuration change event

2025-06-06 Thread Rorie Reyes
These functions can be invoked by the function that handles interception of the CHSC SEI instruction for requests indicating the accessibility of one or more adjunct processors has changed. Signed-off-by: Rorie Reyes --- hw/vfio/ap.c | 43 inc

[RFC PATCH v12 1/4] hw/vfio/ap: notification handler for AP config changed event

2025-06-06 Thread Rorie Reyes
Register an event notifier handler to process AP configuration change events by queuing the event and generating a CRW to let the guest know its AP configuration has changed Signed-off-by: Rorie Reyes Reviewed-by: Anthony Krowiak --- hw/vfio/ap.c | 31 +++ 1 file cha

[RFC PATCH v12 0/4] Report vfio-ap configuration changes

2025-06-06 Thread Rorie Reyes
Changelog: v12: - adding locks to 'ap_chsc_sei_nt0_have_event' and 'ap_chsc_sei_nt0_get_event' v11: - reverted return type to int for 'ap_chsc_sei_nt0_get_event' - files reflected are 'ap.c', 'ap-bridge'h, and 'ap-stub.c' - using defined variables to represent return 0 and 1 to reflect logical

Re: [QEMU PATCH v3 8/9] cxl-mailbox-utils: 0x5604 - FMAPI Initiate DC Add

2025-06-06 Thread Fan Ni
On Thu, Jun 05, 2025 at 11:42:22PM +, anisa.su...@gmail.com wrote: > From: Anisa Su > > FM DCD Management command 0x5604 implemented per CXL r3.2 Spec Section > 7.6.7.6.5 > > Signed-off-by: Anisa Su See below... > --- > hw/cxl/cxl-mailbox-utils.c | 152 +

Re: [PATCH v1] migration: Wait for cpr.sock file to appear before connecting

2025-06-06 Thread JAEHOON KIM
On 6/6/2025 12:04 PM, Steven Sistare wrote: On 6/6/2025 12:06 PM, Daniel P. Berrangé wrote: On Fri, Jun 06, 2025 at 11:50:10AM -0400, Steven Sistare wrote: On 6/6/2025 11:43 AM, Daniel P. Berrangé wrote: On Fri, Jun 06, 2025 at 10:37:28AM -0500, JAEHOON KIM wrote: On 6/6/2025 10:12 AM, Stev

Re: [PATCH 09/21] migration: Extract code to mark all parameters as present

2025-06-06 Thread Peter Xu
On Fri, Jun 06, 2025 at 12:51:58PM -0300, Fabiano Rosas wrote: > Peter Xu writes: > > > On Mon, Jun 02, 2025 at 10:37:58PM -0300, Fabiano Rosas wrote: > >> MigrationParameters needs to have all of its has_* fields marked as > >> true when used as the return of query_migrate_parameters because the

Re: [PATCH 05/21] migration: Add a flag to track block-bitmap-mapping input

2025-06-06 Thread Peter Xu
On Fri, Jun 06, 2025 at 12:43:04PM -0300, Fabiano Rosas wrote: > Peter Xu writes: > > > On Mon, Jun 02, 2025 at 10:37:54PM -0300, Fabiano Rosas wrote: > >> The QAPI converts an empty list on the block-bitmap-mapping input into > >> a NULL BitmapMigrationNodeAliasList. The empty list is a valid in

Re: [QEMU PATCH v3 8/9] cxl-mailbox-utils: 0x5604 - FMAPI Initiate DC Add

2025-06-06 Thread Anisa Su
On Fri, Jun 06, 2025 at 06:12:19PM +0530, ALOK TIWARI wrote: > > > On 06-06-2025 05:12, anisa.su...@gmail.com wrote: > > From: Anisa Su > > > > FM DCD Management command 0x5604 implemented per CXL r3.2 Spec Section > > 7.6.7.6.5 > > > > Signed-off-by: Anisa Su > > --- > > hw/cxl/cxl-mailbo

Re: [PATCH v1] migration: Wait for cpr.sock file to appear before connecting

2025-06-06 Thread Steven Sistare
On 6/6/2025 12:06 PM, Daniel P. Berrangé wrote: On Fri, Jun 06, 2025 at 11:50:10AM -0400, Steven Sistare wrote: On 6/6/2025 11:43 AM, Daniel P. Berrangé wrote: On Fri, Jun 06, 2025 at 10:37:28AM -0500, JAEHOON KIM wrote: On 6/6/2025 10:12 AM, Steven Sistare wrote: On 6/6/2025 11:06 AM, JAEHOO

[RFC PATCH 06/19] accel/hvf: Fix TYPE_HVF_ACCEL instance size

2025-06-06 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- include/system/hvf_int.h | 1 + accel/hvf/hvf-accel-ops.c | 1 + 2 files changed, 2 insertions(+) diff --git a/include/system/hvf_int.h b/include/system/hvf_int.h index 8c8b84012d9..d774e58df91 100644 --- a/include/system/hvf_int.h +++ b/include/system/

[RFC PATCH 18/19] accel/nvmm: Convert to AccelOpsClass::cpu_thread_routine

2025-06-06 Thread Philippe Mathieu-Daudé
By converting to AccelOpsClass::cpu_thread_routine we can let the common accel_create_vcpu_thread() create the thread. Signed-off-by: Philippe Mathieu-Daudé --- target/i386/nvmm/nvmm-accel-ops.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/target/i386/nvmm/nvm

[RFC PATCH 19/19] accel/whpx: Convert to AccelOpsClass::cpu_thread_routine

2025-06-06 Thread Philippe Mathieu-Daudé
By converting to AccelOpsClass::cpu_thread_routine we can let the common accel_create_vcpu_thread() create the thread. Signed-off-by: Philippe Mathieu-Daudé --- target/i386/whpx/whpx-accel-ops.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/target/i386/whpx/whp

[RFC PATCH 03/19] accel: Keep reference to AccelOpsClass in AccelClass

2025-06-06 Thread Philippe Mathieu-Daudé
Allow dereferencing AccelOpsClass outside of accel/accel-system.c. Signed-off-by: Philippe Mathieu-Daudé --- include/qemu/accel.h | 2 ++ include/system/accel-ops.h | 3 ++- accel/accel-system.c | 3 ++- accel/tcg/tcg-accel-ops.c | 4 +++- 4 files changed, 9 insertions(+), 3 deletio

[RFC PATCH 08/19] accel/tcg: Prefer local AccelState over global current_accel()

2025-06-06 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/tcg-all.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/accel/tcg/tcg-all.c b/accel/tcg/tcg-all.c index 6c5979861cf..4b1238ed345 100644 --- a/accel/tcg/tcg-all.c +++ b/accel/tcg/tcg-all.c @@ -82,7 +82,7 @@ bool one_insn_per

[RFC PATCH 15/19] accel/tcg: Convert to AccelOpsClass::cpu_thread_routine

2025-06-06 Thread Philippe Mathieu-Daudé
By converting to AccelOpsClass::cpu_thread_routine we can let the common accel_create_vcpu_thread() create the thread. Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/tcg-accel-ops-mttcg.h | 3 +-- accel/tcg/tcg-accel-ops-mttcg.c | 16 +--- accel/tcg/tcg-accel-ops.c | 3 +

[RFC PATCH 10/19] accel/dummy: Factor dummy_thread_precreate() out

2025-06-06 Thread Philippe Mathieu-Daudé
Initialize the semaphore before creating the thread, factor out as dummy_thread_precreate(). Signed-off-by: Philippe Mathieu-Daudé --- include/system/cpus.h | 1 + accel/dummy-cpus.c| 12 +--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/include/system/cpus.h b/in

[RFC PATCH 12/19] accel: Factor accel_create_vcpu_thread() out

2025-06-06 Thread Philippe Mathieu-Daudé
Factor accel_create_vcpu_thread() out of system/cpus.c to be able to access accel/ internal definitions. Signed-off-by: Philippe Mathieu-Daudé --- include/qemu/accel.h | 2 ++ accel/accel-common.c | 20 system/cpus.c| 4 +--- 3 files changed, 23 insertions(+), 3 de

[RFC PATCH 17/19] accel/kvm: Convert to AccelOpsClass::cpu_thread_routine

2025-06-06 Thread Philippe Mathieu-Daudé
By converting to AccelOpsClass::cpu_thread_routine we can let the common accel_create_vcpu_thread() create the thread. Signed-off-by: Philippe Mathieu-Daudé --- accel/kvm/kvm-accel-ops.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/accel/kvm/kvm-accel-ops.c b/

[RFC PATCH 11/19] accel/dummy: Factor tcg_vcpu_thread_precreate() out

2025-06-06 Thread Philippe Mathieu-Daudé
Factor tcg_vcpu_thread_precreate() out for re-use. Signed-off-by: Philippe Mathieu-Daudé --- accel/tcg/tcg-accel-ops.h | 1 + accel/tcg/tcg-accel-ops-mttcg.c | 3 +-- accel/tcg/tcg-accel-ops-rr.c| 3 +-- accel/tcg/tcg-accel-ops.c | 7 +++ 4 files changed, 10 insertions(+), 4

[RFC PATCH 16/19] accel/hvf: Convert to AccelOpsClass::cpu_thread_routine

2025-06-06 Thread Philippe Mathieu-Daudé
By converting to AccelOpsClass::cpu_thread_routine we can let the common accel_create_vcpu_thread() create the thread. Signed-off-by: Philippe Mathieu-Daudé --- accel/hvf/hvf-accel-ops.c | 18 +- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/accel/hvf/hvf-accel-op

[RFC PATCH 13/19] accel: Introduce AccelOpsClass::cpu_thread_routine handler

2025-06-06 Thread Philippe Mathieu-Daudé
In order to have a generic function creating threads, introduce the thread_precreate() and cpu_thread_routine() handlers. Signed-off-by: Philippe Mathieu-Daudé --- include/system/accel-ops.h | 2 ++ accel/accel-common.c | 16 +++- 2 files changed, 17 insertions(+), 1 deletion(

[RFC PATCH 14/19] accel/dummy: Convert to AccelOpsClass::cpu_thread_routine

2025-06-06 Thread Philippe Mathieu-Daudé
By converting to AccelOpsClass::cpu_thread_routine we can let the common accel_create_vcpu_thread() create the thread. Signed-off-by: Philippe Mathieu-Daudé --- include/system/cpus.h | 4 +--- accel/dummy-cpus.c| 14 +- accel/qtest/qtest.c | 3 ++- accel/xen/xen-all.c | 3

[RFC PATCH 07/19] accel/hvf: Re-use QOM allocated state

2025-06-06 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- accel/hvf/hvf-accel-ops.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/accel/hvf/hvf-accel-ops.c b/accel/hvf/hvf-accel-ops.c index 808ecea3816..f4a983d1328 100644 --- a/accel/hvf/hvf-accel-ops.c +++ b/accel/hvf/hvf-accel-ops.c @@

[RFC PATCH 01/19] hw/arm/virt: Only require TCG || QTest to use virtualization extension

2025-06-06 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/arm/virt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index 9a6cd085a37..d55ce2c0f4e 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -2205,7 +2205,7 @@ static void machvirt_init(MachineState *mac

[RFC PATCH 09/19] accel: Factor accel_cpu_realize() out

2025-06-06 Thread Philippe Mathieu-Daudé
Factor accel_cpu_realize() out of accel_cpu_common_realize() for re-use. Signed-off-by: Philippe Mathieu-Daudé --- accel/accel-internal.h | 2 ++ include/qemu/accel.h | 2 ++ accel/accel-common.c | 15 --- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/accel/ac

[RFC PATCH 04/19] accel: Propagate AccelState to AccelClass::init_machine()

2025-06-06 Thread Philippe Mathieu-Daudé
In order to avoid init_machine() to call current_accel(), pass AccelState along. Signed-off-by: Philippe Mathieu-Daudé --- include/qemu/accel.h| 2 +- accel/accel-system.c| 2 +- accel/hvf/hvf-accel-ops.c | 2 +- accel/kvm/kvm-all.c | 2 +- accel/qtest/qtest.c |

[RFC PATCH 02/19] system/cpus: Only kick running vCPUs

2025-06-06 Thread Philippe Mathieu-Daudé
As an optimization, avoid kicking stopped vCPUs. Signed-off-by: Philippe Mathieu-Daudé --- system/cpus.c | 5 + 1 file changed, 5 insertions(+) diff --git a/system/cpus.c b/system/cpus.c index d16b0dff989..4835e5ced48 100644 --- a/system/cpus.c +++ b/system/cpus.c @@ -494,6 +494,11 @@ void

[RFC PATCH 00/19] accel: Preparatory cleanups for split-accel

2025-06-06 Thread Philippe Mathieu-Daudé
Few changes needed before being able to add the split acceleration. Mostly adapting few prototypes so callees have all necessary information. Philippe Mathieu-Daudé (19): hw/arm/virt: Only require TCG || QTest to use virtualization extension system/cpus: Only kick running vCPUs accel: Keep r

[RFC PATCH 05/19] accel/kvm: Prefer local AccelState over global MachineState::accel

2025-06-06 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- accel/kvm/kvm-all.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index 5b28b15ccec..551a462926d 100644 --- a/accel/kvm/kvm-all.c +++ b/accel/kvm/kvm-all.c @@ -2582,15 +2582,13 @@ static i

Re: [PATCH] target: riscv: Add Svrsw60t59b extension support

2025-06-06 Thread Deepak Gupta
On Thu, Jun 5, 2025 at 7:21 AM Alexandre Ghiti wrote: > > The Svrsw60t59b extension allows to free the PTE reserved bits 60 and 59 > for software to use. > > Signed-off-by: Alexandre Ghiti > --- Reviewed-by: Deepak Gupta

Re: [QEMU PATCH v3 6/9] cxl-mailbox-utils: 0x5602 - FMAPI Set DC Region Config

2025-06-06 Thread Fan Ni
On Thu, Jun 05, 2025 at 11:42:20PM +, anisa.su...@gmail.com wrote: > From: Anisa Su > > FM DCD Management command 0x5602 implemented per CXL r3.2 Spec Section > 7.6.7.6.3 > > Signed-off-by: Anisa Su > --- One minor comment, otherwise LGTM. > hw/cxl/cxl-mailbox-utils.c | 86 +++

Re: [PATCH v2] ramfb: Add property to control if load the romfile

2025-06-06 Thread Pierrick Bouvier
On 6/6/25 2:04 AM, Philippe Mathieu-Daudé wrote: On 6/6/25 09:52, Daniel P. Berrangé wrote: On Fri, Jun 06, 2025 at 03:02:34AM -0400, Shaoqin Huang wrote: Now the ramfb will load the vgabios-ramfb.bin unconditionally, but only the x86 need the vgabios-ramfb.bin, this can cause that when use the

Re: [PATCH v4 0/7] Move memory listener register to vhost_vdpa_init

2025-06-06 Thread Jonah Palmer
On 6/2/25 4:29 AM, Markus Armbruster wrote: Butterfingers... let's try this again. Markus Armbruster writes: Si-Wei Liu writes: On 5/26/2025 2:16 AM, Markus Armbruster wrote: Si-Wei Liu writes: On 5/15/2025 11:40 PM, Markus Armbruster wrote: Jason Wang writes: On Thu, May 8, 2025 at

Re: [PATCH 3/4] tests/unit/test-char: Avoid using g_alloca()

2025-06-06 Thread Pierrick Bouvier
On 6/5/25 11:09 PM, Philippe Mathieu-Daudé wrote: On 5/6/25 22:53, Pierrick Bouvier wrote: On 6/5/25 12:35 PM, Philippe Mathieu-Daudé wrote: Do not use g_alloca(), simply allocate the CharBackend structure on the stack. Signed-off-by: Philippe Mathieu-Daudé ---   tests/unit/test-char.c | 3 +

Re: [PATCH v1] migration: Wait for cpr.sock file to appear before connecting

2025-06-06 Thread Daniel P . Berrangé
On Fri, Jun 06, 2025 at 11:50:10AM -0400, Steven Sistare wrote: > On 6/6/2025 11:43 AM, Daniel P. Berrangé wrote: > > On Fri, Jun 06, 2025 at 10:37:28AM -0500, JAEHOON KIM wrote: > > > On 6/6/2025 10:12 AM, Steven Sistare wrote: > > > > On 6/6/2025 11:06 AM, JAEHOON KIM wrote: > > > > > On 6/6/2025

Re: [PATCH 10/21] migration: Use QAPI_CLONE_MEMBERS in query_migrate_parameters

2025-06-06 Thread Peter Xu
On Mon, Jun 02, 2025 at 10:37:59PM -0300, Fabiano Rosas wrote: > QAPI_CLONE_MEMBERS is a better option than copying parameters one by > one because it operates on the entire struct and follows pointers. It > also avoids the need to alter this function every time a new parameter > is added. > > Not

Re: [PATCH 10/21] migration: Use QAPI_CLONE_MEMBERS in query_migrate_parameters

2025-06-06 Thread Fabiano Rosas
Peter Xu writes: > On Mon, Jun 02, 2025 at 10:37:59PM -0300, Fabiano Rosas wrote: >> QAPI_CLONE_MEMBERS is a better option than copying parameters one by >> one because it operates on the entire struct and follows pointers. It >> also avoids the need to alter this function every time a new parame

Re: [PATCH 09/21] migration: Extract code to mark all parameters as present

2025-06-06 Thread Fabiano Rosas
Peter Xu writes: > On Mon, Jun 02, 2025 at 10:37:58PM -0300, Fabiano Rosas wrote: >> MigrationParameters needs to have all of its has_* fields marked as >> true when used as the return of query_migrate_parameters because the >> corresponding QMP command has all of its members non-optional by >> d

Re: [PATCH v1] migration: Wait for cpr.sock file to appear before connecting

2025-06-06 Thread Steven Sistare
On 6/6/2025 11:43 AM, Daniel P. Berrangé wrote: On Fri, Jun 06, 2025 at 10:37:28AM -0500, JAEHOON KIM wrote: On 6/6/2025 10:12 AM, Steven Sistare wrote: On 6/6/2025 11:06 AM, JAEHOON KIM wrote: On 6/6/2025 9:14 AM, Steven Sistare wrote: On 6/6/2025 9:53 AM, Daniel P. Berrangé wrote: On Thu,

Re: [PATCH v1] migration: Wait for cpr.sock file to appear before connecting

2025-06-06 Thread Daniel P . Berrangé
On Fri, Jun 06, 2025 at 09:48:41AM -0500, JAEHOON KIM wrote: > > On 6/6/2025 8:40 AM, Fabiano Rosas wrote: > > Jaehoon Kim writes: > > > > > When the source VM attempts to connect to the destination VM's Unix > > > domain socket(cpr.sock) during CPR transfer, the socket file might not > > > yet b

Re: [PATCH v1] migration: Wait for cpr.sock file to appear before connecting

2025-06-06 Thread Daniel P . Berrangé
On Fri, Jun 06, 2025 at 10:37:28AM -0500, JAEHOON KIM wrote: > > On 6/6/2025 10:12 AM, Steven Sistare wrote: > > On 6/6/2025 11:06 AM, JAEHOON KIM wrote: > > > On 6/6/2025 9:14 AM, Steven Sistare wrote: > > > > On 6/6/2025 9:53 AM, Daniel P. Berrangé wrote: > > > > > On Thu, Jun 05, 2025 at 06:08:

Re: [PATCH 05/21] migration: Add a flag to track block-bitmap-mapping input

2025-06-06 Thread Fabiano Rosas
Peter Xu writes: > On Mon, Jun 02, 2025 at 10:37:54PM -0300, Fabiano Rosas wrote: >> The QAPI converts an empty list on the block-bitmap-mapping input into >> a NULL BitmapMigrationNodeAliasList. The empty list is a valid input >> for the block-bitmap-mapping option, so commit 3cba22c9ad ("migrat

Re: [PATCH v1] migration: Wait for cpr.sock file to appear before connecting

2025-06-06 Thread JAEHOON KIM
On 6/6/2025 10:12 AM, Steven Sistare wrote: On 6/6/2025 11:06 AM, JAEHOON KIM wrote: On 6/6/2025 9:14 AM, Steven Sistare wrote: On 6/6/2025 9:53 AM, Daniel P. Berrangé wrote: On Thu, Jun 05, 2025 at 06:08:08PM -0500, Jaehoon Kim wrote: When the source VM attempts to connect to the destinati

Re: [PATCH 09/21] migration: Extract code to mark all parameters as present

2025-06-06 Thread Peter Xu
On Mon, Jun 02, 2025 at 10:37:58PM -0300, Fabiano Rosas wrote: > MigrationParameters needs to have all of its has_* fields marked as > true when used as the return of query_migrate_parameters because the > corresponding QMP command has all of its members non-optional by > design, despite them being

Re: [PATCH 08/21] migration: Do away with usage of QERR_INVALID_PARAMETER_VALUE

2025-06-06 Thread Peter Xu
On Mon, Jun 02, 2025 at 10:37:57PM -0300, Fabiano Rosas wrote: > The QERR_INVALID_PARAMETER_VALUE macro is documented as not to be used > in new code. Remove the usage from migration/options.c. > > Signed-off-by: Fabiano Rosas Reviewed-by: Peter Xu -- Peter Xu

Re: [PATCH v1] migration: Wait for cpr.sock file to appear before connecting

2025-06-06 Thread Steven Sistare
On 6/6/2025 11:06 AM, JAEHOON KIM wrote: On 6/6/2025 9:14 AM, Steven Sistare wrote: On 6/6/2025 9:53 AM, Daniel P. Berrangé wrote: On Thu, Jun 05, 2025 at 06:08:08PM -0500, Jaehoon Kim wrote: When the source VM attempts to connect to the destination VM's Unix domain socket(cpr.sock) during CPR

Re: [PATCH 06/21] migration: Remove checks for s->parameters has_* fields

2025-06-06 Thread Peter Xu
On Mon, Jun 02, 2025 at 10:37:55PM -0300, Fabiano Rosas wrote: > The migration parameters validation produces a temporary structure > which is the merge of the current parameter values (s->parameters, > MigrationParameters) with the new parameters set by the user > (MigrateSetParameters). > > When

  1   2   3   >