Skip to contentSkip to conversation

vfio-user: reject failover during init

PATCH In review Hugo Komatsu 2 participants 2 messages Aug 13

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 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.

---
 hw/vfio-user/pci.c | 5 +++++
 1 file changed, 5 insertions(+)
hw/vfio-user/pci.c +5 -0
index 8e7ce5a92e..975d754597 100644
@@ -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);
Signature · 1 line
2.39.3
Reviewed-by on v2 1/1
#1 lore raw
Quoted 16 lines · Hugo Komatsu

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.

---
  hw/vfio-user/pci.c | 5 +++++
  1 file changed, 5 insertions(+)
hw/vfio-user/pci.c +0 -0
index 8e7ce5a92e..975d754597 100644
@@ -251,6 +251,11 @@ static void vfio_user_pci_realize(PCIDevice *pdev, Error **errp)
          return;

hw/vfio-user/pci.c static void vfio_user_pci_realize(PCIDevice *pdev, Error **errp) · line 261

Quoted 10 lines
hw/vfio-user/pci.c +5 -0
      }
 
+    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);

ATB,

Mark.