Commit 8f905e72d2 for qemu.org

commit 8f905e72d23934c27826e65f6bbfbe6a93211d39
Author: Hugo Komatsu <hugo.komatsu@nutanix.com>
Date:   Thu Aug 13 11:08:00 2026 +0000

    vfio-user: reject failover during init

    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>
    Reviewed-by: Mark Cave-Ayland <mark.caveayland@nutanix.com>
    Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com>
    Link: https://lore.kernel.org/qemu-devel/20260813110731.80-1-hugo.komatsu@nutanix.com
    Signed-off-by: Cédric Le Goater <clg@redhat.com>

diff --git a/hw/vfio-user/pci.c b/hw/vfio-user/pci.c
index e7573d4a9f..983e1d4ad4 100644
--- a/hw/vfio-user/pci.c
+++ b/hw/vfio-user/pci.c
@@ -266,6 +266,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);