From nobody Mon Feb 9 05:43:52 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.25 as permitted sender) client-ip=209.132.183.25; envelope-from=libvir-list-bounces@redhat.com; helo=mx4-phx2.redhat.com; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.25 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; Return-Path: Received: from mx4-phx2.redhat.com (mx4-phx2.redhat.com [209.132.183.25]) by mx.zohomail.com with SMTPS id 1487859531265886.0274224618021; Thu, 23 Feb 2017 06:18:51 -0800 (PST) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx4-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v1NEFUbO003533; Thu, 23 Feb 2017 09:15:31 -0500 Received: from smtp.corp.redhat.com (int-mx16.intmail.prod.int.phx2.redhat.com [10.5.11.28]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v1NEFSP2022277 for ; Thu, 23 Feb 2017 09:15:28 -0500 Received: by smtp.corp.redhat.com (Postfix) id CC8151FC845; Thu, 23 Feb 2017 14:15:28 +0000 (UTC) Received: from virval.usersys.redhat.com (dhcp129-92.brq.redhat.com [10.34.129.92]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9F47E1FC840 for ; Thu, 23 Feb 2017 14:15:28 +0000 (UTC) Received: by virval.usersys.redhat.com (Postfix, from userid 500) id 5F1BC102388; Thu, 23 Feb 2017 15:15:27 +0100 (CET) From: Jiri Denemark To: libvir-list@redhat.com Date: Thu, 23 Feb 2017 15:15:02 +0100 Message-Id: In-Reply-To: References: In-Reply-To: References: Mail-Followup-To: libvir-list@redhat.com X-Scanned-By: MIMEDefang 2.74 on 10.5.11.28 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v3 04/28] qemu: Fix CPU model fallback in domain capabilities 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-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Our documentation of the domain capabilities XML says that the fallback attribute of a CPU model is used to indicate whether the CPU model was detected by libvirt itself (fallback=3D"allow") or by asking the hypervisor (fallback=3D"forbid"). We need to properly set fallback=3D"forbid" when CPU model comes from QEMU to match the documentation. Signed-off-by: Jiri Denemark --- Notes: Version 3: - ACKed in v2 - no change =20 Version 2: - no change src/qemu/qemu_capabilities.c | 3 +++ tests/domaincapsschemadata/qemu_2.8.0.s390x.xml | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 0f5acb76a..29ca3d4f9 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -3105,6 +3105,9 @@ virQEMUCapsInitCPUModel(virQEMUCapsPtr qemuCaps, if (ARCH_IS_S390(qemuCaps->arch)) ret =3D virQEMUCapsInitCPUModelS390(qemuCaps, cpu); =20 + if (ret =3D=3D 0) + cpu->fallback =3D VIR_CPU_FALLBACK_FORBID; + return ret; } =20 diff --git a/tests/domaincapsschemadata/qemu_2.8.0.s390x.xml b/tests/domain= capsschemadata/qemu_2.8.0.s390x.xml index efe345962..0b8135bc5 100644 --- a/tests/domaincapsschemadata/qemu_2.8.0.s390x.xml +++ b/tests/domaincapsschemadata/qemu_2.8.0.s390x.xml @@ -21,7 +21,7 @@ - zEC12.2-base + zEC12.2-base --=20 2.11.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list