[PATCH v2] vfio-user: reject failover during init

Hugo Komatsu posted 1 patch 1 week, 6 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20260813110731.80-1-hugo.komatsu@nutanix.com
Maintainers: John Levon <john.levon@nutanix.com>, Thanos Makatos <thanos.makatos@nutanix.com>, "Cédric Le Goater" <clg@redhat.com>
hw/vfio-user/pci.c | 5 +++++
1 file changed, 5 insertions(+)
[PATCH v2] vfio-user: reject failover during init
Posted by Hugo Komatsu 1 week, 6 days ago
Virtio-net failover is a networking feature that relies on a primary
and standby device pair. This is not currently supported for vfio-user.
Refuse initialization if this property is set.

Signed-off-by: Hugo Komatsu <hugo.komatsu@nutanix.com>
Reviewed-by: John Levon <john.levon@nutanix.com>
---
 hw/vfio-user/pci.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/hw/vfio-user/pci.c b/hw/vfio-user/pci.c
index 8e7ce5a92e..975d754597 100644
--- a/hw/vfio-user/pci.c
+++ b/hw/vfio-user/pci.c
@@ -251,6 +251,11 @@ static void vfio_user_pci_realize(PCIDevice *pdev, Error **errp)
         return;
     }
 
+    if (pdev->failover_pair_id) {
+        error_setg(errp, "vfio-user: failover is not supported");
+        return;
+    }
+
     sock_name = udev->socket->u.q_unix.path;
 
     vbasedev->name = g_strdup_printf("vfio-user:%s", sock_name);
-- 
2.39.3

Re: [PATCH v2] vfio-user: reject failover during init
Posted by Mark Cave-Ayland 1 week, 6 days ago
On 13/08/2026 12:08, Hugo Komatsu wrote:

> Virtio-net failover is a networking feature that relies on a primary
> and standby device pair. This is not currently supported for vfio-user.
> Refuse initialization if this property is set.
> 
> Signed-off-by: Hugo Komatsu <hugo.komatsu@nutanix.com>
> Reviewed-by: John Levon <john.levon@nutanix.com>
> ---
>   hw/vfio-user/pci.c | 5 +++++
>   1 file changed, 5 insertions(+)
> 
> diff --git a/hw/vfio-user/pci.c b/hw/vfio-user/pci.c
> index 8e7ce5a92e..975d754597 100644
> --- a/hw/vfio-user/pci.c
> +++ b/hw/vfio-user/pci.c
> @@ -251,6 +251,11 @@ static void vfio_user_pci_realize(PCIDevice *pdev, Error **errp)
>           return;
>       }
>   
> +    if (pdev->failover_pair_id) {
> +        error_setg(errp, "vfio-user: failover is not supported");
> +        return;
> +    }
> +
>       sock_name = udev->socket->u.q_unix.path;
>   
>       vbasedev->name = g_strdup_printf("vfio-user:%s", sock_name);

Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>


ATB,

Mark.