From nobody Sun Feb 8 13:53:36 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=1589295210; cv=none; d=zohomail.com; s=zohoarc; b=WWaDPSJlrhS1OfSViXCICsai5GoXJNLlNGnpZG6kXpJi+SKkEu17Ax4tfUturvHlMMr62VpLOXYJwGxPC/0+njj3ntiHCu11VMSbcNRLl0mLJXpE8jcTmWjNgpBmjFuqVHbx2LpYmvs9F0CSDxcFj7Q2Cf3O3gbnZdX/Hp1DxmY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589295210; h=Content-Type:Content-Transfer-Encoding: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=hADfgwcmq7KW3+BWufe+pZaD83AV0NHC6Um3vfAMv/Q=; b=XakxReO99ZTxewglEJ2uqNE34mHK5owjnaNjIqbOyC2327KrVdVVtp+EBeeuozQnHNFF3bsc4g9YHFJIAxKK0ZR4tbdLDhfqO0rpczbF4hqorqzhY5uCptGhyAxSwbx+jhiDfd7XlDkGTpQg8eJuPX7lmUAzByXtO4NdUyS9HQM= 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 1589295210084998.3636582963443; Tue, 12 May 2020 07:53:30 -0700 (PDT) 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-192-7ZNxFUWvMr-3VgubPs5yug-1; Tue, 12 May 2020 10:53:26 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1AE35835B50; Tue, 12 May 2020 14:53:20 +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 EDF1E78B2E; Tue, 12 May 2020 14:53:19 +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 B73394E987; Tue, 12 May 2020 14:53:19 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 04CEqtqV020981 for ; Tue, 12 May 2020 10:52:55 -0400 Received: by smtp.corp.redhat.com (Postfix) id 50150341FC; Tue, 12 May 2020 14:52:55 +0000 (UTC) Received: from localhost.localdomain (unknown [10.40.195.13]) by smtp.corp.redhat.com (Postfix) with ESMTP id BF7232E187 for ; Tue, 12 May 2020 14:52:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589295208; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=hADfgwcmq7KW3+BWufe+pZaD83AV0NHC6Um3vfAMv/Q=; b=ZIoYU3NIwhXxu1DmoW70K4AEC8mqY3EDM5hb02WocpWMOlEyp8Hi8kZ6Quzi1De73YO4S0 fBovN1KaMHL+o5S9DzObrGEIBvRtGqT4Qpw47cYpNNhRYUrq0ZA5CeaTkVSy58r2qA9rhB 3ffdIJ/2N0ThBH8mk8MZk3ydE2bcobQ= X-MC-Unique: 7ZNxFUWvMr-3VgubPs5yug-1 From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 2/2] qemu: Disallow migration to older -numa if newer is used Date: Tue, 12 May 2020 16:52:47 +0200 Message-Id: <96bfc5cee0c1e124c097ff3b635690984beafdab.1589294644.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com 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.79 on 10.5.11.11 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" As advertised in the previous commit, migration from -numa memdev=3D to -numa mem=3D is not supported and results in error. Fortunately, we can check whether the destination has used the style we told it to, or if the corresponding flag in the migration cookie is missing then we know we are talking to older daemon which would have used the old approach. Anyway, let's deny migration then. Signed-off-by: Michal Privoznik --- src/qemu/qemu_migration.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 423713e00b..dde491b720 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@ -2424,7 +2424,8 @@ qemuMigrationDstPrepareAny(virQEMUDriverPtr driver, cookieFlags =3D 0; } else { cookieFlags =3D QEMU_MIGRATION_COOKIE_GRAPHICS | - QEMU_MIGRATION_COOKIE_CAPS; + QEMU_MIGRATION_COOKIE_CAPS | + QEMU_MIGRATION_COOKIE_PRIVATE; } =20 if (flags & VIR_MIGRATE_POSTCOPY && @@ -3549,10 +3550,18 @@ qemuMigrationSrcRun(virQEMUDriverPtr driver, cookiein, cookieinlen, cookieFlags | QEMU_MIGRATION_COOKIE_GRAPHICS | - QEMU_MIGRATION_COOKIE_CAPS); + QEMU_MIGRATION_COOKIE_CAPS | + QEMU_MIGRATION_COOKIE_PRIVATE); if (!mig) goto error; =20 + if (priv->forceNewNuma =3D=3D VIR_TRISTATE_BOOL_YES && + !(mig->priv && mig->priv->forceNewNuma =3D=3D VIR_TRISTATE_BOOL_YE= S)) { + virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s", + _("Migration to older numa unsupported")); + goto error; + } + if (qemuMigrationSrcGraphicsRelocate(driver, vm, mig, graphicsuri) < 0) VIR_WARN("unable to provide data for graphics client relocation"); =20 --=20 2.26.2