From nobody Mon Apr 29 14:20:38 2024 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 Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 151566306410030.260212015803063; Thu, 11 Jan 2018 01:31:04 -0800 (PST) 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 3106783F42; Thu, 11 Jan 2018 09:30:50 +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 24CC37A2FA; Thu, 11 Jan 2018 09:30:48 +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 4B7114EBDB; Thu, 11 Jan 2018 09:30:42 +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 w0B9UdLb012878 for ; Thu, 11 Jan 2018 04:30:39 -0500 Received: by smtp.corp.redhat.com (Postfix) id 3FD9C7A31A; Thu, 11 Jan 2018 09:30:39 +0000 (UTC) Received: from virval.usersys.redhat.com (unknown [10.43.2.105]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 13BA67B123 for ; Thu, 11 Jan 2018 09:30:11 +0000 (UTC) Received: by virval.usersys.redhat.com (Postfix, from userid 500) id 1400D10E1BB; Thu, 11 Jan 2018 10:30:10 +0100 (CET) From: Jiri Denemark To: libvir-list@redhat.com Date: Thu, 11 Jan 2018 10:30:04 +0100 Message-Id: <009756f28beaf9763702d5ce2ba0973d979e9e47.1515663004.git.jdenemar@redhat.com> Mail-Followup-To: libvir-list@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] qemu: Ignore fallback CPU attribute on reconnect 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: , MIME-Version: 1.0 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.27]); Thu, 11 Jan 2018 09:31:03 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" When reconnecting to a running domain with host-model CPU started by old libvirt which did not store the actual CPU in the status XML, we need to ignore the fallback attribute to make sure we can translate the detected host CPU model to a model which is supported by the running QEMU. https://bugzilla.redhat.com/show_bug.cgi?id=3D1532980 Signed-off-by: Jiri Denemark Reviewed-by: Pavel Hrdina --- src/qemu/qemu_process.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 1a0923af36..25ec464d3e 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -3887,6 +3887,11 @@ qemuProcessUpdateCPU(virQEMUDriverPtr driver, virDomainCapsCPUModelsPtr models =3D NULL; int ret =3D -1; =20 + /* The host CPU model comes from host caps rather than QEMU caps so + * fallback must be allowed no matter what the user specified in the X= ML. + */ + vm->def->cpu->fallback =3D VIR_CPU_FALLBACK_ALLOW; + if (qemuProcessFetchGuestCPU(driver, vm, asyncJob, &cpu, &disabled) < = 0) goto cleanup; =20 --=20 2.15.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list