From nobody Sun Feb 8 22:06:19 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 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=1658334142; cv=none; d=zohomail.com; s=zohoarc; b=SCbq0EoTOV5Q8yPgXnX6u5SD3ddyAC0bSLhQ4gOE+QjSk3MW1MX27GcT3Cnakzu8vLbQQ8P9mSIEVyMx9ADRhCmZ9eWHkvfkGxi3f23TgsPcGHaaZHyQ9J1FHYrAiqqLCw80mwCG8zcX1yybXnqocUEq6tLAOy1YRBLYQtffiIc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1658334142; 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=coy1ZbRI41G7eCNgulPGTUK9BsrwYnt+ZaR3HSoLQRI=; b=ZB5J0vsTaYHCU3m8qcef0FBjOKxSfJL3xrU/6dNDWWUm0t9CqPbqOo9tLojpmEuB4i92jpPudpDfQCu/9RpN4XxMzg+vFrjVn0DRXu7JPMZQotWCdTVuHESthANB9sq9Xk5S98eDMdVD3hd4yLKya5Gw8on2mDEPRXHDsZnMAZo= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1658334142554266.9210889597057; Wed, 20 Jul 2022 09:22:22 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-557-e0TDNVQ1OkS13qZYR01cAg-1; Wed, 20 Jul 2022 12:22:16 -0400 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C39718039B4; Wed, 20 Jul 2022 16:22:13 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 673D1492C3B; Wed, 20 Jul 2022 16:22:13 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 15B90194706C; Wed, 20 Jul 2022 16:22:13 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 2A6921947066 for ; Wed, 20 Jul 2022 16:05:59 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 07784112131E; Wed, 20 Jul 2022 16:05:59 +0000 (UTC) Received: from eperezma.remote.csb (unknown [10.39.192.102]) by smtp.corp.redhat.com (Postfix) with ESMTP id D85BF1121314; Wed, 20 Jul 2022 16:05:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1658334140; 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=coy1ZbRI41G7eCNgulPGTUK9BsrwYnt+ZaR3HSoLQRI=; b=TvHMSZAEqj17+VIcPW0GHcYkTWfaESN8VicBcbcfSIqMHSpa073On+13SMi7ANQSrapwVl 93ttU9l4Ea3SIx16cefoChFqO3tn7o0ptqa5PcIzBWDlXzwXQnqcrPuQjWW9DbN3nHmq30 l05V7oGdz50zH9QTbuR86itf6VSwx3E= X-MC-Unique: e0TDNVQ1OkS13qZYR01cAg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: =?UTF-8?q?Eugenio=20P=C3=A9rez?= To: libvir-list@redhat.com Subject: [libvirt PATCH v4 4/4] qemu_migration: Do not forbid vDPA devices if can query blockers Date: Wed, 20 Jul 2022 18:05:49 +0200 Message-Id: <20220720160549.3168021-5-eperezma@redhat.com> In-Reply-To: <20220720160549.3168021-1-eperezma@redhat.com> References: <20220720160549.3168021-1-eperezma@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Laurent Vivier , Jason Wang , Jaroslav Suchanek , Jiri Denemark , Laine Stump Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.9 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1658334144429100001 vDPA devices will be migratable soon. Since they are not migratable before qemu 6.0, and qemu pre-6.0 didn't have the capability of asking for migration blockers, let it hardcoded in that case. Otherwise, ask qemu about the explicit blocker. Signed-off-by: Eugenio P=C3=A9rez Reviewed-by: Jiri Denemark --- v3: Fix indentation --- src/qemu/qemu_migration.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 2e3044289a..b554027da2 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -1454,9 +1454,11 @@ qemuMigrationSrcIsAllowed(virQEMUDriver *driver, int pauseReason; size_t i; int r; + bool blockedReasonsCap =3D virQEMUCapsGet(priv->qemuCaps, + QEMU_CAPS_MIGRATION_BLOCKED_RE= ASONS); =20 /* Ask qemu if it have a migration blocker */ - if (virQEMUCapsGet(priv->qemuCaps, QEMU_CAPS_MIGRATION_BLOCKED_REASONS= )) { + if (blockedReasonsCap) { g_auto(GStrv) blockers =3D NULL; r =3D qemuDomainGetMigrationBlockers(driver, vm, &blockers); if (r !=3D 0) @@ -1576,7 +1578,7 @@ qemuMigrationSrcIsAllowed(virQEMUDriver *driver, virDomainNetDef *net =3D vm->def->nets[i]; qemuSlirp *slirp; =20 - if (net->type =3D=3D VIR_DOMAIN_NET_TYPE_VDPA) { + if (!blockedReasonsCap && net->type =3D=3D VIR_DOMAIN_NET_TYPE= _VDPA) { virReportError(VIR_ERR_OPERATION_INVALID, "%s", _("vDPA devices cannot be migrated")); return false; --=20 2.31.1