From nobody Mon Feb 9 12:27:01 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1579490716; cv=none; d=zohomail.com; s=zohoarc; b=ItRFeAy1RhfDiHUd9jB+AltPnkCKms7c7Uahnbe0Uu3rnJ2d8pCBx/J43M8C9U6a2EJFdibBf0DBH3EDMJChygCMsq2BfbyDV6bsjoU7cUQ7VcIunWq7dJzdtnEDj+L4MAgxKNutBBiOjASvYcLl97PeIB9o4LasizZFCsyA/BE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579490716; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=ladilKElM2Yi+iKLYAVSVbGAuhFKJHjiHjY2kSYHDVc=; b=mgnblzM94a1euJxRQSK+/DvaY2wgPCdAA3U6XAbjEiso1QVuKMZBEbK+R1qcI8EH0of8sPuIbVbSTPyIBwrNxz336cjnmUmuwV3O8kgSuzstbQpIIcxVqDHzM3cg3WBXn6VwyQ8INoQTPhkysKhuFYcbD0es+0Y27gaDx7MZ20E= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 1579490716388608.6208958524201; Sun, 19 Jan 2020 19:25:16 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-92-2ohEN9R-MXOM2nPSmJfVeQ-1; Sun, 19 Jan 2020 22:25:12 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C5C291084431; Mon, 20 Jan 2020 03:25:07 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 961F5399; Mon, 20 Jan 2020 03:25:07 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 44A9481974; Mon, 20 Jan 2020 03:25:07 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 00K3OVEl002416 for ; Sun, 19 Jan 2020 22:24:31 -0500 Received: by smtp.corp.redhat.com (Postfix) id 8857B5C299; Mon, 20 Jan 2020 03:24:31 +0000 (UTC) Received: from tilapia.redhat.com (ovpn-121-72.rdu2.redhat.com [10.10.121.72]) by smtp.corp.redhat.com (Postfix) with ESMTP id E1B925C1BB; Mon, 20 Jan 2020 03:24:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579490715; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=ladilKElM2Yi+iKLYAVSVbGAuhFKJHjiHjY2kSYHDVc=; b=jONrx49yNyVLDY6voGjoo9CtFkKKDNSRvTbqPyC8zzjwoyYWUhyGW+jsSqgeFjfxHcV0NT +SxnQ6wApPzmX3U75K8+d9s5ITCNuQAdh2lNTBUriaxzjbIAyPvyHrZurK41Gzs2szTISM KVOs3CzfHLFkd/7rCUT2EMySwTPAuJ8= From: Laine Stump To: libvir-list@redhat.com Subject: [libvirt PATCH 05/12] qemu: add capabilities flag for failover feature Date: Sun, 19 Jan 2020 22:24:12 -0500 Message-Id: <20200120032419.448310-6-laine@redhat.com> In-Reply-To: <20200120032419.448310-1-laine@redhat.com> References: <20200120032419.448310-1-laine@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Cc: Jens Freimann X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-MC-Unique: 2ohEN9R-MXOM2nPSmJfVeQ-1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" Presence of the virtio-net-pci option called "failover" indicates support in a qemu binary of a simplistic bonding of a virtio-net device with another PCI device. This feature allows migration of guests that have a network device assigned to a guest with VFIO, by creating a network bond device in the guest consisting of the VFIO-assigned device and a virtio-net-pci device, then temporarily (and automatically) unplugging the VFIO net device prior to migration (and hotplugging an equivalent device on the migration destination). (The feature is called "failover" because the bond device uses the vfio-pci netdev for normal guest networking, but "fails over" to the virtio-net-pci netdev once the vfio-pci device is unplugged for migration.) Full functioning of the feature also requires support in the virtio-net driver in the guest OS (since that is where the bond device resides), but if the "failover" commandline option is present for the virtio-net-pci device in qemu, at least the qemu part of the feature is available, and libvirt can add the proper options to both the virtio-net-pci and vfio-pci device commandlines to indicate qemu should attempt doing the failover during migration. This patch just adds the qemu capabilities flag "virtio-net.failover". Signed-off-by: Laine Stump --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml | 1 + tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml | 1 + 4 files changed, 5 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 84c62a4e28..15943b4a45 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -553,6 +553,7 @@ VIR_ENUM_IMPL(virQEMUCaps, "blockdev-file-dynamic-auto-read-only", "savevm-monitor-nodes", "drive-nvme", + "virtio-net.failover", ); =20 =20 @@ -1275,6 +1276,7 @@ static struct virQEMUCapsStringFlags virQEMUCapsDevic= ePropsVirtioNet[] =3D { { "disable-legacy", QEMU_CAPS_VIRTIO_PCI_DISABLE_LEGACY }, { "iommu_platform", QEMU_CAPS_VIRTIO_PCI_IOMMU_PLATFORM }, { "ats", QEMU_CAPS_VIRTIO_PCI_ATS }, + { "failover", QEMU_CAPS_VIRTIO_NET_FAILOVER }, }; =20 static struct virQEMUCapsStringFlags virQEMUCapsDevicePropsSpaprPCIHostBri= dge[] =3D { diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 193c19fc81..2beee3e839 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -534,6 +534,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for = syntax-check */ QEMU_CAPS_BLOCK_FILE_AUTO_READONLY_DYNAMIC, /* the auto-read-only prop= erty of block backends for files is dynamic */ QEMU_CAPS_SAVEVM_MONITOR_NODES, /* 'savevm' handles monitor-owned node= s properly */ QEMU_CAPS_DRIVE_NVME, /* -drive file.driver=3Dnvme */ + QEMU_CAPS_VIRTIO_NET_FAILOVER, /* virtio-net-*.failover */ =20 QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml b/tests/qemu= capabilitiesdata/caps_4.2.0.aarch64.xml index a6469073fd..536092e1f1 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml @@ -175,6 +175,7 @@ + 4001050 0 61700242 diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_4.2.0.x86_64.xml index 4857e2f5a5..35f601dc5d 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml @@ -218,6 +218,7 @@ + 4002000 0 43100242 --=20 2.24.1