From nobody Sun Feb 8 05:29:27 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.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 207.211.31.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=1594930244; cv=none; d=zohomail.com; s=zohoarc; b=Mhu9kNlsPuYK69RCvZjWBeBx0Wist71kZ3Pr9oHmYFAyEDZi32Dii4sOQjfvmMYqCc3QNle/d64x6MKYbtxvHGXDo3NnzNLPdlLuzViHyK781ZwzBDXfk6mSYu1hZ3D5g7IPHTrcRAR2OedjyObLz6nlUDlJp7iiQ0FnDrM6uDs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1594930244; 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=Ae32HqL1NCTlWbdtVH+KZ0W9B2RMAEd7UpRqIbsyzZk=; b=hjPnvwqMjPokAYvBwaC1pCj7mgjcTIVTwjjkKEeUIbklL02jnjS/xz8d7igd7TOzmx2YQEEEKhilZ97Gfi9JDR5yYsJHaaOw60NEN0oRehPRn+CcHW/UK7+q8LkKhSvibbuxiqTzpJC0Re658M4gRjCx1hBTmlMMhM3snaeanas= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.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 [207.211.31.120]) by mx.zohomail.com with SMTPS id 1594930244691986.8447892918584; Thu, 16 Jul 2020 13:10:44 -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-511-V6RgZuYJOb-Os0Gmdd2g2A-1; Thu, 16 Jul 2020 16:10:41 -0400 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id D49F7107ACCA; Thu, 16 Jul 2020 20:10:34 +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 B941D5C1D3; Thu, 16 Jul 2020 20:10:33 +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 A62FE1809554; Thu, 16 Jul 2020 20:10:30 +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 06GK97Hr009553 for ; Thu, 16 Jul 2020 16:09:07 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8A9B219D82; Thu, 16 Jul 2020 20:09:07 +0000 (UTC) Received: from virval.usersys.redhat.com (unknown [10.40.192.16]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5B8F819D7F for ; Thu, 16 Jul 2020 20:09:04 +0000 (UTC) Received: by virval.usersys.redhat.com (Postfix, from userid 500) id CE2602406BC; Thu, 16 Jul 2020 22:09:02 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1594930243; 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=Ae32HqL1NCTlWbdtVH+KZ0W9B2RMAEd7UpRqIbsyzZk=; b=Ck5lp0hpq78V4KgoUrS9/QWBRl7WEeja0xuZR7oMR0blmx/ECYUT8CbhezZe97kH2+AJAV 07hraI85K6/IOiMCGoXgDMf5qPPeCh4dc1ZZ+6Y5iozDU3BrZr6saOKi4l4iSNJYNyCLfs sTSznTPjlaBBkX5aHL3VGLjcugPKRYQ= X-MC-Unique: V6RgZuYJOb-Os0Gmdd2g2A-1 From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 2/3] qemu: Do not set //cpu/@migratable for running domains in post-parse Date: Thu, 16 Jul 2020 22:08:47 +0200 Message-Id: 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 Cc: Mark Mielke 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.16 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" Commit v6.4.0-61-g201bd5db63 started to fill the default value for //cpu/@migratable attribute according to QEMU support. However, active domains either have the migratable attribute already set or the capabilities we use for checking the QEMU support were created by older libvirt which didn't probe for this specific capability. Thus we should leave active domains alone when parsing their XMLs. https://bugzilla.redhat.com/show_bug.cgi?id=3D1857967 Reported-by: Mark Mielke Signed-off-by: Jiri Denemark --- src/qemu/qemu_domain.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index 4a2daffc0a..2c944ce051 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -3986,9 +3986,13 @@ qemuDomainDefCPUPostParse(virDomainDefPtr def, } } =20 - if (qemuCaps && + /* Running domains were either started before QEMU_CAPS_CPU_MIGRATABLE= was + * introduced and thus we can't rely on it or they already have the + * migratable default set. */ + if (def->id =3D=3D -1 && + qemuCaps && def->cpu->mode =3D=3D VIR_CPU_MODE_HOST_PASSTHROUGH && - !def->cpu->migratable) { + def->cpu->migratable =3D=3D VIR_TRISTATE_SWITCH_ABSENT) { if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_CPU_MIGRATABLE)) def->cpu->migratable =3D VIR_TRISTATE_SWITCH_ON; else if (ARCH_IS_X86(def->os.arch)) --=20 2.27.0