Re: [PATCH V2 2/2] vfio/pci: preserve pending interrupts

2025-07-18 Thread Steven Sistare
On 7/16/2025 10:43 PM, Duan, Zhenzhong wrote: -Original Message- From: Steve Sistare Subject: [PATCH V2 2/2] vfio/pci: preserve pending interrupts cpr-transfer may lose a VFIO interrupt because the KVM instance is destroyed and recreated. If an interrupt arrives in the middle, it is dr

Re: [RFC V2 0/8] Live update: tap and vhost

2025-07-18 Thread Steven Sistare
On 7/18/2025 4:48 AM, Lei Yang wrote: Hi Steve I tested your patch which hit a problem under enable/disable nic mq state(The full test scenario is live migration vm at local under enable/disable vm nic mq state): Run command: /qemu-img info /home/images/vm1.qcow2 --output=json Error info: qemu-i

Re: [PATCH V1 2/2] vfio/pci: preserve pending interrupts

2025-07-16 Thread Steven Sistare
OK on all. Patch V2 coming shortly - steve On 7/16/2025 8:40 AM, Cédric Le Goater wrote: On 7/14/25 16:27, Steve Sistare wrote: cpr-transfer may lose a VFIO interrupt because the KVM instance is destroyed and recreated.  If an interrupt arrives in the middle, it is dropped.  To fix, disable pe

Re: [PATCH V1 2/2] hw/intc/arm_gicv3_kvm: preserve pending interrupts during cpr

2025-07-16 Thread Steven Sistare
On 7/14/2025 10:51 AM, Steven Sistare wrote: On 7/14/2025 10:32 AM, Peter Maydell wrote: On Mon, 14 Jul 2025 at 15:29, Steve Sistare wrote: Close a race condition that causes cpr-transfer to lose VFIO interrupts on ARM. CPR stops VCPUs but does not disable VFIO interrupts, which may

Re: [PATCH 18/22] vfio/cpr.c: use QOM casts where appropriate

2025-07-15 Thread Steven Sistare
On 7/15/2025 5:25 AM, Mark Cave-Ayland wrote: Use QOM casts to convert between VFIOPCIDevice and PCIDevice instead of accessing pdev directly. Signed-off-by: Mark Cave-Ayland Reviewed-by: Steve Sistare

Re: [PATCH 22/22] vfio/pci.h: rename VFIOPCIDevice pdev field to parent_obj

2025-07-15 Thread Steven Sistare
On 7/15/2025 5:26 AM, Mark Cave-Ayland wrote: Now that nothing accesses the pdev field directly, rename pdev to parent_obj as per our current coding guidelines. Signed-off-by: Mark Cave-Ayland Reviewed-by: Steve Sistare

Re: [PATCH 03/22] hw/vfio/cpr-legacy.c: use QOM casts where appropriate

2025-07-15 Thread Steven Sistare
On 7/15/2025 5:25 AM, Mark Cave-Ayland wrote: Use QOM casts to convert between VFIOContainer and VFIOContainerBase instead of accessing bcontainer directly. Signed-off-by: Mark Cave-Ayland Reviewed-by: Steve Sistare

Re: [PATCH V1] vfio: fix sub-page bar after cpr

2025-07-15 Thread Steven Sistare
On 7/15/2025 2:32 AM, Duan, Zhenzhong wrote: -Original Message- From: Steve Sistare Subject: [PATCH V1] vfio: fix sub-page bar after cpr Regions for sub-page BARs are normally mapped here, in response to the guest writing to PCI config space: vfio_pci_write_config() pci_default_w

Re: [PATCH 59/59] vfio: fix sub-page bar after cpr

2025-07-14 Thread Steven Sistare
I will resend this to fix the subject line - steve On 7/14/2025 3:07 PM, Steve Sistare wrote: Regions for sub-page BARs are normally mapped here, in response to the guest writing to PCI config space: vfio_pci_write_config() pci_default_write_config() pci_update_mappings()

Re: [PATCH V1 2/2] hw/intc/arm_gicv3_kvm: preserve pending interrupts during cpr

2025-07-14 Thread Steven Sistare
On 7/14/2025 10:32 AM, Peter Maydell wrote: On Mon, 14 Jul 2025 at 15:29, Steve Sistare wrote: Close a race condition that causes cpr-transfer to lose VFIO interrupts on ARM. CPR stops VCPUs but does not disable VFIO interrupts, which may continue to arrive throughout the transition to new QE

Re: [PATCH V4 2/3] python: use qom-list-get

2025-07-11 Thread Steven Sistare
On 7/11/2025 12:50 PM, Markus Armbruster wrote: Steven Sistare writes: On 7/11/2025 10:47 AM, Markus Armbruster wrote: Steve Sistare writes: Use qom-list-get to speed up the qom-tree command. Signed-off-by: Steve Sistare Quick test... Differences in output before and after match

Re: [PATCH V4 0/3] fast qom tree get

2025-07-11 Thread Steven Sistare
On 7/11/2025 11:06 AM, Markus Armbruster wrote: This feels ready. Have a look at my (few) comments, and tell me what you think. Happy to apply finishing touches in my tree, without another respin. Thanks your your patience! I'll send V5 with the final changes. Thank you for your time Markus

Re: [PATCH V4 2/3] python: use qom-list-get

2025-07-11 Thread Steven Sistare
On 7/11/2025 10:47 AM, Markus Armbruster wrote: Steve Sistare writes: Use qom-list-get to speed up the qom-tree command. Signed-off-by: Steve Sistare Quick test... Differences in output before and after match expectations (see appended diff). New version: real0m0.446s user

Re: [PATCH V4 3/3] tests/qtest/qom-test: unit test for qom-list-getv

2025-07-11 Thread Steven Sistare
On 7/11/2025 11:02 AM, Markus Armbruster wrote: Steve Sistare writes: Add a unit test for qom-list-getv. qom-list-get here and in subject. Could scratch this line, subject suffices. Doh, I missed it. Will fix. (re)names are hard :) Signed-off-by: Steve Sistare Reviewed-by: Philippe M

Re: [PATCH V4 1/3] qom: qom-list-get

2025-07-11 Thread Steven Sistare
On 7/11/2025 10:35 AM, Markus Armbruster wrote: Steve Sistare writes: Define the qom-list-get command, which fetches all the properties and values for a list of paths. This is faster than qom-list plus qom-get, especially when fetching a large subset of the QOM tree. Some managers do so when

Re: [PATCH V3 3/3] tests/qtest/qom-test: unit test for qom-list-getv

2025-07-10 Thread Steven Sistare
On 7/10/2025 4:54 AM, Markus Armbruster wrote: Steven Sistare writes: On 7/8/2025 6:02 PM, Philippe Mathieu-Daudé wrote: Hi Steve, On 8/7/25 19:24, Steve Sistare wrote: Add a unit test for qom-list-getv. Signed-off-by: Steve Sistare ---   tests/qtest/qom-test.c | 64

Re: [PATCH V3 1/3] qom: qom-list-getv

2025-07-09 Thread Steven Sistare
On 7/9/2025 4:39 AM, Markus Armbruster wrote: Steve Sistare writes: Define the qom-list-getv command, which fetches all the properties and values for a list of paths. This is faster than qom-tree-get when fetching a subset of the QOM tree. See qom.json for details. Signed-off-by: Steve Sist

Re: [PATCH V3 3/3] tests/qtest/qom-test: unit test for qom-list-getv

2025-07-09 Thread Steven Sistare
On 7/8/2025 6:02 PM, Philippe Mathieu-Daudé wrote: Hi Steve, On 8/7/25 19:24, Steve Sistare wrote: Add a unit test for qom-list-getv. Signed-off-by: Steve Sistare ---   tests/qtest/qom-test.c | 64 ++   1 file changed, 64 insertions(+) diff --gi

Re: [PATCH V2 1/5] qom: qom-tree-get

2025-07-08 Thread Steven Sistare
On 7/8/2025 3:14 AM, Philippe Mathieu-Daudé wrote: On 12/5/25 15:47, Steve Sistare wrote: Define the qom-tree-get QAPI command, which fetches an entire tree of properties and values with a single QAPI call.  This is much faster than using qom-list plus qom-get for every node and property of the

Re: [PATCH V2 0/5] fast qom tree get

2025-07-07 Thread Steven Sistare
On 7/4/2025 8:26 AM, Markus Armbruster wrote: Steve Sistare writes: Using qom-list and qom-get to get all the nodes and property values in a QOM tree can take multiple seconds because it requires 1000's of individual QOM requests. Some managers fetch the entire tree or a large subset of it wh

Re: [PATCH V2 1/5] qom: qom-tree-get

2025-07-07 Thread Steven Sistare
On 7/4/2025 8:22 AM, Markus Armbruster wrote: Steve Sistare writes: Define the qom-tree-get QAPI command, which fetches an entire tree of properties and values with a single QAPI call. This is much faster than using qom-list plus qom-get for every node and property of the tree. See qom.json

Re: [PATCH V2 4/5] qom: qom-list-getv

2025-07-07 Thread Steven Sistare
On 7/4/2025 8:22 AM, Markus Armbruster wrote: Steve Sistare writes: Define the qom-list-getv command, which fetches all the properties and values for a list of paths. This is faster than qom-tree-get when fetching a subset of the QOM tree. See qom.json for details. Signed-off-by: Steve Sist

Re: [PATCH V2 0/5] fast qom tree get

2025-07-07 Thread Steven Sistare
On 7/4/2025 8:33 AM, Markus Armbruster wrote: Steve, My sincere apologies for the long, long delay. It wasn't just for the usual reasons. It was also because I had a vague feeling of unease about qom-tree, and had trouble figuring out why. I'll try do your work justice before the window for 1

Re: [PATCH V5 20/38] migration: close kvm after cpr

2025-07-07 Thread Steven Sistare
On 7/3/2025 5:58 PM, Peter Xu wrote: On Thu, Jul 03, 2025 at 11:21:38PM +0200, Cédric Le Goater wrote: On 7/3/25 21:45, Peter Xu wrote: On Wed, Jul 02, 2025 at 03:41:08PM -0400, Steven Sistare wrote: The irq producer is not closed, but it is detached from the kvm consumer. It's event

Re: [PATCH V6 03/21] migration: close kvm after cpr

2025-07-07 Thread Steven Sistare
On 7/4/2025 5:50 AM, Duan, Zhenzhong wrote: -Original Message- From: Steven Sistare Subject: Re: [PATCH V6 03/21] migration: close kvm after cpr cc Paolo. After incorporating Peter's feedback, IMO this version reads well: * kvm exports kvm_close * vfio ex

Re: [PATCH V6 03/21] migration: close kvm after cpr

2025-07-02 Thread Steven Sistare
cc Paolo. After incorporating Peter's feedback, IMO this version reads well: * kvm exports kvm_close * vfio exports vfio_kvm_device_close * vfio-cpr registers a notifier that calls vfio_kvm_device_close - Steve On 7/2/2025 5:58 PM, Steve Sistare wrote: cpr-transfer breaks vfio network co

Re: [PATCH V5 35/38] vfio/iommufd: change process

2025-07-02 Thread Steven Sistare
On 7/2/2025 9:46 AM, Duan, Zhenzhong wrote: -Original Message- From: Steven Sistare Subject: Re: [PATCH V5 35/38] vfio/iommufd: change process On 6/25/2025 7:40 AM, Duan, Zhenzhong wrote: -Original Message- From: Steve Sistare Subject: [PATCH V5 35/38] vfio/iommufd: change

Re: [PATCH V5 20/38] migration: close kvm after cpr

2025-07-02 Thread Steven Sistare
On 7/2/2025 12:02 PM, Peter Xu wrote: On Tue, Jul 01, 2025 at 11:25:23AM -0400, Steven Sistare wrote: Hi Paolo, Peter, Fabiano, This patch needs review. CPR for vfio is broken without it. Soft feature freeze July 15. Sorry to not have tried looking at this more even if this is marked

Re: [PATCH V5 19/38] vfio-pci: preserve INTx

2025-07-02 Thread Steven Sistare
On 7/2/2025 11:23 AM, Cédric Le Goater wrote: On 6/10/25 17:39, Steve Sistare wrote: Preserve vfio INTx state across cpr-transfer.  Preserve VFIOINTx fields as follows:    pin : Recover this from the vfio config in kernel space    interrupt : Preserve its eventfd descriptor across exec.    unmas

Re: [PATCH V5 18/38] vfio-pci: preserve MSI

2025-07-02 Thread Steven Sistare
On 7/2/2025 11:35 AM, Cédric Le Goater wrote: On 6/10/25 17:39, Steve Sistare wrote: Save the MSI message area as part of vfio-pci vmstate, and preserve the interrupt and notifier eventfd's.  migrate_incoming loads the MSI data, then the vfio-pci post_load handler finds the eventfds in CPR state

Re: [PATCH V5 30/38] migration: vfio cpr state hook

2025-07-02 Thread Steven Sistare
On 7/2/2025 9:39 AM, Duan, Zhenzhong wrote: -Original Message- From: Steven Sistare Subject: Re: [PATCH V5 30/38] migration: vfio cpr state hook On 6/24/2025 7:24 AM, Duan, Zhenzhong wrote: -Original Message- From: Steve Sistare Subject: [PATCH V5 30/38] migration: vfio cpr

Re: [PATCH V5 29/38] vfio/iommufd: register container for cpr

2025-07-02 Thread Steven Sistare
On 7/2/2025 10:17 AM, Duan, Zhenzhong wrote: -Original Message- From: Steve Sistare Subject: [PATCH V5 29/38] 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

Re: [PATCH V5 38/38] vfio: doc changes for cpr

2025-07-02 Thread Steven Sistare
Peter or Fabiano, this patch needs review. It's trivial. - Steve On 6/10/2025 11:39 AM, Steve Sistare wrote: Update documentation to say that cpr-transfer supports vfio and iommufd. Signed-off-by: Steve Sistare --- docs/devel/migration/CPR.rst | 5 ++--- qapi/migration.json | 6 +

Re: [PATCH] vfio-user: do not register vfio-user container with cpr

2025-07-02 Thread Steven Sistare
On 7/2/2025 9:30 AM, Mark Cave-Ayland wrote: On 02/07/2025 14:24, Steven Sistare wrote: On 7/2/2025 9:21 AM, Mark Cave-Ayland wrote: On 02/07/2025 13:07, Steven Sistare wrote: On 7/2/2025 7:59 AM, Mark Cave-Ayland wrote: As the full cpr implementation is yet to be merged upstream, do not

Re: [PATCH] vfio-user: do not register vfio-user container with cpr

2025-07-02 Thread Steven Sistare
On 7/2/2025 9:21 AM, Mark Cave-Ayland wrote: On 02/07/2025 13:07, Steven Sistare wrote: On 7/2/2025 7:59 AM, Mark Cave-Ayland wrote: As the full cpr implementation is yet to be merged upstream, do not register the vfio-user container with cpr. Full vfio-user support for cpr can be merged

Re: [PATCH] vfio-user: do not register vfio-user container with cpr

2025-07-02 Thread Steven Sistare
On 7/2/2025 7:59 AM, Mark Cave-Ayland wrote: As the full cpr implementation is yet to be merged upstream, do not register the vfio-user container with cpr. Full vfio-user support for cpr can be merged later as a follow-up series. Signed-off-by: Mark Cave-Ayland This is fine, or I could drop m

Re: [PATCH V5 18/38] vfio-pci: preserve MSI

2025-07-02 Thread Steven Sistare
On 7/2/2025 3:17 AM, Cédric Le Goater wrote: Hello Steve, On 7/1/25 18:12, Steven Sistare wrote: Hi Cedric, what do we need to do to get this patch in, and the patch "preserve INTx"? Just review, or are there conflicts to resolve? I haven't looked at it yet. I will before

Re: [PATCH V5 20/38] migration: close kvm after cpr

2025-07-01 Thread Steven Sistare
Hi Paolo, Peter, Fabiano, This patch needs review. CPR for vfio is broken without it. Soft feature freeze July 15. - Steve On 6/10/2025 11:39 AM, Steve Sistare wrote: cpr-transfer breaks vfio network connectivity to and from the guest, and the host system log shows: irq bypass consumer (to

Re: [PATCH V5 18/38] vfio-pci: preserve MSI

2025-07-01 Thread Steven Sistare
Hi Cedric, what do we need to do to get this patch in, and the patch "preserve INTx"? Just review, or are there conflicts to resolve? - Steve On 6/10/2025 11:39 AM, Steve Sistare wrote: Save the MSI message area as part of vfio-pci vmstate, and preserve the interrupt and notifier eventfd's. m

Re: [PATCH V5 32/38] vfio/iommufd: preserve descriptors

2025-07-01 Thread Steven Sistare
On 6/25/2025 7:40 AM, Duan, Zhenzhong wrote: -Original Message- From: Steve Sistare Subject: [PATCH V5 32/38] 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. Signed-off-by:

Re: [PATCH V5 30/38] migration: vfio cpr state hook

2025-07-01 Thread Steven Sistare
On 6/24/2025 7:24 AM, Duan, Zhenzhong wrote: -Original Message- From: Steve Sistare Subject: [PATCH V5 30/38] migration: vfio cpr state hook Define a list of vfio devices in CPR state, in a subsection so that older QEMU can be live updated to this version. However, new QEMU will not be

Re: [PATCH V5 04/38] vfio/container: preserve descriptors

2025-07-01 Thread Steven Sistare
On 6/23/2025 5:07 AM, Duan, Zhenzhong wrote: -Original Message- From: Steve Sistare Subject: [PATCH V5 04/38] vfio/container: preserve descriptors At vfio creation time, save the value of vfio container, group, and device descriptors in CPR state. On qemu restart, vfio_realize() finds

Re: [PATCH V5 35/38] vfio/iommufd: change process

2025-07-01 Thread Steven Sistare
On 6/25/2025 7:40 AM, Duan, Zhenzhong wrote: -Original Message- From: Steve Sistare Subject: [PATCH V5 35/38] vfio/iommufd: change process Finish CPR by change the owning process of the iommufd device in post load. Signed-off-by: Steve Sistare --- hw/vfio/cpr-iommufd.c | 30 ++

Re: [PATCH V5 33/38] vfio/iommufd: reconstruct device

2025-07-01 Thread Steven Sistare
On 6/25/2025 7:40 AM, Duan, Zhenzhong wrote: -Original Message- From: Steve Sistare Subject: [PATCH V5 33/38] 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 ol

Re: [PATCH V5 27/38] vfio/iommufd: add vfio_device_free_name

2025-07-01 Thread Steven Sistare
On 6/23/2025 9:50 AM, Eric Farman wrote: On Tue, 2025-06-10 at 08:39 -0700, Steve Sistare wrote: Define vfio_device_free_name to free the name created by vfio_device_get_name. A subsequent patch will do more there. No functional change. Signed-off-by: Steve Sistare --- include/hw/vfio/vfio-

Re: [PATCH V5 29/38] vfio/iommufd: register container for cpr

2025-07-01 Thread Steven Sistare
Hi Zhenzhong, this is the only iommufd patch you have not reviewed yet - steve On 6/10/2025 11:39 AM, Steve Sistare wrote: 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

Re: [PATCH V5 31/38] vfio/iommufd: cpr state

2025-07-01 Thread Steven Sistare
On 6/23/2025 6:45 AM, Duan, Zhenzhong wrote: -Original Message- From: Steve Sistare Subject: [PATCH V5 31/38] vfio/iommufd: cpr state VFIO iommufd devices will need access to ioas_id, devid, and hwpt_id in new QEMU at realize time, so add them to CPR state. Define CprVFIODevice as the

Re: [PATCH v2 2/2] vfio/container: Fix vfio_container_post_load()

2025-06-27 Thread Steven Sistare
On 6/27/2025 2:33 AM, Zhenzhong Duan wrote: When there are multiple VFIO containers, vioc->dma_map is restored multiple times, this made only first container work and remaining containers using vioc->dma_map restored by first container. Fix it by save and restore vioc->dma_map locally. saved_dma

Re: [PATCH v2 1/2] vfio/container: Fix potential SIGSEGV when recover from unmap-all-vaddr failure

2025-06-27 Thread Steven Sistare
vaddr failure") Suggested-by: Steven Sistare Signed-off-by: Zhenzhong Duan --- hw/vfio/cpr-legacy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/vfio/cpr-legacy.c b/hw/vfio/cpr-legacy.c index a84c3247b7..0a5d1bd480 100644 --- a/hw/vfio/cpr-legacy.c +++ b/h

Re: [PATCH 4/4] vfio/container: Fix vfio_container_post_load()

2025-06-26 Thread Steven Sistare
On 6/23/2025 6:22 AM, Zhenzhong Duan wrote: When there are multiple VFIO containers, vioc->dma_map is restored multiple times, this made only first container work and remaining containers using vioc->dma_map restored by first container. Fix it by save and restore vioc->dma_map locally. saved_dma

Re: [PATCH 3/4] vfio/container: Fix potential SIGSEGV when recover from unmap-all-vaddr failure

2025-06-26 Thread Steven Sistare
On 6/26/2025 8:53 AM, Steven Sistare wrote: On 6/24/2025 12:54 PM, Cédric Le Goater wrote: On 6/23/25 12:22, Zhenzhong Duan wrote: cpr.saved_dma_map isn't initialized in source qemu which lead to vioc->dma_map assigned a NULL value, this will trigger SIGSEGV. I don't understand

Re: [PATCH 3/4] vfio/container: Fix potential SIGSEGV when recover from unmap-all-vaddr failure

2025-06-26 Thread Steven Sistare
On 6/24/2025 12:54 PM, Cédric Le Goater wrote: On 6/23/25 12:22, Zhenzhong Duan wrote: cpr.saved_dma_map isn't initialized in source qemu which lead to vioc->dma_map assigned a NULL value, this will trigger SIGSEGV. I don't understand the scenario. Could you please explain more ? Thank you Z

Re: [PATCH v4 1/2] tests/migration: Setup pre-listened cpr.sock to remove race-condition.

2025-06-12 Thread Steven Sistare
On 6/11/2025 4:56 PM, Jaehoon Kim wrote: When the source VM attempts to connect to the destination VM's Unix domain socket (cpr.sock) during a cpr-transfer test, race conditions can occur if the socket file isn't ready. This can lead to connection failures when running tests. This patch creates

Re: [PATCH V5 00/38] Live update: vfio and iommufd

2025-06-11 Thread Steven Sistare
On 6/11/2025 10:25 AM, Cédric Le Goater wrote: On 6/10/25 19:39, Cédric Le Goater wrote: Steve, For the next vfio PR, I plan to take patches 1-17 when patch 10 is updated. The rest is for later in this cycle Applied 1-17 to vfio-next. Waiting for an Ack from Michael. I am planing to send a

Re: [PATCH v3 2/2] migration: Support fd-based socket address in cpr_transfer_input

2025-06-11 Thread Steven Sistare
On 6/10/2025 6:33 PM, Jaehoon Kim wrote: Extend cpr_transfer_input to handle SOCKET_ADDRESS_TYPE_FD alongside SOCKET_ADDRESS_TYPE_UNIX. This change supports the use of pre-listened socket file descriptors for cpr migration channels. This change is particularly useful in qtest environments, where

Re: [PATCH v3 1/2] tests/migration: Setup pre-listened cpr.sock to remove race-condition.

2025-06-11 Thread Steven Sistare
On 6/11/2025 8:08 AM, Fabiano Rosas wrote: Jaehoon Kim writes: Hi, These patches should be the other way around, first add the support, then add the test. When the source VM attempts to connect to the destination VM's Unix domain socket (cpr.sock) during a cpr-transfer test, race conditions

Re: [PATCH V4 16/43] pci: skip reset during cpr

2025-06-10 Thread Steven Sistare
On 6/10/2025 12:31 PM, Michael S. Tsirkin wrote: On Wed, Jun 04, 2025 at 03:48:40PM +0200, Cédric Le Goater wrote: I don't see any advantage to making this a class attribute.  I looked for examples of using such attributes for vfio to configure pci, and found very little.  It sounds like overki

Re: [PATCH V4 16/43] pci: skip reset during cpr

2025-06-10 Thread Steven Sistare
On 6/10/2025 1:11 PM, Cédric Le Goater wrote: On 6/10/25 19:05, Steven Sistare wrote: On 6/10/2025 12:31 PM, Michael S. Tsirkin wrote: On Wed, Jun 04, 2025 at 03:48:40PM +0200, Cédric Le Goater wrote: I don't see any advantage to making this a class attribute.  I looked for examples of

Re: [PATCH v2] migration: Setup pre-listened cpr.sock to remove race-condition.

2025-06-10 Thread Steven Sistare
On 6/10/2025 11:08 AM, Jaehoon Kim wrote: When the source VM attempts to connect to the destination VM's Unix domain socket (cpr.sock) during a cpr-transfer test, race conditions can occur if the socket file isn't ready. This can lead to connection failures when running tests. This patch creates

Re: [PATCH V4 35/43] vfio/iommufd: register container for cpr

2025-06-09 Thread Steven Sistare
On 6/9/2025 4:30 PM, Cédric Le Goater wrote: On 5/29/25 21:24, Steve Sistare wrote: 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 not support IOMMU_IOAS_CHANGE_PROCESS.

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

2025-06-09 Thread Steven Sistare
On 6/9/2025 9:20 AM, Daniel P. Berrangé wrote: On Mon, Jun 09, 2025 at 09:12:27AM -0400, Steven Sistare wrote: On 6/9/2025 4:06 AM, Daniel P. Berrangé wrote: On Fri, Jun 06, 2025 at 03:37:56PM -0400, Steven Sistare wrote: The easiest solution, with no interface changes, is adding

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

2025-06-09 Thread Steven Sistare
On 6/9/2025 4:06 AM, Daniel P. Berrangé wrote: On Fri, Jun 06, 2025 at 03:37:56PM -0400, Steven Sistare wrote: 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

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

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

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 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) d

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

2025-06-06 Thread Steven Sistare
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 transfer, the socket file might not yet be exist if the destination side hasn't compl

Re: [PATCH V4 04/43] vfio/pci: vfio_pci_put_device on failure

2025-06-05 Thread Steven Sistare
On 6/4/2025 11:02 PM, Duan, Zhenzhong wrote: -Original Message- From: Steven Sistare Subject: Re: [PATCH V4 04/43] vfio/pci: vfio_pci_put_device on failure On 6/3/2025 11:55 PM, Duan, Zhenzhong wrote: -Original Message- From: Steven Sistare Subject: Re: [PATCH V4 04/43] vfio

Re: [PATCH V4 04/43] vfio/pci: vfio_pci_put_device on failure

2025-06-04 Thread Steven Sistare
On 6/3/2025 11:55 PM, Duan, Zhenzhong wrote: -Original Message- From: Steven Sistare Subject: Re: [PATCH V4 04/43] vfio/pci: vfio_pci_put_device on failure On 6/3/2025 6:40 AM, Duan, Zhenzhong wrote: -Original Message- From: Steve Sistare Subject: [PATCH V4 04/43] vfio/pci

Re: [PATCH V4 16/43] pci: skip reset during cpr

2025-06-04 Thread Steven Sistare
On 6/4/2025 7:59 AM, Cédric Le Goater wrote: On 6/4/25 09:09, Cédric Le Goater wrote: On 6/2/25 14:36, Steven Sistare wrote: On 6/1/2025 3:07 PM, Michael S. Tsirkin wrote: On Sun, Jun 01, 2025 at 06:38:43PM +0200, Cédric Le Goater wrote: On 5/29/25 21:24, Steve Sistare wrote: Do not reset a

Re: [PATCH V4 09/43] vfio/container: register container for cpr

2025-06-03 Thread Steven Sistare
On 6/3/2025 10:09 AM, Steven Sistare wrote: On 6/3/2025 7:57 AM, Duan, Zhenzhong wrote: -Original Message- From: Steve Sistare Subject: [PATCH V4 09/43] vfio/container: register container for cpr Register a legacy container for cpr-transfer, replacing the generic CPR register call

Re: [PATCH V4 04/43] vfio/pci: vfio_pci_put_device on failure

2025-06-03 Thread Steven Sistare
On 6/3/2025 6:40 AM, Duan, Zhenzhong wrote: -Original Message- From: Steve Sistare Subject: [PATCH V4 04/43] vfio/pci: vfio_pci_put_device on failure If vfio_realize fails after vfio_device_attach, it should call vfio_device_detach during error recovery. If it fails after vfio_device_g

Re: [PATCH V4 09/43] vfio/container: register container for cpr

2025-06-03 Thread Steven Sistare
On 6/3/2025 7:57 AM, Duan, Zhenzhong wrote: -Original Message- From: Steve Sistare Subject: [PATCH V4 09/43] vfio/container: register container for cpr Register a legacy container for cpr-transfer, replacing the generic CPR register call with a more specific legacy container register ca

Re: [PATCH V4 00/43] Live update: vfio and iommufd

2025-06-03 Thread Steven Sistare
On 6/3/2025 8:09 AM, Duan, Zhenzhong wrote: -Original Message- From: Steve Sistare Subject: [PATCH V4 00/43] Live update: vfio and iommufd Support vfio and iommufd devices with the cpr-transfer live migration mode. Devices that do not support live migration can still support cpr-transfe

Re: [PATCH V4 00/43] Live update: vfio and iommufd

2025-06-02 Thread Steven Sistare
On 6/1/2025 1:26 PM, Cédric Le Goater wrote: On 5/29/25 21:23, 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 hos

Re: [PATCH V4 16/43] pci: skip reset during cpr

2025-06-02 Thread Steven Sistare
On 6/1/2025 3:07 PM, Michael S. Tsirkin wrote: On Sun, Jun 01, 2025 at 06:38:43PM +0200, Cédric Le Goater wrote: On 5/29/25 21:24, Steve Sistare wrote: Do not reset a vfio-pci device during CPR. Signed-off-by: Steve Sistare --- include/hw/pci/pci_device.h | 3 +++ hw/pci/pci.c

Re: [PATCH V3 22/42] vfio-pci: preserve MSI

2025-05-28 Thread Steven Sistare
Hi Cedric, Do you have any comments on this before I send V4? Ditto for patch "vfio-pci: preserve INTx". In both, I made the changes you requested in V2. And I will change all "reused" tests to cpr_is_incoming as we discussed elsewhere. You mentioned these possibly conflict with vfio-user, but

Re: [PATCH v2 06/29] vfio: enable per-IRQ MSI-X masking

2025-05-28 Thread Steven Sistare
On 5/21/2025 3:29 AM, Cédric Le Goater wrote: +Sẗeven On 5/20/25 17:03, John Levon wrote: 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

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

2025-05-28 Thread Steven Sistare
On 5/27/2025 5:03 PM, Michael S. Tsirkin wrote: On Tue, May 27, 2025 at 04:42:16PM -0400, Steven Sistare wrote: On 5/24/2025 5:34 AM, Michael S. Tsirkin wrote: On Fri, May 16, 2025 at 10:19:09AM +0200, Cédric Le Goater wrote: On 5/12/25 17:32, Steve Sistare wrote: Do not reset a vfio-pci

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

2025-05-28 Thread Steven Sistare
On 5/25/2025 10:31 PM, Duan, Zhenzhong wrote: -Original Message- From: Steven Sistare Subject: Re: [PATCH V3 29/42] backends/iommufd: change process ioctl On 5/23/2025 10:56 AM, Steven Sistare wrote: On 5/23/2025 4:56 AM, Duan, Zhenzhong wrote: -Original Message- From: Steven

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

2025-05-27 Thread Steven Sistare
On 5/24/2025 5:34 AM, Michael S. Tsirkin wrote: On Fri, May 16, 2025 at 10:19:09AM +0200, 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 inse

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

2025-05-23 Thread Steven Sistare
On 5/23/2025 10:56 AM, Steven Sistare wrote: On 5/23/2025 4:56 AM, Duan, Zhenzhong wrote: -Original Message- From: Steven Sistare Subject: Re: [PATCH V3 29/42] backends/iommufd: change process ioctl On 5/21/2025 11:19 PM, Duan, Zhenzhong wrote: -Original Message- From: Steven

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

2025-05-23 Thread Steven Sistare
On 5/19/2025 11:55 AM, Steven Sistare wrote: On 5/16/2025 4:55 AM, Duan, Zhenzhong wrote: -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

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

2025-05-23 Thread Steven Sistare
On 5/23/2025 4:56 AM, Duan, Zhenzhong wrote: -Original Message- From: Steven Sistare Subject: Re: [PATCH V3 29/42] backends/iommufd: change process ioctl On 5/21/2025 11:19 PM, Duan, Zhenzhong wrote: -Original Message- From: Steven Sistare Subject: Re: [PATCH V3 29/42

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

2025-05-23 Thread Steven Sistare
On 5/23/2025 2:24 AM, Cédric Le Goater wrote: On 5/22/25 19:30, Steven Sistare wrote: On 5/22/2025 1:20 PM, Cédric Le Goater wrote: On 5/21/25 23:55, John Levon wrote: Pass through the MemoryRegion to DMA operation handlers of vfio containers. The vfio-user container will need this later, to

[PATCH v5 4/6] hw/arm/aspeed_ast27x0-fc: Map ca35 memory into system memory

2025-05-23 Thread Steven Lee via
Map the CA35 memory region as a subregion of system_memory to ensure a valid FlatView. This prevents failures in APIs that rely on the global memory view, such as rom_check_and_register_reset(). Signed-off-by: Steven Lee Reviewed-by: Cédric Le Goater --- hw/arm/aspeed_ast27x0-fc.c | 1 + 1

[PATCH v5 1/6] hw/arm/aspeed_ast2700-fc: Add network support

2025-05-23 Thread Steven Lee via
This patch adds network support to the ast2700fc machine by initializing the NIC device in the ca35. Signed-off-by: Steven Lee --- hw/arm/aspeed_ast27x0-fc.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/hw/arm/aspeed_ast27x0-fc.c b/hw/arm/aspeed_ast27x0-fc.c index 125a3ade40

[PATCH v5 3/6] hw/arm/aspeed_ast27x0: Fix unimplemented region overlap with vbootrom

2025-05-23 Thread Steven Lee via
a safeguard. Signed-off-by: Steven Lee Reviewed-by: Cédric Le Goater --- hw/arm/aspeed_ast27x0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/arm/aspeed_ast27x0.c b/hw/arm/aspeed_ast27x0.c index 1974a25766..bb61c30cf4 100644 --- a/hw/arm/aspeed_ast27x0.c +++ b/hw

[PATCH v5 6/6] docs: Remove ast2700fc from Aspeed family boards

2025-05-23 Thread Steven Lee via
The ast2700fc machine is now covered in the dedicated ast2700-evb section. Listing it in the general Aspeed board family list is redundant. Signed-off-by: Steven Lee Reviewed-by: Cédric Le Goater --- docs/system/arm/aspeed.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH v5 0/6] hw/arm/aspeed_ast2700-fc: Fix null pointer dereference

2025-05-23 Thread Steven Lee via
e for the first patch to: "hw/arm/aspeed_ast2700-fc: Add network support". Steven Lee (6): hw/arm/aspeed_ast2700-fc: Add network support hw/arm/aspeed_ast2700-fc: Reduce ca35 ram size to align with ast2700a1 hw/arm/aspeed_ast27x0: Fix unimplemented region overlap with vbootrom hw/ar

[PATCH v5 2/6] hw/arm/aspeed_ast2700-fc: Reduce ca35 ram size to align with ast2700a1

2025-05-23 Thread Steven Lee via
Reduce ca35 ram size from 2GiB to 1GiB to align with ast2700a1-evb, where the ram-container is defined as 1GiB in its class. Signed-off-by: Steven Lee Reviewed-by: Cédric Le Goater --- hw/arm/aspeed_ast27x0-fc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/arm

[PATCH v5 5/6] hw/arm/fby35: Map BMC memory into system memory

2025-05-23 Thread Steven Lee via
Add the BMC memory region as a subregion of system_memory so that modules relying on system memory can operate correctly. Signed-off-by: Steven Lee Reviewed-by: Cédric Le Goater --- hw/arm/fby35.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/arm/fby35.c b/hw/arm/fby35.c index

RE: [PATCH v4 1/6] hw/arm/aspeed_ast2700-fc: Fix null pointer dereference in ca35 init

2025-05-23 Thread Steven Lee
Hi Cédric, > -Original Message- > From: Cédric Le Goater > Sent: Friday, May 23, 2025 4:09 PM > To: Steven Lee ; Peter Maydell > ; Troy Lee ; Jamin Lin > ; Andrew Jeffery > ; Joel Stanley ; open > list:ASPEED BMCs ; open list:All patches CC here > > Cc:

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

2025-05-22 Thread Steven Sistare
On 5/21/2025 11:19 PM, Duan, Zhenzhong wrote: -Original Message- From: Steven Sistare Subject: Re: [PATCH V3 29/42] backends/iommufd: change process ioctl On 5/20/2025 11:11 PM, Duan, Zhenzhong wrote: -Original Message- From: Steven Sistare Subject: Re: [PATCH V3 29/42

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

2025-05-22 Thread Steven Sistare
/iommufd.c | 3 ++-   hw/vfio/listener.c    | 6 +++---   5 files changed, 14 insertions(+), 11 deletions(-) Steven, Can you base the live update series on this patch ? Yes, its already on my todo list for V4. - Steve diff --git a/include/hw/vfio/vfio

Re: [PATCH V3 10/42] vfio/container: restore DMA vaddr

2025-05-22 Thread Steven Sistare
On 5/22/2025 2:37 AM, Cédric Le Goater wrote: On 5/12/25 17:32, Steve Sistare wrote: In new QEMU, do not register the memory listener at device creation time. Register it later, in the container post_load handler, after all vmstate that may affect regions and mapping boundaries has been loaded. 

Re: [PATCH V3 07/42] vfio/container: preserve descriptors

2025-05-22 Thread Steven Sistare
On 5/22/2025 9:51 AM, Cédric Le Goater wrote: On 5/12/25 17:32, Steve Sistare wrote: At vfio creation time, save the value of vfio container, group, and device descriptors in CPR state.  On qemu restart, vfio_realize() finds and uses the saved descriptors, and remembers the reused status for sub

[PATCH v4 3/6] hw/arm/aspeed_ast27x0: Fix unimplemented region overlap with vbootrom

2025-05-22 Thread Steven Lee via
a safeguard. Signed-off-by: Steven Lee --- hw/arm/aspeed_ast27x0.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/arm/aspeed_ast27x0.c b/hw/arm/aspeed_ast27x0.c index 1974a25766..bb61c30cf4 100644 --- a/hw/arm/aspeed_ast27x0.c +++ b/hw/arm/aspeed_ast27x0.c @@ -23,14

[PATCH v4 4/6] hw/arm/aspeed_ast27x0-fc: Map ca35 memory into system memory

2025-05-22 Thread Steven Lee via
Map the CA35 memory region as a subregion of system_memory to ensure a valid FlatView. This prevents failures in APIs that rely on the global memory view, such as rom_check_and_register_reset(). Signed-off-by: Steven Lee Reviewed-by: Cédric Le Goater --- hw/arm/aspeed_ast27x0-fc.c | 1 + 1

[PATCH v4 5/6] hw/arm/fby35: Map BMC memory into system memory

2025-05-22 Thread Steven Lee via
Add the BMC memory region as a subregion of system_memory so that modules relying on system memory can operate correctly. Signed-off-by: Steven Lee Reviewed-by: Cédric Le Goater --- hw/arm/fby35.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/arm/fby35.c b/hw/arm/fby35.c index

  1   2   3   4   5   6   7   8   9   10   >