From nobody Tue Feb 10 01:30:32 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 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=1565276345; cv=none; d=zoho.com; s=zohoarc; b=jRPjb4n9Jw6Tn9XCo+FHLQMkVK80TJskcUeMwLoW4QI0X6jGLBG8srZ8ddatuozPR0lUPp2Ex4FUH3u/BLDIC1peSaUX2yPH50F10CB86qAo/iWvn+6aHpk2g02c196kWL5QqozD7XHjtrfpVVM+C0sgMpJk1lNRV5TodgtJrdI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1565276345; 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:ARC-Authentication-Results; bh=KUXwAnM3WOvOGlOQ31R9mYiZqQUGm/zKzswtiLPgV1k=; b=TTB+9j0j+sJW5Y+/ax53arnq+hF8ufYkzQuFfWX4P0WimVNq1vrKeiK6nR0ga2RIjoFOgI3d6uxYY3CyIGp/fm61Fxeir1J+388O7VU4VWT5SJGGFH+G0KifhN/TKZtvDUxenGlR4Fvl2euNjpkBCGIm9uh0p8IxMonlz0JI3wU= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1565276345570236.12137055409687; Thu, 8 Aug 2019 07:59:05 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 78278C05AA52; Thu, 8 Aug 2019 14:59:04 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 529465C219; Thu, 8 Aug 2019 14:59:04 +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 15ABE180BAA8; Thu, 8 Aug 2019 14:59:04 +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 x78Ewbsi023535 for ; Thu, 8 Aug 2019 10:58:37 -0400 Received: by smtp.corp.redhat.com (Postfix) id 760B45C226; Thu, 8 Aug 2019 14:58:37 +0000 (UTC) Received: from localhost (ovpn-112-57.ams2.redhat.com [10.36.112.57]) by smtp.corp.redhat.com (Postfix) with ESMTP id A83E95C205; Thu, 8 Aug 2019 14:58:35 +0000 (UTC) From: marcandre.lureau@redhat.com To: libvir-list@redhat.com Date: Thu, 8 Aug 2019 18:55:09 +0400 Message-Id: <20190808145514.20789-19-marcandre.lureau@redhat.com> In-Reply-To: <20190808145514.20789-1-marcandre.lureau@redhat.com> References: <20190808145514.20789-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Subject: [libvirt] [PATCH v2 18/23] qemu-migration: prevent migration if slirp cannot be migrated 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: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Thu, 08 Aug 2019 14:59:04 +0000 (UTC) From: Marc-Andr=C3=A9 Lureau Signed-off-by: Marc-Andr=C3=A9 Lureau Reviewed-by: Michal Privoznik --- src/qemu/qemu_migration.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 86b4bfd970..c607e9f909 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -39,6 +39,7 @@ #include "qemu_hotplug.h" #include "qemu_blockjob.h" #include "qemu_security.h" +#include "qemu_slirp.h" #include "qemu_block.h" =20 #include "domain_audit.h" @@ -1150,6 +1151,17 @@ qemuMigrationSrcIsAllowed(virQEMUDriverPtr driver, return false; } =20 + for (i =3D 0; i < vm->def->nnets; i++) { + virDomainNetDefPtr net =3D vm->def->nets[i]; + qemuSlirpPtr slirp =3D QEMU_DOMAIN_NETWORK_PRIVATE(net)->slirp; + + if (slirp && !qemuSlirpHasFeature(slirp, QEMU_SLIRP_FEATURE_MIGRAT= E)) { + virReportError(VIR_ERR_OPERATION_INVALID, "%s", + _("a slirp-helper cannot be migrated")); + return false; + } + } + /* following checks don't make sense for offline migration */ if (!(flags & VIR_MIGRATE_OFFLINE)) { if (qemuProcessAutoDestroyActive(driver, vm)) { --=20 2.23.0.rc1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list