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

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

2025-05-22 Thread Steven Lee via
c configuration in ast2700fc's ca35 init function. 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..7bf4f2a52d 100644 --- a/hw/arm/aspeed_ast27

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

2025-05-22 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 --- hw/arm/aspeed_ast27x0-fc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/arm/aspeed_ast27x0-fc.c b/hw/arm

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

2025-05-22 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 v4 0/6] hw/arm/aspeed_ast2700-fc: Fix null pointer dereference

2025-05-22 Thread Steven Lee via
message for "Fix unimplemented region overlap with VBootROM". v4: - Split the first patch "Fix null pointer dereference" into two patches. - Remove the patch "hw/arm/aspeed_ast27x0: Fix unimplemented region overlap with vbootrom". Steven Lee (6): hw/arm/aspeed_as

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

2025-05-22 Thread Steven Lee
Hi Cédric, > -Original Message- > From: Cédric Le Goater > Sent: Thursday, May 22, 2025 3:52 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 2/5] hw/arm/aspeed_ast27x0: Remove unused iomem region overlapping VBootROM

2025-05-21 Thread Steven Lee
Hi reviewers, Please ignore this patch - I mistakenly sent two versions of patch 2/5. The correct one is titled: [PATCH v3 2/5] hw/arm/aspeed_ast27x0: Fix unimplemented region overlap with VBootROM Sorry for the confusion. Regards, Steven > -Original Message- > From: Stev

[PATCH v3 0/5] hw/arm/aspeed_ast2700-fc: Fix null pointer dereference

2025-05-21 Thread Steven Lee via
message for "Fix unimplemented region overlap with VBootROM". Steven Lee (5): hw/arm/aspeed_ast2700-fc: Fix null pointer dereference in ca35 init hw/arm/aspeed_ast27x0: Fix unimplemented region overlap with vbootrom hw/arm/aspeed_ast27x0-fc: Map ca35 memory into system memory

[PATCH v3 1/5] hw/arm/aspeed_ast2700-fc: Fix null pointer dereference in ca35 init

2025-05-21 Thread Steven Lee via
e ca35 ram size from 2GiB to 1GiB to align with ast2700a1-evb, where the ram-container is defined as 1GiB in its class. - Add nic configuration in ast2700fc's ca35 init function. Signed-off-by: Steven Lee --- hw/arm/aspeed_ast27x0-fc.c | 9 - 1 file changed, 8 insertions(+), 1 delet

[PATCH v3 3/5] hw/arm/aspeed_ast27x0-fc: Map ca35 memory into system memory

2025-05-21 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 --- hw/arm/aspeed_ast27x0-fc.c | 1 + 1 file changed, 1 insertion(+) diff

[PATCH v3 2/5] hw/arm/aspeed_ast27x0: Fix unimplemented region overlap with vbootrom

2025-05-21 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 v3 2/5] hw/arm/aspeed_ast27x0: Remove unused iomem region overlapping VBootROM

2025-05-21 Thread Steven Lee via
The iomem region at 0x is unused and overlaps with VBootROM. Removing it avoids incorrect memory layout. Signed-off-by: Steven Lee --- hw/arm/aspeed_ast27x0.c | 8 1 file changed, 8 deletions(-) diff --git a/hw/arm/aspeed_ast27x0.c b/hw/arm/aspeed_ast27x0.c index 1974a25766

[PATCH v3 5/5] docs: Remove ast2700fc from Aspeed family boards

2025-05-21 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 v3 4/5] hw/arm/fby35: Map BMC memory into system memory

2025-05-21 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 V3 38/42] vfio/iommufd: reconstruct hw_caps

2025-05-21 Thread Steven Sistare
I withdraw this patch. I will instead save devid in cpr-state. - Steve On 5/12/2025 11:32 AM, Steve Sistare wrote: hw_caps is normally derived during realize, at vfio_device_hiod_create_and_realize -> hiod_iommufd_vfio_realize -> iommufd_backend_get_device_info. However, this depends on the d

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

2025-05-21 Thread Steven Sistare
I withdraw this patch. Most of it is not needed if I save ioas_id in cpr-state. I will move a tiny bit that remains to another patch. - Steve On 5/12/2025 11:32 AM, Steve Sistare wrote: Reconstruct userland device state after CPR. During vfio_realize, skip all ioctls that configure the devic

Re: [PATCH V3 32/42] vfio/iommufd: export iommufd_cdev_get_info_iova_range

2025-05-21 Thread Steven Sistare
I withdraw this patch. It is not needed if I save ioas_id in cpr-state. - Steve On 5/12/2025 11:32 AM, Steve Sistare wrote: Export iommufd_cdev_get_info_iova_range, for use by CPR in a subsequent patch to reconstruct the userland device state. No functional change. Signed-off-by: Steve Sista

Re: [PATCH V3 39/42] vfio/iommufd: reconstruct hwpt

2025-05-21 Thread Steven Sistare
On 5/20/2025 5:16 AM, Duan, Zhenzhong wrote: -Original Message- From: Steven Sistare Subject: Re: [PATCH V3 39/42] vfio/iommufd: reconstruct hwpt On 5/18/2025 11:25 PM, Duan, Zhenzhong wrote: -Original Message- From: Steve Sistare Subject: [PATCH V3 39/42] vfio/iommufd

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

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

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

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

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

2025-05-20 Thread Steven Sistare
On 5/20/2025 9:55 AM, Cédric Le Goater wrote: On 5/12/25 17:32, Steve Sistare wrote: 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 parameter, then vfio_device_get_name cr

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

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

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

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

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

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

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

2025-05-20 Thread Steven Sistare
On 5/20/2025 1:52 AM, Cédric Le Goater wrote: On 5/16/25 19:58, Steven Sistare wrote: 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

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

2025-05-20 Thread Steven Sistare
On 5/20/2025 8:27 AM, Cédric Le Goater wrote: On 5/12/25 17:32, Steve Sistare wrote: 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 space, which does not change, rather

Re: [PATCH V3 15/42] vfio-pci: skip reset during cpr

2025-05-20 Thread Steven Sistare
On 5/20/2025 2:48 AM, Cédric Le Goater wrote: On 5/12/25 17:32, Steve Sistare wrote: Do not reset a vfio-pci device during CPR, and do not complain if the kernel's PCI config space changes for non-emulated bits between the vmstate save and load, which can happen due to ongoing interrupt activity

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

2025-05-20 Thread Steven Sistare
On 5/20/2025 3:32 AM, Cédric Le Goater wrote: On 5/19/25 15:26, 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 12/42] vfio/container: recover from unmap-all-vaddr failure

2025-05-20 Thread Steven Sistare
On 5/20/2025 2:29 AM, Cédric Le Goater wrote: On 5/12/25 17:32, Steve Sistare wrote: If there are multiple containers and unmap-all fails for some container, we need to remap vaddr for the other containers for which unmap-all succeeded. Recover by walking all address ranges of all containers to

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

2025-05-19 Thread Steven Sistare
On 5/19/2025 4:51 AM, Cédric Le Goater wrote: On 5/16/25 20:18, Steven Sistare wrote: 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

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

2025-05-19 Thread Steven Sistare
On 5/19/2025 9:32 AM, Cédric Le Goater wrote: On 5/15/25 21:08, Steven Sistare wrote: On 5/15/2025 9:42 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

RE: [PATCH v2 2/5] hw/arm/aspeed_ast27x0: Fix unimplemented region overlap with vbootrom

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

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

2025-05-19 Thread Steven Sistare
On 5/19/2025 9:20 AM, Cédric Le Goater wrote: On 5/15/25 21:08, Steven Sistare wrote: On 5/15/2025 8:59 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

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

2025-05-19 Thread Steven Sistare
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 iommufd_cdev_use_hwpt and iommufd_cdev_make_hwpt. These wil

Re: [PATCH V3 39/42] vfio/iommufd: reconstruct hwpt

2025-05-19 Thread Steven Sistare
On 5/18/2025 11:25 PM, Duan, Zhenzhong wrote: -Original Message- From: Steve Sistare Subject: [PATCH V3 39/42] vfio/iommufd: reconstruct hwpt Save the hwpt_id in vmstate. In realize, skip its allocation from iommufd_cdev_attach -> iommufd_cdev_attach_container -> iommufd_cdev_autodomai

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

2025-05-19 Thread Steven Sistare
On 5/16/2025 6:22 AM, Duan, Zhenzhong wrote: -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 ol

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

2025-05-19 Thread Steven Sistare
On 5/16/2025 6:06 AM, Duan, Zhenzhong wrote: -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 re

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

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

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

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

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

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

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

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

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

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

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

2025-05-19 Thread Steven Sistare
On 5/19/2025 4:28 AM, David Hildenbrand wrote: On 17.05.25 15:55, Steven Sistare wrote: On 5/16/2025 4:50 PM, David Hildenbrand wrote: 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

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

2025-05-17 Thread Steven Sistare
On 5/16/2025 4:50 PM, David Hildenbrand wrote: 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

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

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

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 26/42] vfio: return mr from vfio_get_xlat_addr

2025-05-15 Thread Steven Sistare
On 5/13/2025 7:12 AM, Mark Cave-Ayland wrote: On 12/05/2025 16:32, 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_FI

Re: [PATCH V3 26/42] vfio: return mr from vfio_get_xlat_addr

2025-05-15 Thread Steven Sistare
On 5/15/2025 4:22 AM, David Hildenbrand wrote: On 14.05.25 19:03, Cédric Le Goater wrote: + Paolo + David + Peter + Phil On 5/12/25 22:51, John Levon wrote: On Mon, May 12, 2025 at 08:32:37AM -0700, Steve Sistare wrote: Modify memory_get_xlat_addr and vfio_get_xlat_addr to return the memory

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

2025-05-15 Thread Steven Sistare
On 5/15/2025 9:42 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-15 Thread Steven Sistare
On 5/15/2025 8:59 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

Re: [PATCH V3 08/42] vfio/container: export vfio_legacy_dma_map

2025-05-15 Thread Steven Sistare
On 5/15/2025 9:42 AM, Cédric Le Goater wrote: On 5/12/25 17:32, Steve Sistare wrote: Export vfio_legacy_dma_map so it may be referenced outside the file in a subsequent patch. Signed-off-by: Steve Sistare ---   hw/vfio/container.c   | 4 ++--   include/hw/vfio/vfio-container-bas

  1   2   3   4   5   6   7   8   9   10   >