Re: [PATCH v2 09/12] qapi: make most CPU commands unconditionally available

2025-05-16 Thread Markus Armbruster
Pierrick Bouvier writes: > From: Daniel P. Berrangé > > This removes the TARGET_* conditions from all the CPU commands > that are conceptually target independent. Top level stubs are > provided to cope with targets which do not currently implement > all of the commands. > > Reviewed-by: Richard

Re: [PATCH v3 04/10] qemu-thread: Avoid futex abstraction for non-Linux

2025-05-16 Thread Akihiko Odaki
On 2025/05/16 23:25, 'Paolo Bonzini' via devel wrote: Il ven 16 mag 2025, 08:58 Akihiko Odaki > ha scritto: I also found smp_mb__after_rmw() before qemu_futex_wake_all() is no longer necessary. Summing up, I think the code should look like as follo

Re: [PATCH v5 1/2] hw/pci-host/gt64120: Fix endianness handling

2025-05-16 Thread Rakesh Jeyasingh
On Tue, Apr 29, 2025 at 10:34 PM Rakesh Jeyasingh wrote: > The GT-64120 PCI controller requires special handling where: > 1. Host bridge(bus 0 ,device 0) must never be byte-swapped > 2. Other devices follow MByteSwap bit in GT_PCI0_CMD > > The previous implementation incorrectly swapped all acce

Re: [PATCH v3 01/10] futex: Check value after qemu_futex_wait()

2025-05-16 Thread Akihiko Odaki
On 2025/05/16 23:53, Peter Xu wrote: On Fri, May 16, 2025 at 02:34:33PM +0900, Akihiko Odaki wrote: On 2025/05/15 2:06, Peter Xu wrote: On Wed, May 14, 2025 at 04:34:33PM +0900, Akihiko Odaki wrote: On 2025/05/13 23:39, 'Peter Xu' via devel wrote: On Sun, May 11, 2025 at 03:08:18PM +0900, Aki

Re: [PATCH v2 1/2] block/null: Report DATA if not reading zeroes

2025-05-16 Thread Nir Soffer
> On 8 May 2025, at 7:37, Markus Armbruster wrote: > > Nir Soffer writes: > >> If read-zeroes is not set, we did not report BDRV_BLOCK_DATA or >> BDRV_BLOCK_ZERO. This is not consistent with other drivers and can >> confuse users or other programs: >> >>% qemu-img map --output json "jso

Re: [PATCH v2 1/2] block/null: Report DATA if not reading zeroes

2025-05-16 Thread Nir Soffer
> On 8 May 2025, at 8:20, Markus Armbruster wrote: > > Markus Armbruster writes: > >> Markus Armbruster writes: >> >>> Nir Soffer writes: > > [...] > diff --git a/qapi/block-core.json b/qapi/block-core.json index b1937780e1..7c95c9e36a 100644 --- a/qapi/block-core.json >>

Re: [PATCH v2 1/2] block/null: Report DATA if not reading zeroes

2025-05-16 Thread Nir Soffer
> On 8 May 2025, at 8:03, Markus Armbruster wrote: > > Markus Armbruster writes: > >> Nir Soffer writes: >> >>> If read-zeroes is not set, we did not report BDRV_BLOCK_DATA or >>> BDRV_BLOCK_ZERO. This is not consistent with other drivers and can >>> confuse users or other programs: >>> >

Re: [PATCH v2 2/2] block/null: Add read-pattern option

2025-05-16 Thread Nir Soffer
> On 8 May 2025, at 8:28, Markus Armbruster wrote: > > Nir Soffer writes: > >> When the `read-zeroes` is set, reads produce zeroes, and block status >> return BDRV_BLOCK_ZERO, emulating a sparse image. >> >> If we don't set `read-zeros` we report BDRV_BLOCK_DATA, but image data >> is undefi

Re: [PATCH v2 1/6] hw/arm/smmuv3: Add support to associate a PCIe RC

2025-05-16 Thread Donald Dutile
On 5/8/25 9:57 AM, Peter Maydell wrote: On Thu, 8 May 2025 at 14:46, Donald Dutile wrote: I would refer to the ARM SMMU spec, Figure 2.3 in the G.a version, where it's slightly different; more like: +--+ | PCIe Devices | (one device, unless a PCIe switch is btwn t

Re: [PATCH V4] vfio: return mr from vfio_get_xlat_addr

2025-05-16 Thread David Hildenbrand
On 16.05.25 21:26, Steven Sistare wrote: On 5/16/2025 2:58 PM, David Hildenbrand wrote: On 16.05.25 19:13, Steve Sistare wrote: Modify memory_get_xlat_addr and vfio_get_xlat_addr to return the memory region that the translated address is found in.  This will be needed by CPR in a subsequent pat

Re: [PATCH V3 00/42] Live update: vfio and iommufd

2025-05-16 Thread Steven Sistare
On 5/16/2025 1:17 PM, Steven Sistare wrote: On 5/16/2025 12:37 PM, Cédric Le Goater wrote: Steve, + John On 5/12/25 17:32, Steve Sistare wrote: Support vfio and iommufd devices with the cpr-transfer live migration mode. Devices that do not support live migration can still support cpr-transfer

Re: [PATCH V4] vfio: return mr from vfio_get_xlat_addr

2025-05-16 Thread Steven Sistare
On 5/16/2025 2:58 PM, David Hildenbrand wrote: On 16.05.25 19:13, Steve Sistare wrote: Modify memory_get_xlat_addr and vfio_get_xlat_addr to return the memory region that the translated address is found in.  This will be needed by CPR in a subsequent patch to map blocks using IOMMU_IOAS_MAP_FILE

Re: [PATCH V3 24/42] migration: close kvm after cpr

2025-05-16 Thread Steven Sistare
On 5/16/2025 1:14 PM, Peter Xu wrote: On Fri, May 16, 2025 at 10:35:44AM +0200, Cédric Le Goater wrote: On 5/12/25 17:32, Steve Sistare wrote: cpr-transfer breaks vfio network connectivity to and from the guest, and the host system log shows: irq bypass consumer (token a03c32e5) reg

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

2025-05-16 Thread Si-Wei Liu
On 5/15/2025 11:40 PM, Markus Armbruster wrote: Jason Wang writes: On Thu, May 8, 2025 at 2:47 AM Jonah Palmer wrote: Current memory operations like pinning may take a lot of time at the destination. Currently they are done after the source of the migration is stopped, and before the wor

Re: [PATCH V4] vfio: return mr from vfio_get_xlat_addr

2025-05-16 Thread David Hildenbrand
On 16.05.25 19:13, Steve Sistare wrote: Modify memory_get_xlat_addr and vfio_get_xlat_addr to return the memory region that the translated address is found in. This will be needed by CPR in a subsequent patch to map blocks using IOMMU_IOAS_MAP_FILE. Also return the xlat offset, so we can simpli

Re: [PATCH V3 24/42] migration: close kvm after cpr

2025-05-16 Thread Steven Sistare
On 5/16/2025 4:35 AM, Cédric Le Goater wrote: On 5/12/25 17:32, Steve Sistare wrote: cpr-transfer breaks vfio network connectivity to and from the guest, and the host system log shows:    irq bypass consumer (token a03c32e5) registration fails: -16 which is EBUSY.  This occurs because KV

Re: [PATCH v5 0/2] GT64120 PCI endianness fixes and cleanup

2025-05-16 Thread Thomas Huth
On 29/04/2025 19.03, Rakesh Jeyasingh wrote: Changes since v4: 1.Introduced needs_bswap() helper for clean endianness logic 2.use the existing pci_host_data_le_ops.read/write from hw/pci/pci_host.c v4:https://patchew.org/QEMU/20250331184820.34673-1-rakeshjb...@gmail.com/ Rakesh Jeyasingh (2):

Re: [PATCH V3 21/42] vfio/pci: export MSI functions

2025-05-16 Thread Steven Sistare
On 5/16/2025 4:31 AM, Cédric Le Goater wrote: On 5/12/25 17:32, Steve Sistare wrote: Export various MSI functions, for use by CPR in subsequent patches. No functional change. Signed-off-by: Steve Sistare Please rename this routines with a 'vfio_pci' prefix. Are you sure? That makes sense

Re: [PATCH V3 14/42] pci: skip reset during cpr

2025-05-16 Thread Steven Sistare
On 5/16/2025 4:19 AM, Cédric Le Goater wrote: On 5/12/25 17:32, Steve Sistare wrote: Do not reset a vfio-pci device during CPR. Signed-off-by: Steve Sistare ---   hw/pci/pci.c | 13 +   1 file changed, 13 insertions(+) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index fe38c4c..2ba2e0f

Re: [PATCH V3 06/42] vfio/container: register container for cpr

2025-05-16 Thread Steven Sistare
On 5/16/2025 12:20 PM, Cédric Le Goater wrote: On 5/15/25 21:06, Steven Sistare wrote: On 5/15/2025 3:54 AM, Cédric Le Goater wrote: On 5/12/25 17:32, Steve Sistare wrote: Register a legacy container for cpr-transfer, replacing the generic CPR register call with a more specific legacy containe

[PATCH V4] vfio: return mr from vfio_get_xlat_addr

2025-05-16 Thread Steve Sistare
Modify memory_get_xlat_addr and vfio_get_xlat_addr to return the memory region that the translated address is found in. This will be needed by CPR in a subsequent patch to map blocks using IOMMU_IOAS_MAP_FILE. Also return the xlat offset, so we can simplify the interface by removing the out param

Re: [PATCH V3 00/42] Live update: vfio and iommufd

2025-05-16 Thread Steven Sistare
On 5/16/2025 12:37 PM, Cédric Le Goater wrote: Steve, + John On 5/12/25 17:32, Steve Sistare wrote: Support vfio and iommufd devices with the cpr-transfer live migration mode. Devices that do not support live migration can still support cpr-transfer, allowing live update to a new version of QE

Re: [PATCH V3 24/42] migration: close kvm after cpr

2025-05-16 Thread Peter Xu
On Fri, May 16, 2025 at 10:35:44AM +0200, Cédric Le Goater wrote: > On 5/12/25 17:32, Steve Sistare wrote: > > cpr-transfer breaks vfio network connectivity to and from the guest, and > > the host system log shows: > >irq bypass consumer (token a03c32e5) registration fails: -16 > > whic

Re: [PATCH] migration/multifd: Don't send device state packets with zerocopy flag

2025-05-16 Thread Peter Xu
On Fri, May 16, 2025 at 03:53:03PM +0200, Maciej S. Szmigiero wrote: > From: "Maciej S. Szmigiero" > > If zerocopy is enabled for multifd then QIO_CHANNEL_WRITE_FLAG_ZERO_COPY > flag is forced into all multifd channel write calls via p->write_flags > that was setup in multifd_nocomp_send_setup().

Re: [PATCH V3 00/42] Live update: vfio and iommufd

2025-05-16 Thread Cédric Le Goater
Steve, + John On 5/12/25 17:32, Steve Sistare wrote: Support vfio and iommufd devices with the cpr-transfer live migration mode. Devices that do not support live migration can still support cpr-transfer, allowing live update to a new version of QEMU on the same host, with no loss of guest conne

Re: [PATCH 08/50] ppc/xive2: Use fair irq target search algorithm

2025-05-16 Thread Mike Kowal
On 5/15/2025 7:12 PM, Nicholas Piggin wrote: On Mon May 12, 2025 at 1:10 PM AEST, Nicholas Piggin wrote: From: Glenn Miles The current xive algorithm for finding a matching group vCPU target always uses the first vCPU found. And, since it always starts the search with thread 0 of a core, th

Re: [PATCH V3 06/42] vfio/container: register container for cpr

2025-05-16 Thread Cédric Le Goater
On 5/15/25 21:06, Steven Sistare wrote: On 5/15/2025 3:54 AM, Cédric Le Goater wrote: On 5/12/25 17:32, Steve Sistare wrote: Register a legacy container for cpr-transfer, replacing the generic CPR register call with a more specific legacy container register call.  Add a blocker if the kernel do

[PATCH v4 0/7] util/qemu-sockets: Introduce inet socket options controlling TCP keep-alive

2025-05-16 Thread Juraj Marcin
This series extends the work introduced by commit aec21d3175 ("qapi: Add InetSocketAddress member keep-alive"). [1] First, the series fixes an issue in qio_dns_resolver_lookup_sync_inet(), where the InetSocketAddress structure is only partially copied. Next, it refactors setting client socket opti

[PATCH v4 6/7] util/qemu-sockets: Refactor inet_parse() to use QemuOpts

2025-05-16 Thread Juraj Marcin
From: Juraj Marcin Currently, the inet address parser cannot handle multiple options where one is prefixed with the name of the other. For example, with the 'keep-alive-idle' option added, the current parser cannot parse '127.0.0.1:5000,keep-alive-idle=60,keep-alive' correctly. Instead, it fails

[PATCH v4 2/7] util/qemu-sockets: Refactor setting client sockopts into a separate function

2025-05-16 Thread Juraj Marcin
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.c | 29 +++-- 1 file changed, 19 insertions(+), 10 delet

[PATCH v4 3/7] util/qemu-sockets: Refactor success and failure paths in inet_listen_saddr()

2025-05-16 Thread Juraj Marcin
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 being that the requested address/port is already in use. In such case, the f

[PATCH v4 4/7] util/qemu-sockets: Add support for keep-alive flag to passive sockets

2025-05-16 Thread Juraj Marcin
From: Juraj Marcin Commit aec21d3175 (qapi: Add InetSocketAddress member keep-alive) introduces the keep-alive flag, which enables the SO_KEEPALIVE socket option, but only on client-side sockets. However, this option is also useful for server-side sockets, so they can check if a client is still r

[PATCH v4 5/7] tests/unit/test-util-sockets: Add tests for inet_parse()

2025-05-16 Thread Juraj Marcin
From: Juraj Marcin Before refactoring the inet_parse() function, this patch adds tests verifying the inet address parsing works correctly. Signed-off-by: Juraj Marcin --- tests/unit/test-util-sockets.c | 161 + 1 file changed, 161 insertions(+) diff --git a/tes

[PATCH v4 7/7] util/qemu-sockets: Introduce inet socket options controlling TCP keep-alive

2025-05-16 Thread Juraj Marcin
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 connection issue much sooner. This is the case, for example, for postcop

[PATCH v4 1/7] io: Fix partial struct copy in qio_dns_resolver_lookup_sync_inet()

2025-05-16 Thread Juraj Marcin
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 patch fixes this issue and also prevents future ones by copying the entire str

Re: [PATCH 17/50] pnv/xive2: Support ESB Escalation

2025-05-16 Thread Miles Glenn
On Fri, 2025-05-16 at 10:05 +1000, Nicholas Piggin wrote: > On Mon May 12, 2025 at 1:10 PM AEST, Nicholas Piggin wrote: > > From: Glenn Miles > > > > Add support for XIVE ESB Interrupt Escalation. > > > > Suggested-by: Michael Kowal > > [This change was taken from a patch provided by Michael Ko

Re: [PATCH 05/27] vfio: refactor out IRQ signalling setup

2025-05-16 Thread Cédric Le Goater
On 5/15/25 17:43, John Levon wrote: This makes for a slightly more readable vfio_msix_vector_do_use() implementation, and we will rely on this shortly. Signed-off-by: John Levon Reviewed-by: Cédric Le Goater Thanks, C. --- hw/vfio/pci.c | 35 --- 1 fi

Re: [PATCH 04/27] vfio: move config space read into vfio_pci_config_setup()

2025-05-16 Thread Cédric Le Goater
On 5/15/25 17:43, John Levon wrote: Small cleanup that reduces duplicate code for vfio-user. It also reduces vfio_realize(). It's time to rename it to vfio_pci_realize() too. Reviewed-by: Cédric Le Goater Thanks, C. Signed-off-by: John Levon --- hw/vfio/pci.c | 27 ++--

Re: [PATCH 03/27] vfio: move more cleanup into vfio_pci_put_device()

2025-05-16 Thread Cédric Le Goater
On 5/15/25 17:43, John Levon wrote: All of the cleanup can be done in the same place, and vfio-user will want to do the same. Signed-off-by: John Levon Reviewed-by: Cédric Le Goater Thanks, C. --- hw/vfio/pci.c | 23 --- 1 file changed, 12 insertions(+), 11 delet

Re: [PATCH qemu 7/8] hw/cxl/cxl-mailbox-utils: Added support for Get Log Capabilities (Opcode 0402h)

2025-05-16 Thread Arpit Kumar
On 12/05/25 05:40PM, Jonathan Cameron wrote: On Mon, 12 May 2025 09:37:07 -0400 "Michael S. Tsirkin" wrote: On Mon, May 12, 2025 at 04:42:41AM -0400, Michael S. Tsirkin wrote: > On Wed, Mar 05, 2025 at 09:24:58AM +, Jonathan Cameron wrote: > > From: Arpit Kumar > > > > CXL spec 3.2 sectio

Re: [PATCH 3/4] hw/microblaze: Remove the big-endian variants of ml605 and xlnx-zynqmp-pmu

2025-05-16 Thread Thomas Huth
On 16/05/2025 17.00, Philippe Mathieu-Daudé wrote: On 15/5/25 15:20, Thomas Huth wrote: From: Thomas Huth Both machines were added with little-endian in mind only (the "endianness" CPU property was hard-wired to "true", see commits 133d23b3ad1 and a88bbb006a52), so the variants that showed up

Re: [PATCH v3 08/10] arm/cpu: more customization for the kvm host cpu model

2025-05-16 Thread Cornelia Huck
On Fri, May 16 2025, Daniel P. Berrangé wrote: > On Fri, May 16, 2025 at 04:51:34PM +0200, Cornelia Huck wrote: >> On Wed, May 14 2025, Daniel P. Berrangé wrote: >> >> > On Wed, May 14, 2025 at 05:36:58PM +0200, Cornelia Huck wrote: >> >> On Tue, May 13 2025, Daniel P. Berrangé wrote: >> >> >

Re: [PATCH 02/27] vfio/container: pass MemoryRegion to DMA operations

2025-05-16 Thread Cédric Le Goater
On 5/15/25 17:43, John Levon wrote: Pass through the MemoryRegion to DMA operation handlers of vfio containers. The vfio-user container will need this later, to translate the vaddr into an offset for the dma map vfio-user message. Originally-by: John Johnson Signed-off-by: Jagannathan Raman Si

[PATCH v2 0/1] docs/interop: convert text files to reStructuredText

2025-05-16 Thread conte . souleymane
From: Souleymane Conte This patch converts the qcow2.txt documentation into reStructuredText format (qcow2.rst) Changes since v1: - Fixed typo: "Each entry look" -> "Each entry looks" - Adjusted nested layout diagrams for better .rst rendering - Capitalized "QEMU" consistently throughout the doc

[PATCH v2 1/1] docs/interop: convert text files to restructuredText

2025-05-16 Thread conte . souleymane
From: Souleymane Conte buglink: https://gitlab.com/qemu-project/qemu/-/issues/527 Signed-off-by: Souleymane Conte --- docs/interop/index.rst| 1 + docs/interop/{qcow2.txt => qcow2.rst} | 218 +++--- 2 files changed, 128 insertions(+), 91 deletions(-) rena

[PATCH v2] docs/interop: convert text files to restructuredText

2025-05-16 Thread conte . souleymane
From: Souleymane Conte buglink: https://gitlab.com/qemu-project/qemu/-/issues/527 Signed-off-by: Souleymane Conte --- docs/interop/index.rst| 1 + docs/interop/{qcow2.txt => qcow2.rst} | 210 +++--- 2 files changed, 123 insertions(+), 88 deletions(-) rena

Re: [PATCH 3/4] hw/microblaze: Remove the big-endian variants of ml605 and xlnx-zynqmp-pmu

2025-05-16 Thread Philippe Mathieu-Daudé
On 15/5/25 15:20, Thomas Huth wrote: From: Thomas Huth Both machines were added with little-endian in mind only (the "endianness" CPU property was hard-wired to "true", see commits 133d23b3ad1 and a88bbb006a52), so the variants that showed up on the big endian target likely never worked. We dep

Re: [PATCH v3 08/10] arm/cpu: more customization for the kvm host cpu model

2025-05-16 Thread Daniel P . Berrangé
On Fri, May 16, 2025 at 04:51:34PM +0200, Cornelia Huck wrote: > On Wed, May 14 2025, Daniel P. Berrangé wrote: > > > On Wed, May 14, 2025 at 05:36:58PM +0200, Cornelia Huck wrote: > >> On Tue, May 13 2025, Daniel P. Berrangé wrote: > >> > >> > On Mon, Apr 14, 2025 at 06:38:47PM +0200, Cornelia

Re: [PATCH v3 01/10] futex: Check value after qemu_futex_wait()

2025-05-16 Thread Peter Xu
On Fri, May 16, 2025 at 02:34:33PM +0900, Akihiko Odaki wrote: > On 2025/05/15 2:06, Peter Xu wrote: > > On Wed, May 14, 2025 at 04:34:33PM +0900, Akihiko Odaki wrote: > > > On 2025/05/13 23:39, 'Peter Xu' via devel wrote: > > > > On Sun, May 11, 2025 at 03:08:18PM +0900, Akihiko Odaki wrote: > > >

Re: [PATCH v3 08/10] arm/cpu: more customization for the kvm host cpu model

2025-05-16 Thread Cornelia Huck
On Wed, May 14 2025, Daniel P. Berrangé wrote: > On Wed, May 14, 2025 at 05:36:58PM +0200, Cornelia Huck wrote: >> On Tue, May 13 2025, Daniel P. Berrangé wrote: >> >> > On Mon, Apr 14, 2025 at 06:38:47PM +0200, Cornelia Huck wrote: >> >> From: Eric Auger >> >> >> >> If the interface for writ

Re: [PATCH v4] tests/functional: Add PCI hotplug test for aarch64

2025-05-16 Thread Philippe Mathieu-Daudé
On 12/5/25 16:45, Gustavo Romero wrote: Add a functional test, aarch64_hotplug_pci, to exercise PCI hotplug and hot-unplug on arm64. Signed-off-by: Gustavo Romero Reviewed-by: Daniel P. Berrangé --- MAINTAINERS | 5 ++ tests/functional/meson.build

Re: [PATCH v3 1/2] hw/i386/amd_iommu: Fix device setup failure when PT is on.

2025-05-16 Thread Philippe Mathieu-Daudé
On 16/5/25 12:05, Sairaj Kodilkar wrote: Commit c1f46999ef506 ("amd_iommu: Add support for pass though mode") introduces the support for "pt" flag by enabling nodma memory when "pt=off". This allowed VFIO devices to successfully register notifiers by using nodma region. But, This also broke thin

Re: [PATCH v3 08/10] arm/cpu: more customization for the kvm host cpu model

2025-05-16 Thread Cornelia Huck
On Tue, May 13 2025, Daniel P. Berrangé wrote: > On Mon, Apr 14, 2025 at 06:38:47PM +0200, Cornelia Huck wrote: >> From: Eric Auger >> >> If the interface for writable ID registers is available, expose uint64 >> SYSREG properties for writable ID reg fields exposed by the host >> kernel. Propert

Re: [PATCH] migration/multifd: Don't send device state packets with zerocopy flag

2025-05-16 Thread Fabiano Rosas
"Maciej S. Szmigiero" writes: > From: "Maciej S. Szmigiero" > > If zerocopy is enabled for multifd then QIO_CHANNEL_WRITE_FLAG_ZERO_COPY > flag is forced into all multifd channel write calls via p->write_flags > that was setup in multifd_nocomp_send_setup(). > > However, device state packets are

Re: [PATCH] docs/interop: convert text files to restructuredText

2025-05-16 Thread souleymane conté
Hi, Thanks a lot for your review and helpful suggestions. I will address the following points in v2: - Fix the typo: "Each entry look" → "Each entry looks" - Improve the layout for the LUKS section in the visual diagram - Check whether nested tables are possible in reStructuredText - Update "qemu"

Re: [PATCH v3 2/2] hw/i386/amd_iommu: Fix xtsup when vcpus < 255

2025-05-16 Thread Philippe Mathieu-Daudé
Hi, On 16/5/25 12:05, Sairaj Kodilkar wrote: From: Vasant Hegde If vCPUs > 255 then x86 common code (x86_cpus_init()) call kvm_enable_x2apic(). But if vCPUs <= 255 then the common code won't calls kvm_enable_x2apic(). This is because commit 8c6619f3e692 ("hw/i386/amd_iommu: Simplify non-KVM c

Re: [PATCH 1/6] meson: build target libraries with common dependencies

2025-05-16 Thread Pierrick Bouvier
On 5/16/25 4:42 AM, Philippe Mathieu-Daudé wrote: On 16/5/25 07:27, Pierrick Bouvier wrote: As mentioned in 20250513115637.184940-1-th...@redhat.com, dependencies Use LORE link instead? https://lore.kernel.org/qemu-devel/20250513115637.184940-1-th...@redhat.com/ Yes, thanks. were missing

Re: [PATCH v3 04/10] qemu-thread: Avoid futex abstraction for non-Linux

2025-05-16 Thread Paolo Bonzini
Il ven 16 mag 2025, 08:58 Akihiko Odaki ha scritto: > I also found smp_mb__after_rmw() before qemu_futex_wake_all() is no > longer necessary. Summing up, I think the code should look like as follows: > > #ifdef HAVE_FUTEX > You would still need smp_mb__before_rmw() here. if (qatomic_xchg(&

Re: [PATCH v3 06/10] arm/kvm: Allow reading all the writable ID registers

2025-05-16 Thread Cornelia Huck
On Tue, May 13 2025, Eric Auger wrote: > On 4/14/25 6:38 PM, Cornelia Huck wrote: >> From: Eric Auger (...) >> +static bool >> +kvm_arm_get_host_cpu_features(ARMCPU *cpu, ARMHostCPUFeatures *ahcf, >> + bool exhaustive) > maybe the exhaustive term shall be replaced b

[PATCH] migration/multifd: Don't send device state packets with zerocopy flag

2025-05-16 Thread Maciej S. Szmigiero
From: "Maciej S. Szmigiero" If zerocopy is enabled for multifd then QIO_CHANNEL_WRITE_FLAG_ZERO_COPY flag is forced into all multifd channel write calls via p->write_flags that was setup in multifd_nocomp_send_setup(). However, device state packets aren't compatible with zerocopy - the data buff

Re: [PATCH V2] vhost: Don't set vring call if guest notifier is unused

2025-05-16 Thread Huaitong Han
Stefano Garzarella 于2025年5月16日周五 16:19写道: > > On Tue, May 13, 2025 at 07:28:25PM +0800, oen...@gmail.com wrote: > >From: Huaitong Han > > > >The vring call fd is set even when the guest does not use MSI-X (e.g., in the > >case of virtio PMD), leading to unnecessary CPU overhead for processing > >

Re: [PATCH v3 04/10] qemu-thread: Avoid futex abstraction for non-Linux

2025-05-16 Thread Akihiko Odaki
On 2025/05/16 20:09, 'Paolo Bonzini' via devel wrote: Il mer 14 mag 2025, 08:57 Akihiko Odaki > ha scritto: Honestly, I do not understand why smp_mb() is placed here even in the futex case. The comment says:  > qemu_event_set has release semantics

[PATCH RFC] target: riscv: Fix satp mode initialization based on profile

2025-05-16 Thread Alexandre Ghiti
The satp mode is set using the svXX properties, but that actually restricts the satp mode to the minimum required by the profile and prevents the use of higher satp modes. Fix this by not setting any svXX property and allow all satp mode to be supported. Signed-off-by: Alexandre Ghiti --- targe

Re: [PULL 34/46] hw/intc/aspeed: Add Support for AST2700 INTCIO Controller

2025-05-16 Thread Philippe Mathieu-Daudé
On 9/3/25 14:51, Cédric Le Goater wrote: From: Jamin Lin Introduce a new ast2700 INTCIO class to support AST2700 INTCIO. Added new register definitions for INTCIO, including enable and status registers for IRQs GICINT192 through GICINT197. Created a dedicated IRQ array for INTCIO, supporting si

Re: [PATCH 1/6] meson: build target libraries with common dependencies

2025-05-16 Thread Philippe Mathieu-Daudé
On 16/5/25 07:27, Pierrick Bouvier wrote: As mentioned in 20250513115637.184940-1-th...@redhat.com, dependencies Use LORE link instead? https://lore.kernel.org/qemu-devel/20250513115637.184940-1-th...@redhat.com/ were missing when compiling per target libraries, thus breaking compilation on c

Re: [PATCH 2/4] hw/intc/arm_gic: introduce a first-cpu-index property

2025-05-16 Thread Philippe Mathieu-Daudé
Hi Clément, On 14/5/25 14:41, Clément Chigot wrote: On Tue, May 13, 2025 at 5:39 PM Philippe Mathieu-Daudé wrote: On 13/5/25 16:14, Clément Chigot wrote: From: Frederic Konrad This introduces a first-cpu-index property to the arm-gic, as some SOCs could have two separate GIC (ie: the zynqm

Re: [PATCH v3 04/10] qemu-thread: Avoid futex abstraction for non-Linux

2025-05-16 Thread Paolo Bonzini
Il mer 14 mag 2025, 08:57 Akihiko Odaki ha scritto: > Honestly, I do not understand why smp_mb() is placed here even in the > futex case. The comment says: > > qemu_event_set has release semantics, but because it *loads* > > ev->value we need a full memory barrier here. > > The barrier is indee

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

2025-05-16 Thread Michael S. Tsirkin
On Thu, May 15, 2025 at 10:41:45AM -0700, Si-Wei Liu wrote: > > > On 5/14/2025 10:43 PM, Michael S. Tsirkin wrote: > > On Wed, May 14, 2025 at 05:17:15PM -0700, Si-Wei Liu wrote: > > > Hi Eugenio, > > > > > > On 5/14/2025 8:49 AM, Eugenio Perez Martin wrote: > > > > On Wed, May 7, 2025 at 8:47 P

Re: [PATCH v3 0/2] amd_iommu: Fixes

2025-05-16 Thread Sairaj Kodilkar
On 5/16/2025 4:06 PM, Michael S. Tsirkin wrote: On Fri, May 16, 2025 at 03:35:33PM +0530, Sairaj Kodilkar wrote: Fix following two issues in the amd viommu 1. The guest fails to setup the passthrough device when for following setup because amd iommu enables the no DMA memory region even w

Re: [PATCH v3 0/2] amd_iommu: Fixes

2025-05-16 Thread Michael S. Tsirkin
On Fri, May 16, 2025 at 03:35:33PM +0530, Sairaj Kodilkar wrote: > Fix following two issues in the amd viommu > 1. The guest fails to setup the passthrough device when for following setup >because amd iommu enables the no DMA memory region even when guest is >using DMA remapping mode. > >

RE: [PATCH V3 37/42] vfio/iommufd: reconstruct device

2025-05-16 Thread Duan, Zhenzhong
>-Original Message- >From: Steve Sistare >Subject: [PATCH V3 37/42] vfio/iommufd: reconstruct device > >Reconstruct userland device state after CPR. During vfio_realize, skip >all ioctls that configure the device, as it was already configured in old >QEMU. > >Save the ioas_id in vmstat

RE: [PATCH V3 35/42] vfio/iommufd: register container for cpr

2025-05-16 Thread Duan, Zhenzhong
>-Original Message- >From: Steve Sistare >Subject: [PATCH V3 35/42] vfio/iommufd: register container for cpr > >Register a vfio iommufd container and device for CPR, replacing the generic >CPR register call with a more specific iommufd register call. Add a >blocker if the kernel does n

[PATCH v3 2/2] hw/i386/amd_iommu: Fix xtsup when vcpus < 255

2025-05-16 Thread Sairaj Kodilkar
From: Vasant Hegde If vCPUs > 255 then x86 common code (x86_cpus_init()) call kvm_enable_x2apic(). But if vCPUs <= 255 then the common code won't calls kvm_enable_x2apic(). This is because commit 8c6619f3e692 ("hw/i386/amd_iommu: Simplify non-KVM checks on XTSup feature") removed the call to kvm

[PATCH v3 1/2] hw/i386/amd_iommu: Fix device setup failure when PT is on.

2025-05-16 Thread Sairaj Kodilkar
Commit c1f46999ef506 ("amd_iommu: Add support for pass though mode") introduces the support for "pt" flag by enabling nodma memory when "pt=off". This allowed VFIO devices to successfully register notifiers by using nodma region. But, This also broke things when guest is booted with the iommu=nopt

[PATCH v3 0/2] amd_iommu: Fixes

2025-05-16 Thread Sairaj Kodilkar
Fix following two issues in the amd viommu 1. The guest fails to setup the passthrough device when for following setup because amd iommu enables the no DMA memory region even when guest is using DMA remapping mode. -device amd-iommu,intremap=on,xtsup=on,pt=on \ -device vfio-pci,host

RE: [PATCH V3 36/42] vfio/iommufd: preserve descriptors

2025-05-16 Thread Duan, Zhenzhong
>-Original Message- >From: Steve Sistare >Subject: [PATCH V3 36/42] vfio/iommufd: preserve descriptors > >Save the iommu and vfio device fd in CPR state when it is created. >After CPR, the fd number is found in CPR state and reused. Remember >the reused status for subsequent patches.

Re: [PATCH v4] tests/functional: Add PCI hotplug test for aarch64

2025-05-16 Thread Alex Bennée
Gustavo Romero writes: > Add a functional test, aarch64_hotplug_pci, to exercise PCI hotplug and > hot-unplug on arm64. Queued to maintainer/may-2025, thanks. > > Signed-off-by: Gustavo Romero > Reviewed-by: Daniel P. Berrangé > --- > MAINTAINERS | 5 ++ > t

RE: [PATCH V3 34/42] vfio/iommufd: invariant device name

2025-05-16 Thread Duan, Zhenzhong
>-Original Message- >From: Steve Sistare >Subject: [PATCH V3 34/42] vfio/iommufd: invariant device name > >cpr-transfer will use the device name as a key to find the value >of the device descriptor in new QEMU. However, if the descriptor >number is specified by a command-line fd parame

Re: [PULL 45/46] tests/functional/aspeed: Add test case for AST2700 A1

2025-05-16 Thread Cédric Le Goater
On 5/16/25 04:59, Jamin Lin wrote: Hi Cédric On a BE host, if I run an ast2700a0-evb machine : $ qemu-system-aarch64 -machine ast2700a0-evb ... ... U-Boot 2023.10-v00.05.06 (Mar 26 2025 - 05:59:26 +) SOC: AST2700-A0 Model: AST2700 EVB DRAM: 8 GiB (effectiv

RE: [PATCH V3 33/42] vfio/iommufd: define hwpt constructors

2025-05-16 Thread Duan, Zhenzhong
>-Original Message- >From: Steve Sistare >Subject: [PATCH V3 33/42] vfio/iommufd: define hwpt constructors > >Extract hwpt creation code from iommufd_cdev_autodomains_get into the >helpers iommufd_cdev_use_hwpt and iommufd_cdev_make_hwpt. These will >be used by CPR in a subsequent patc

[PATCH 2/2] qapi/misc-target: Rename SGXInfo to SgxInfo

2025-05-16 Thread Zhao Liu
QAPI requires strict PascalCase naming style, i.e., only the first letter of a single word is allowed to be uppercase, which could help with readability. Rename SGXInfo to SgxInfo. Signed-off-by: Zhao Liu --- hw/i386/sgx-stub.c| 4 ++-- hw/i386/sgx.c | 14 +++--- qapi/misc-

[PATCH 1/2] qapi/misc-target: Rename SGXEPCSection to SgxEpcSection

2025-05-16 Thread Zhao Liu
QAPI requires strict PascalCase naming style, i.e., only the first letter of a single word is allowed to be uppercase, which could help with readability. Rename SGXEPCSection to SgxEpcSection. Signed-off-by: Zhao Liu --- hw/i386/sgx.c | 18 +- qapi/misc-target.json | 6

[PATCH 0/2] qapi/misc-target: Rename SGX related items to follow QAPI naming style

2025-05-16 Thread Zhao Liu
QAPI requires strict PascalCase naming style, i.e., only the first letter of a single word is allowed to be uppercase, which could help with readability. Rename SGXEPCSection & SGXInfo to SgxEpcSection & SgxInfo. Thanks and Best Regards, Zhao --- Zhao Liu (2): qapi/misc-target: Rename SGXEPCSec

RE: [PATCH V3 31/42] vfio/iommufd: use IOMMU_IOAS_MAP_FILE

2025-05-16 Thread Duan, Zhenzhong
>-Original Message- >From: Steve Sistare >Subject: [PATCH V3 31/42] vfio/iommufd: use IOMMU_IOAS_MAP_FILE > >Use IOMMU_IOAS_MAP_FILE when the mapped region is backed by a file. >Such a mapping can be preserved without modification during CPR, >because it depends on the file's address sp

RE: [PATCH V3 29/42] backends/iommufd: change process ioctl

2025-05-16 Thread Duan, Zhenzhong
>-Original Message- >From: Steve Sistare >Subject: [PATCH V3 29/42] backends/iommufd: change process ioctl > >Define the change process ioctl > >Signed-off-by: Steve Sistare >--- > backends/iommufd.c | 20 > backends/trace-events| 1 + > include/system/iom

RE: [PATCH V3 30/42] physmem: qemu_ram_get_fd_offset

2025-05-16 Thread Duan, Zhenzhong
>-Original Message- >From: Steve Sistare >Subject: [PATCH V3 30/42] physmem: qemu_ram_get_fd_offset > >Define qemu_ram_get_fd_offset, so CPR can map a memory region using >IOMMU_IOAS_MAP_FILE in a subsequent patch. > >Signed-off-by: Steve Sistare >Reviewed-by: Peter Xu Reviewed-by: Z

Re: [PATCH V3 18/42] vfio/pci: pass vector to virq functions

2025-05-16 Thread Cédric Le Goater
On 5/12/25 17:32, Steve Sistare wrote: Pass the vector number to vfio_connect_kvm_msi_virq and vfio_remove_kvm_msi_virq, so it can be passed to their subroutines in a subsequent patch. No functional change. Signed-off-by: Steve Sistare Reviewed-by: Cédric Le Goater Thanks, C. --- hw

Re: [PATCH V3 24/42] migration: close kvm after cpr

2025-05-16 Thread Cédric Le Goater
On 5/12/25 17:32, Steve Sistare wrote: cpr-transfer breaks vfio network connectivity to and from the guest, and the host system log shows: irq bypass consumer (token a03c32e5) registration fails: -16 which is EBUSY. This occurs because KVM descriptors are still open in the old QEMU pr

Re: [PATCH V3 16/42] vfio/pci: vfio_vector_init

2025-05-16 Thread Cédric Le Goater
On 5/12/25 17:32, Steve Sistare wrote: Extract a subroutine vfio_vector_init. No functional change. Signed-off-by: Steve Sistare --- hw/vfio/pci.c | 24 +--- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 4aa83b1..b46c4

Re: [PATCH V3 21/42] vfio/pci: export MSI functions

2025-05-16 Thread Cédric Le Goater
On 5/12/25 17:32, Steve Sistare wrote: Export various MSI functions, for use by CPR in subsequent patches. No functional change. Signed-off-by: Steve Sistare Please rename this routines with a 'vfio_pci' prefix. Thanks, C. --- hw/vfio/pci.c | 21 ++--- hw/vfio/pci.h

Re: [PATCH V3 20/42] vfio/pci: vfio_notifier_cleanup

2025-05-16 Thread Cédric Le Goater
On 5/12/25 17:32, Steve Sistare wrote: Move event_notifier_cleanup calls to a helper vfio_notifier_cleanup. This version is trivial, and does not yet use the vdev and nr parameters. No functional change. Signed-off-by: Steve Sistare Reviewed-by: Cédric Le Goater Thanks, C. ---

Re: [PATCH V3 19/42] vfio/pci: vfio_notifier_init cpr parameters

2025-05-16 Thread Cédric Le Goater
On 5/12/25 17:32, Steve Sistare wrote: Pass vdev and nr to vfio_notifier_init, for use by CPR in a subsequent patch. No functional change. Signed-off-by: Steve Sistare Reviewed-by: Cédric Le Goater Thanks, C. --- hw/vfio/pci.c | 22 ++ 1 file changed, 14 inserti

Re: [PATCH V3 17/42] vfio/pci: vfio_notifier_init

2025-05-16 Thread Cédric Le Goater
On 5/12/25 17:32, Steve Sistare wrote: Move event_notifier_init calls to a helper vfio_notifier_init. This version is trivial, but it will be expanded to support CPR in subsequent patches. No functional change. Signed-off-by: Steve Sistare --- hw/vfio/pci.c | 40 +

RE: [PATCH V3 28/42] backends/iommufd: iommufd_backend_map_file_dma

2025-05-16 Thread Duan, Zhenzhong
>-Original Message- >From: Steve Sistare >Subject: [PATCH V3 28/42] backends/iommufd: >iommufd_backend_map_file_dma > >Define iommufd_backend_map_file_dma to implement IOMMU_IOAS_MAP_FILE. >This will be called as a substitute for iommufd_backend_map_dma, so >the error conditions for BAR

RE: [PATCH V3 27/42] vfio: pass ramblock to vfio_container_dma_map

2025-05-16 Thread Duan, Zhenzhong
>-Original Message- >From: Steve Sistare >Subject: [PATCH V3 27/42] vfio: pass ramblock to vfio_container_dma_map > >Pass ramblock to vfio_container_dma_map for use in a subsequent patch. >The ramblock's attributes will be needed to map the block using >IOMMU_IOAS_MAP_FILE. No function

Re: [PATCH V2] vhost: Don't set vring call if guest notifier is unused

2025-05-16 Thread Stefano Garzarella
On Tue, May 13, 2025 at 07:28:25PM +0800, oen...@gmail.com wrote: From: Huaitong Han The vring call fd is set even when the guest does not use MSI-X (e.g., in the case of virtio PMD), leading to unnecessary CPU overhead for processing interrupts. The commit 96a3d98d2c("vhost: don't set vring c

Re: [PATCH V3 14/42] pci: skip reset during cpr

2025-05-16 Thread Cédric Le Goater
On 5/12/25 17:32, Steve Sistare wrote: Do not reset a vfio-pci device during CPR. Signed-off-by: Steve Sistare --- hw/pci/pci.c | 13 + 1 file changed, 13 insertions(+) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index fe38c4c..2ba2e0f 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @

Re: [PATCH V3 11/42] vfio/container: mdev cpr blocker

2025-05-16 Thread Cédric Le Goater
On 5/12/25 17:32, Steve Sistare wrote: During CPR, after VFIO_DMA_UNMAP_FLAG_VADDR, the vaddr is temporarily invalid, so mediated devices cannot be supported. Add a blocker for them. This restriction will not apply to iommufd containers when CPR is added for them in a future patch. Signed-off-b

Re: [PATCH v2 19/20] amd_iommu: Do not assume passthrough translation when DTE[TV]=0

2025-05-16 Thread Sairaj Kodilkar
On 5/15/2025 3:19 AM, Alejandro Jimenez wrote: On 5/12/25 3:00 AM, Sairaj Kodilkar wrote: On 5/2/2025 7:46 AM, Alejandro Jimenez wrote: -    if (pte & AMDVI_DEV_TRANSLATION_VALID) { -    level = get_pte_translation_mode(pte); -    if (level >= 7) { -    trace_amdvi_mode

Re: [PATCH v2 00/20] AMD vIOMMU: DMA remapping support for VFIO devices

2025-05-16 Thread Sairaj Kodilkar
On 5/2/2025 7:45 AM, Alejandro Jimenez wrote: This series adds support for guests using the AMD vIOMMU to enable DMA remapping for VFIO devices. In addition to the currently supported passthrough (PT) mode, guest kernels are now able to to provide DMA address translation and access permission

  1   2   >