[PATCH] vfio-user: reject failover during init

Hugo Komatsu <[email protected]>
Newsgroups gmane.comp.emulators.qemu
Message-ID <[email protected]>
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.

Change-Id: I80989ddb08a1cd3eba84bcf9b0edc26cb4a65669
Signed-off-by: Hugo Komatsu <[email protected]>
---
 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 ecc59a9642..34fa2f22b3 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.