From nobody Sat Feb 7 09:00:41 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1728383263451717.124112336506; Tue, 8 Oct 2024 03:27:43 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 5D3421472; Tue, 8 Oct 2024 06:27:42 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 572651507; Tue, 8 Oct 2024 06:26:57 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 6A321A5C; Tue, 8 Oct 2024 06:26:54 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id CDC10A33 for ; Tue, 8 Oct 2024 06:26:53 -0400 (EDT) Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-329-nAmrxNEIPJWlkfxxYV5Hlg-1; Tue, 08 Oct 2024 06:26:52 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 87CEB1955EAA for ; Tue, 8 Oct 2024 10:26:51 +0000 (UTC) Received: from orkuz (unknown [10.43.3.115]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 1660C19560A2 for ; Tue, 8 Oct 2024 10:26:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1728383213; h=from:from: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; bh=BxfzUutMTeDBS//DmFCVl2ggIVtF3WcUHd0DisccA7k=; b=FfDK2/WMeny5+UiDVu9aUWWWNCM+y8YKMFkpzU0Agj2a68hBayThvBBQBFBBBznBmsDAqG +FFT0vvlpGW0iFwVn2F091Vab1nK2/o6xd9CdSDgkuEZDAyoQTtgscLs0tjN8mC9fDksqB iChqRpTSV+VG81Aee/G4bER5J2LNxlU= X-MC-Unique: nAmrxNEIPJWlkfxxYV5Hlg-1 From: Jiri Denemark To: devel@lists.libvirt.org Subject: [PATCH 1/7] qemu: Drop vmx-* from migratable CPU model only when origCPU is set Date: Tue, 8 Oct 2024 12:26:40 +0200 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 7JBGNMHDTULFOW7763TGYVS3CRFYIWXZ X-Message-ID-Hash: 7JBGNMHDTULFOW7763TGYVS3CRFYIWXZ X-MailFrom: jdenemar@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1728383264792116600 Content-Type: text/plain; charset="utf-8" When qemuDomainMakeCPUMigratable is called with origCPU =3D=3D NULL the code just removed all vmx-* features marked as added in the specified CPU model just like when origCPU is not NULL, but does not list any of the vmx-* features. But this is wrong, we should not touch these features at all when no origCPU is supplied, which happens when parsing XML passed by a user (e.g., migration XML). Such XML is supposed to be generated by libvirt as migration XML and contains only vmx-* features explicitly requested by a user. https://issues.redhat.com/browse/RHEL-52314 Signed-off-by: Jiri Denemark Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_domain.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/src/qemu/qemu_domain.c b/src/qemu/qemu_domain.c index b6762cc372..f8eac603ec 100644 --- a/src/qemu/qemu_domain.c +++ b/src/qemu/qemu_domain.c @@ -6889,23 +6889,21 @@ qemuDomainMakeCPUMigratable(virArch arch, virCPUDefUpdateFeature(cpu, "pconfig", VIR_CPU_FEATURE_DISABLE); } =20 - if (virCPUx86GetAddedFeatures(cpu->model, &data.added) < 0) - return -1; - - /* Drop features marked as added in a cpu model, but only - * when they are not mentioned in origCPU, i.e., when they were not - * explicitly mentioned by the user. - */ - if (data.added) { - g_auto(GStrv) keep =3D NULL; + if (origCPU) { + if (virCPUx86GetAddedFeatures(cpu->model, &data.added) < 0) + return -1; =20 - if (origCPU) { - keep =3D virCPUDefListExplicitFeatures(origCPU); + /* Drop features marked as added in a cpu model, but only + * when they are not mentioned in origCPU, i.e., when they were not + * explicitly mentioned by the user. + */ + if (data.added) { + g_auto(GStrv) keep =3D virCPUDefListExplicitFeatures(origCPU); data.keep =3D keep; - } =20 - if (virCPUDefFilterFeatures(cpu, qemuDomainDropAddedCPUFeatures, &= data) < 0) - return -1; + if (virCPUDefFilterFeatures(cpu, qemuDomainDropAddedCPUFeature= s, &data) < 0) + return -1; + } } =20 return 0; --=20 2.46.2 From nobody Sat Feb 7 09:00:41 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1728383295655555.9105214692657; Tue, 8 Oct 2024 03:28:15 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 91ABB1472; Tue, 8 Oct 2024 06:28:14 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 80D0513E8; Tue, 8 Oct 2024 06:27:05 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 84E031402; Tue, 8 Oct 2024 06:27:01 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id E1E8B1402 for ; Tue, 8 Oct 2024 06:26:55 -0400 (EDT) Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-218-5OHn__57M6qEzQG3g0wluw-1; Tue, 08 Oct 2024 06:26:54 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 8DBD51955F42 for ; Tue, 8 Oct 2024 10:26:53 +0000 (UTC) Received: from orkuz (unknown [10.43.3.115]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 1D62819560A2 for ; Tue, 8 Oct 2024 10:26:52 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1728383215; h=from:from: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; bh=Zg4he96lDck+fcivixRGRme4ugdQWW/aVFSpZkVTQK4=; b=aRh+pelVWTn04KkTr+DoUjIBAteNVBIsdO9Dh08rps8LioYarfzkDt7bvjapLwaJgRSOBy 3lZJKHHNaxjQcjTrhRMeqMJJqkDnfmxNbew01kzrleDj20f0huZDoUJCdQT7mzszUYdups v+WH99sj5DGxbdvwtyjuAm3YlgTjLOM= X-MC-Unique: 5OHn__57M6qEzQG3g0wluw-1 From: Jiri Denemark To: devel@lists.libvirt.org Subject: [PATCH 2/7] qemu: Do not drop unknown CPU features from domain XML Date: Tue, 8 Oct 2024 12:26:41 +0200 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: U4DPY2JLM4VIQ4RZK3W5VFU6RRT2PSEQ X-Message-ID-Hash: U4DPY2JLM4VIQ4RZK3W5VFU6RRT2PSEQ X-MailFrom: jdenemar@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1728383296947116600 Content-Type: text/plain; charset="utf-8" CPU features with policy=3D'disable' which are unknown to QEMU may be safely skipped when generating the -cpu command line, but we should still keep them in the domain definition so that we can properly check they are disabled after migrating the domain to a newer QEMU. Signed-off-by: Jiri Denemark Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_command.c | 13 ++++++++++++- src/qemu/qemu_process.c | 32 -------------------------------- 2 files changed, 12 insertions(+), 33 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index a0c9e5f8b3..b4888a5822 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -6095,6 +6095,7 @@ qemuBuildCpuModelArgStr(virQEMUDriver *driver, { size_t i; virCPUDef *cpu =3D def->cpu; + g_auto(GStrv) knownFeatures =3D NULL; =20 switch ((virCPUMode) cpu->mode) { case VIR_CPU_MODE_HOST_PASSTHROUGH: @@ -6153,9 +6154,14 @@ qemuBuildCpuModelArgStr(virQEMUDriver *driver, if (cpu->vendor_id) virBufferAsprintf(buf, ",vendor=3D%s", cpu->vendor_id); =20 + if (ARCH_IS_X86(def->os.arch) && + virQEMUCapsGetCPUFeatures(qemuCaps, def->virtType, false, &knownFe= atures) < 0) + return -1; + for (i =3D 0; i < cpu->nfeatures; i++) { const char *featname =3D virQEMUCapsCPUFeatureToQEMU(def->os.arch, cpu->features[i].nam= e); + switch ((virCPUFeaturePolicy) cpu->features[i].policy) { case VIR_CPU_FEATURE_FORCE: case VIR_CPU_FEATURE_REQUIRE: @@ -6164,7 +6170,12 @@ qemuBuildCpuModelArgStr(virQEMUDriver *driver, =20 case VIR_CPU_FEATURE_DISABLE: case VIR_CPU_FEATURE_FORBID: - virBufferAsprintf(buf, ",%s=3Doff", featname); + /* Features unknown to QEMU are implicitly disabled and we can= just + * skip them. */ + if (!knownFeatures || + g_strv_contains((const char **) knownFeatures, cpu->featur= es[i].name)) { + virBufferAsprintf(buf, ",%s=3Doff", featname); + } break; =20 case VIR_CPU_FEATURE_OPTIONAL: diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index a00066e88e..0e9e1a8efc 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -6212,26 +6212,6 @@ qemuProcessSetupHotpluggableVcpus(virDomainObj *vm, } =20 =20 -static bool -qemuProcessDropUnknownCPUFeatures(const char *name, - virCPUFeaturePolicy policy, - void *opaque) -{ - const char **features =3D opaque; - - if (policy !=3D VIR_CPU_FEATURE_DISABLE && - policy !=3D VIR_CPU_FEATURE_FORBID) - return true; - - if (g_strv_contains(features, name)) - return true; - - /* Features unknown to QEMU are implicitly disabled, we can just drop = them - * from the definition. */ - return false; -} - - static int qemuProcessUpdateGuestCPU(virDomainDef *def, virQEMUCaps *qemuCaps, @@ -6325,18 +6305,6 @@ qemuProcessUpdateGuestCPU(virDomainDef *def, &def->os.arch) < 0) return -1; =20 - if (ARCH_IS_X86(def->os.arch)) { - g_auto(GStrv) features =3D NULL; - - if (virQEMUCapsGetCPUFeatures(qemuCaps, def->virtType, false, &fea= tures) < 0) - return -1; - - if (features && - virCPUDefFilterFeatures(def->cpu, qemuProcessDropUnknownCPUFea= tures, - features) < 0) - return -1; - } - return 0; } =20 --=20 2.46.2 From nobody Sat Feb 7 09:00:41 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1728383313935965.6587001696213; Tue, 8 Oct 2024 03:28:33 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id D70AE1497; Tue, 8 Oct 2024 06:28:32 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id A82C51491; Tue, 8 Oct 2024 06:27:16 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id ABBEF13CA; Tue, 8 Oct 2024 06:27:11 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id C5EC612A6 for ; Tue, 8 Oct 2024 06:26:57 -0400 (EDT) Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-278-bb_xo9ljO_m0jSk7WTs_EQ-1; Tue, 08 Oct 2024 06:26:56 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 57D3B19560A2 for ; Tue, 8 Oct 2024 10:26:55 +0000 (UTC) Received: from orkuz (unknown [10.43.3.115]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id DACEA19560A2 for ; Tue, 8 Oct 2024 10:26:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1728383217; h=from:from: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; bh=wtc+GKhE6NpL/ld7HN/5UxQJkOT5YUdiXrjcwWvaWrw=; b=Djz0rKzPyxoSZchiutkfSh7cQa1GSBcg6DJoydRK1F9yDld5JxbDM1IbysuMq0qbRBlgKF 9Zhq+I2hVGHbWOi29il97GsSvo96tAJH0OzI19WVsvKiBKZEbNKBWZM0WYphhJvYSnmGla sMW9YAC/vtX2opbEkXQrUfABMXMgbcA= X-MC-Unique: bb_xo9ljO_m0jSk7WTs_EQ-1 From: Jiri Denemark To: devel@lists.libvirt.org Subject: [PATCH 3/7] cpu-data.py: Properly handle aliases Date: Tue, 8 Oct 2024 12:26:42 +0200 Message-ID: <52530b4bf4af46af947135a39cbceca86fbb4c51.1728383133.git.jdenemar@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: YLRMDEAOZW5R46B5FF4U35CXZSLZMYCO X-Message-ID-Hash: YLRMDEAOZW5R46B5FF4U35CXZSLZMYCO X-MailFrom: jdenemar@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1728383315153116600 Content-Type: text/plain; charset="utf-8" The script is used to create data files for cputest from QEMU replies. By ignoring aliases we might end up thinking a feature is not enabled by QEMU just because its name differs from the primary one in the CPU map. Signed-off-by: Jiri Denemark Reviewed-by: J=C3=A1n Tomko --- tests/cputestdata/cpu-data.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/cputestdata/cpu-data.py b/tests/cputestdata/cpu-data.py index 37fb2e3791..b280eed436 100755 --- a/tests/cputestdata/cpu-data.py +++ b/tests/cputestdata/cpu-data.py @@ -457,6 +457,11 @@ def parseMap(): for reg in _KEYS[data.tag] + _REGS[data.tag]: feature[reg] =3D int(data.attrib.get(reg, "0"), 0) cpuMap[f.attrib["name"]] =3D feature + + for alias in f.iterfind("alias"): + if alias.attrib["source"] =3D=3D "qemu": + cpuMap[alias.attrib["name"]] =3D feature + return cpuMap =20 =20 --=20 2.46.2 From nobody Sat Feb 7 09:00:41 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1728383348123710.9744140387976; Tue, 8 Oct 2024 03:29:08 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id EEDB8147D; Tue, 8 Oct 2024 06:29:06 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 8C88D1292; Tue, 8 Oct 2024 06:27:18 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 8DFB315A4; Tue, 8 Oct 2024 06:27:13 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id CB15D1392 for ; Tue, 8 Oct 2024 06:26:59 -0400 (EDT) Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-322-5denMpO9ON24gJZ9akLC7g-1; Tue, 08 Oct 2024 06:26:58 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 5F27119560B0 for ; Tue, 8 Oct 2024 10:26:57 +0000 (UTC) Received: from orkuz (unknown [10.43.3.115]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id E1C7419560A3 for ; Tue, 8 Oct 2024 10:26:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1728383219; h=from:from: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; bh=utuxRf+yXJXBXGFPPRX0x4ab4sI/zPxxJORYc1X3KW4=; b=Wf6YJ7YATLndDAO6Ryk3R+CSgS90U7wieqhz4V7m+33/Mnwrlr23ZVqiuG7hlPp7IXFkeo bDiib/vALDxJu63OcHZVu8JoFR5MiIz9KVWrzpHX3zKHfxkMgC+MKLWFsKIppDWUzT/yD1 ulQMDbliUr60ipOWmru8cy7XfT5SfWs= X-MC-Unique: 5denMpO9ON24gJZ9akLC7g-1 From: Jiri Denemark To: devel@lists.libvirt.org Subject: [PATCH 4/7] qemu: Translate vmx-invvpid-single-context-noglobals CPU feature Date: Tue, 8 Oct 2024 12:26:43 +0200 Message-ID: <96a2815ac7cde08f2951a4bf63b132d0140da449.1728383133.git.jdenemar@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: 7QW5JTCXYLWBBLLKWIM5Y3VEYK7JCRZ3 X-Message-ID-Hash: 7QW5JTCXYLWBBLLKWIM5Y3VEYK7JCRZ3 X-MailFrom: jdenemar@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1728383349153116600 Content-Type: text/plain; charset="utf-8" This feature is called "vmx-invept-single-context-noglobals" in QEMU and our CPU map even contains the appropriate alias. But we failed to actually translate the name when talking to QEMU. Signed-off-by: Jiri Denemark Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_capabilities.c | 1 + tests/cputestdata/x86_64-cpuid-Atom-P5362-enabled.xml | 2 +- tests/cputestdata/x86_64-cpuid-Atom-P5362-json.xml | 1 + tests/cputestdata/x86_64-cpuid-Cooperlake-enabled.xml | 2 +- tests/cputestdata/x86_64-cpuid-Cooperlake-json.xml | 1 + tests/cputestdata/x86_64-cpuid-Core-i7-8550U-enabled.xml | 2 +- tests/cputestdata/x86_64-cpuid-Core-i7-8550U-json.xml | 1 + tests/cputestdata/x86_64-cpuid-Xeon-Platinum-9242-enabled.xml | 2 +- tests/cputestdata/x86_64-cpuid-Xeon-Platinum-9242-json.xml | 1 + .../x86_64-cpuid-baseline-Cooperlake+Cascadelake.xml | 1 + 10 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 6a0f3e2ab7..1d7ac9803d 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -3570,6 +3570,7 @@ virQEMUCapsCPUFeatureTranslationTable virQEMUCapsCPUF= eaturesX86[] =3D { {"perfctr_core", "perfctr-core"}, {"perfctr_nb", "perfctr-nb"}, {"tsc_adjust", "tsc-adjust"}, + {"vmx-invvpid-single-context-noglobals", "vmx-invept-single-context-no= globals"}, {NULL, NULL} }; =20 diff --git a/tests/cputestdata/x86_64-cpuid-Atom-P5362-enabled.xml b/tests/= cputestdata/x86_64-cpuid-Atom-P5362-enabled.xml index 80c24facdf..77613d6071 100644 --- a/tests/cputestdata/x86_64-cpuid-Atom-P5362-enabled.xml +++ b/tests/cputestdata/x86_64-cpuid-Atom-P5362-enabled.xml @@ -10,7 +10,7 @@ - + diff --git a/tests/cputestdata/x86_64-cpuid-Atom-P5362-json.xml b/tests/cpu= testdata/x86_64-cpuid-Atom-P5362-json.xml index b334e9062c..ed30dfe008 100644 --- a/tests/cputestdata/x86_64-cpuid-Atom-P5362-json.xml +++ b/tests/cputestdata/x86_64-cpuid-Atom-P5362-json.xml @@ -50,6 +50,7 @@ + diff --git a/tests/cputestdata/x86_64-cpuid-Cooperlake-enabled.xml b/tests/= cputestdata/x86_64-cpuid-Cooperlake-enabled.xml index c42a69d102..08609a89a5 100644 --- a/tests/cputestdata/x86_64-cpuid-Cooperlake-enabled.xml +++ b/tests/cputestdata/x86_64-cpuid-Cooperlake-enabled.xml @@ -11,7 +11,7 @@ - + diff --git a/tests/cputestdata/x86_64-cpuid-Cooperlake-json.xml b/tests/cpu= testdata/x86_64-cpuid-Cooperlake-json.xml index 822deb46cf..8d91a319a3 100644 --- a/tests/cputestdata/x86_64-cpuid-Cooperlake-json.xml +++ b/tests/cputestdata/x86_64-cpuid-Cooperlake-json.xml @@ -46,6 +46,7 @@ + diff --git a/tests/cputestdata/x86_64-cpuid-Core-i7-8550U-enabled.xml b/tes= ts/cputestdata/x86_64-cpuid-Core-i7-8550U-enabled.xml index 19dd4f6f0c..424c2492bd 100644 --- a/tests/cputestdata/x86_64-cpuid-Core-i7-8550U-enabled.xml +++ b/tests/cputestdata/x86_64-cpuid-Core-i7-8550U-enabled.xml @@ -9,7 +9,7 @@ - + diff --git a/tests/cputestdata/x86_64-cpuid-Core-i7-8550U-json.xml b/tests/= cputestdata/x86_64-cpuid-Core-i7-8550U-json.xml index 5f7b2b49c4..662e88bc3b 100644 --- a/tests/cputestdata/x86_64-cpuid-Core-i7-8550U-json.xml +++ b/tests/cputestdata/x86_64-cpuid-Core-i7-8550U-json.xml @@ -47,6 +47,7 @@ + diff --git a/tests/cputestdata/x86_64-cpuid-Xeon-Platinum-9242-enabled.xml = b/tests/cputestdata/x86_64-cpuid-Xeon-Platinum-9242-enabled.xml index b830c52b8c..a8e24f2302 100644 --- a/tests/cputestdata/x86_64-cpuid-Xeon-Platinum-9242-enabled.xml +++ b/tests/cputestdata/x86_64-cpuid-Xeon-Platinum-9242-enabled.xml @@ -10,7 +10,7 @@ - + diff --git a/tests/cputestdata/x86_64-cpuid-Xeon-Platinum-9242-json.xml b/t= ests/cputestdata/x86_64-cpuid-Xeon-Platinum-9242-json.xml index 46faf74879..38e15ab63d 100644 --- a/tests/cputestdata/x86_64-cpuid-Xeon-Platinum-9242-json.xml +++ b/tests/cputestdata/x86_64-cpuid-Xeon-Platinum-9242-json.xml @@ -53,6 +53,7 @@ + diff --git a/tests/cputestdata/x86_64-cpuid-baseline-Cooperlake+Cascadelake= .xml b/tests/cputestdata/x86_64-cpuid-baseline-Cooperlake+Cascadelake.xml index bd28239199..c5731093a7 100644 --- a/tests/cputestdata/x86_64-cpuid-baseline-Cooperlake+Cascadelake.xml +++ b/tests/cputestdata/x86_64-cpuid-baseline-Cooperlake+Cascadelake.xml @@ -53,6 +53,7 @@ + --=20 2.46.2 From nobody Sat Feb 7 09:00:41 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1728383368341176.1240441130136; Tue, 8 Oct 2024 03:29:28 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 54CD11447; Tue, 8 Oct 2024 06:29:27 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 71F3315FC; Tue, 8 Oct 2024 06:27:19 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 9021AC5B; Tue, 8 Oct 2024 06:27:15 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id A0288144B for ; Tue, 8 Oct 2024 06:27:01 -0400 (EDT) Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-661-MmVC01ksNueiKftjhH7zSg-1; Tue, 08 Oct 2024 06:27:00 -0400 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 4CA74195608B for ; Tue, 8 Oct 2024 10:26:59 +0000 (UTC) Received: from orkuz (unknown [10.43.3.115]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id CFCCC1956052 for ; Tue, 8 Oct 2024 10:26:58 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1728383221; h=from:from: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; bh=7wdTosAoWXOq2SscQq/aQxgMasfWGgflFqLnr5r3/ho=; b=WOLAwnYoVdtK59xEywKmkNxkix1M8Qpoyf82VbKiJmkV2hO5YHxZ11LA7SdegfqCyjeAoC uCKdGn7Y19CmA5b8E4Xtwp6KMYEWg8TOtOyXXEGzYBD4/hTmoOLmcI7a6A2nCRLGQNcxRG WVpFUcrtDUio1UJs/dDu2HnR/Clx/QU= X-MC-Unique: MmVC01ksNueiKftjhH7zSg-1 From: Jiri Denemark To: devel@lists.libvirt.org Subject: [PATCH 5/7] qemu: Replace big condition in virQEMUCapsCPUFilterFeatures with array Date: Tue, 8 Oct 2024 12:26:44 +0200 Message-ID: <6dc8c5c4e1339e61edc43a17cc13e74a5a837240.1728383133.git.jdenemar@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: LUGRMEVRQP6F46RS5M3VUXR2ITBDSMEL X-Message-ID-Hash: LUGRMEVRQP6F46RS5M3VUXR2ITBDSMEL X-MailFrom: jdenemar@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1728383369234116600 Content-Type: text/plain; charset="utf-8" Signed-off-by: Jiri Denemark Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_capabilities.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 1d7ac9803d..f930ad2acf 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -3531,22 +3531,26 @@ virQEMUCapsProbeQMPSGXCapabilities(virQEMUCaps *qem= uCaps, * QEMU never supported them or they were dropped as they never did anythi= ng * useful. */ +const char *ignoredFeatures[] =3D { + "cmt", "mbm_total", "mbm_local", /* never supported by QEMU */ + "osxsave", "ospke", /* dropped from QEMU */ +}; + bool virQEMUCapsCPUFilterFeatures(const char *name, virCPUFeaturePolicy policy G_GNUC_UNUSED, void *opaque) { virArch *arch =3D opaque; + size_t i; =20 if (!ARCH_IS_X86(*arch)) return true; =20 - if (STREQ(name, "cmt") || - STREQ(name, "mbm_total") || - STREQ(name, "mbm_local") || - STREQ(name, "osxsave") || - STREQ(name, "ospke")) - return false; + for (i =3D 0; i < G_N_ELEMENTS(ignoredFeatures); i++) { + if (STREQ(name, ignoredFeatures[i])) + return false; + } =20 return true; } --=20 2.46.2 From nobody Sat Feb 7 09:00:41 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1728383431495653.5587451377319; Tue, 8 Oct 2024 03:30:31 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 779CD1577; Tue, 8 Oct 2024 06:30:30 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id A05CA150A; Tue, 8 Oct 2024 06:27:23 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 3754815FC; Tue, 8 Oct 2024 06:27:19 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 7890114EF for ; Tue, 8 Oct 2024 06:27:03 -0400 (EDT) Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-319-e5P9upRgNcKLtPQuiBknVQ-1; Tue, 08 Oct 2024 06:27:01 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 3584F1955EEA for ; Tue, 8 Oct 2024 10:27:01 +0000 (UTC) Received: from orkuz (unknown [10.43.3.115]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id B81D919560A2 for ; Tue, 8 Oct 2024 10:27:00 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1728383223; h=from:from: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; bh=c+f63xBMsdlx1R0rKfqEnxNSfH+l7ntQ+kh1J4Gy5mk=; b=eFsWx/KKxFXn9CWqIEFvL/D5XIdtZ0vQAKk1xJOoBYOXe84CPotp9bMTAK2JixYzOY3oxw HJK0A6P7dCK98oaUHNMKf6chrWK+z5YBjTk0IdXjVhdvN1rl2kp1K9Jx+IC19RSdUF963j QCH/MqkiSFb8sVqDyNUQiBHnuj4yzqI= X-MC-Unique: e5P9upRgNcKLtPQuiBknVQ-1 From: Jiri Denemark To: devel@lists.libvirt.org Subject: [PATCH 6/7] cpu_map: Drop vmx-ept-{uc,wb} features from CPU models Date: Tue, 8 Oct 2024 12:26:45 +0200 Message-ID: <16834b8addd7a34bdd15ecd454aec86c9fe51770.1728383133.git.jdenemar@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: DDGCGBQ7XBHOLLLMRIWMBO3AQLJ3SUZB X-Message-ID-Hash: DDGCGBQ7XBHOLLLMRIWMBO3AQLJ3SUZB X-MailFrom: jdenemar@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1728383433781116600 Content-Type: text/plain; charset="utf-8" Although QEMU knows and enables the corresponding MSR bits, it does not allow users to configure them (there are no names attached to them). They should have never been added to the CPU map and definitely not to CPU models as the features will always be considered disabled regardless on their actual state as QEMU will not report them. While we cannot drop them completely for backward compatibility, we can at least remove them from all CPU models. This is effectively no change for CPU models where the features were marked with added=3D'yes' because migration source would always remove the features from domain XML so not adding them to the live XML does not hurt. On the other side the destination could not ever be surprised by the features being suddenly enabled as QEMU never reports them, which means libvirt considers them disabled all the time. GraniteRapids CPU model is the only one which contains the feature ever since it was introduced in libvirt, but it was never possible to migrate a domain with such CPU. The source would always mark vmx-ept-wb as disabled and the destination without the fixes in this series would drop the feature from the XML completely as it is unsupported by QEMU and disabled, but when probing for the actual CPU created by QEMU libvirt would expect the feature to be enabled (as it is included in the CPU model and not explicitly mentioned in the domain definition) and fail the migration. There's nothing the source could do to workaround the behavior on the destination and migration to older libvirt will still be broken. But it's possible to migrate a domain with GraniteRapids to a destination with this series applied from both old and new source. Signed-off-by: Jiri Denemark Reviewed-by: J=C3=A1n Tomko --- src/cpu_map/sync_qemu_features_i386.py | 2 -- src/cpu_map/sync_qemu_models_i386.py | 3 +-- src/cpu_map/x86_Broadwell-IBRS.xml | 1 - src/cpu_map/x86_Broadwell-noTSX-IBRS.xml | 1 - src/cpu_map/x86_Broadwell-noTSX.xml | 1 - src/cpu_map/x86_Broadwell.xml | 1 - src/cpu_map/x86_Cascadelake-Server-noTSX.xml | 1 - src/cpu_map/x86_Cascadelake-Server.xml | 1 - src/cpu_map/x86_Cooperlake.xml | 1 - src/cpu_map/x86_GraniteRapids.xml | 1 - src/cpu_map/x86_Haswell-IBRS.xml | 1 - src/cpu_map/x86_Haswell-noTSX-IBRS.xml | 1 - src/cpu_map/x86_Haswell-noTSX.xml | 1 - src/cpu_map/x86_Haswell.xml | 1 - src/cpu_map/x86_Icelake-Server-noTSX.xml | 1 - src/cpu_map/x86_Icelake-Server.xml | 1 - src/cpu_map/x86_IvyBridge-IBRS.xml | 1 - src/cpu_map/x86_IvyBridge.xml | 1 - src/cpu_map/x86_Nehalem-IBRS.xml | 1 - src/cpu_map/x86_Nehalem.xml | 1 - src/cpu_map/x86_SandyBridge-IBRS.xml | 1 - src/cpu_map/x86_SandyBridge.xml | 1 - src/cpu_map/x86_SapphireRapids.xml | 1 - src/cpu_map/x86_Skylake-Client-IBRS.xml | 1 - src/cpu_map/x86_Skylake-Client-noTSX-IBRS.xml | 1 - src/cpu_map/x86_Skylake-Client.xml | 1 - src/cpu_map/x86_Skylake-Server-IBRS.xml | 1 - src/cpu_map/x86_Skylake-Server-noTSX-IBRS.xml | 1 - src/cpu_map/x86_Skylake-Server.xml | 1 - src/cpu_map/x86_Snowridge.xml | 1 - src/cpu_map/x86_Westmere-IBRS.xml | 1 - src/cpu_map/x86_Westmere.xml | 1 - src/qemu/qemu_capabilities.c | 1 + 33 files changed, 2 insertions(+), 34 deletions(-) diff --git a/src/cpu_map/sync_qemu_features_i386.py b/src/cpu_map/sync_qemu= _features_i386.py index 21df37e9d6..c78c0b2ac9 100755 --- a/src/cpu_map/sync_qemu_features_i386.py +++ b/src/cpu_map/sync_qemu_features_i386.py @@ -70,8 +70,6 @@ FEATURES_EXTRA =3D { 18: "cvt16", }, (0x0000048c,): { - 8: "vmx-ept-uc", - 14: "vmx-ept-wb", 41: "vmx-invvpid-single-context", # wrong name in qe= mu 43: "vmx-invvpid-single-context-noglobals", # wrong name in qe= mu } diff --git a/src/cpu_map/sync_qemu_models_i386.py b/src/cpu_map/sync_qemu_m= odels_i386.py index 06a8837b0a..408e07911e 100755 --- a/src/cpu_map/sync_qemu_models_i386.py +++ b/src/cpu_map/sync_qemu_models_i386.py @@ -278,8 +278,6 @@ def translate_feature(name): "MSR_VMX_EPT_EXECONLY": "vmx-ept-execonly", "MSR_VMX_EPT_PAGE_WALK_LENGTH_4": "vmx-page-walk-4", "MSR_VMX_EPT_PAGE_WALK_LENGTH_5": "vmx-page-walk-5", - "MSR_VMX_EPT_UC": "vmx-ept-uc", - "MSR_VMX_EPT_WB": "vmx-ept-wb", "MSR_VMX_EPT_2MB": "vmx-ept-2mb", "MSR_VMX_EPT_1GB": "vmx-ept-1gb", "MSR_VMX_EPT_INVEPT": "vmx-invept", @@ -307,6 +305,7 @@ def translate_feature(name): name in ("CPUID_EXT_MONITOR", "monitor"), name in ("MSR_VMX_BASIC_DUAL_MONITOR", "dual-monitor"), name in ("CPUID_EXT3_TOPOEXT", "topoext"), + name in ("MSR_VMX_EPT_UC", "MSR_VMX_EPT_WB"), ]) =20 if ignore: diff --git a/src/cpu_map/x86_Broadwell-IBRS.xml b/src/cpu_map/x86_Broadwell= -IBRS.xml index 1484903298..e87f54a102 100644 --- a/src/cpu_map/x86_Broadwell-IBRS.xml +++ b/src/cpu_map/x86_Broadwell-IBRS.xml @@ -78,7 +78,6 @@ - diff --git a/src/cpu_map/x86_Broadwell-noTSX-IBRS.xml b/src/cpu_map/x86_Bro= adwell-noTSX-IBRS.xml index 13f08435b7..59c2c08937 100644 --- a/src/cpu_map/x86_Broadwell-noTSX-IBRS.xml +++ b/src/cpu_map/x86_Broadwell-noTSX-IBRS.xml @@ -76,7 +76,6 @@ - diff --git a/src/cpu_map/x86_Broadwell-noTSX.xml b/src/cpu_map/x86_Broadwel= l-noTSX.xml index 4293b3aeee..b9b25d6b6c 100644 --- a/src/cpu_map/x86_Broadwell-noTSX.xml +++ b/src/cpu_map/x86_Broadwell-noTSX.xml @@ -75,7 +75,6 @@ - diff --git a/src/cpu_map/x86_Broadwell.xml b/src/cpu_map/x86_Broadwell.xml index 37dd1dabcf..2845a620ac 100644 --- a/src/cpu_map/x86_Broadwell.xml +++ b/src/cpu_map/x86_Broadwell.xml @@ -77,7 +77,6 @@ - diff --git a/src/cpu_map/x86_Cascadelake-Server-noTSX.xml b/src/cpu_map/x86= _Cascadelake-Server-noTSX.xml index 8c4cbf9c9a..a3b332c9c1 100644 --- a/src/cpu_map/x86_Cascadelake-Server-noTSX.xml +++ b/src/cpu_map/x86_Cascadelake-Server-noTSX.xml @@ -89,7 +89,6 @@ - diff --git a/src/cpu_map/x86_Cascadelake-Server.xml b/src/cpu_map/x86_Casca= delake-Server.xml index c7c4f6412f..9faad320e6 100644 --- a/src/cpu_map/x86_Cascadelake-Server.xml +++ b/src/cpu_map/x86_Cascadelake-Server.xml @@ -91,7 +91,6 @@ - diff --git a/src/cpu_map/x86_Cooperlake.xml b/src/cpu_map/x86_Cooperlake.xml index af428f2781..caccfc048c 100644 --- a/src/cpu_map/x86_Cooperlake.xml +++ b/src/cpu_map/x86_Cooperlake.xml @@ -100,7 +100,6 @@ - diff --git a/src/cpu_map/x86_GraniteRapids.xml b/src/cpu_map/x86_GraniteRap= ids.xml index 6f7030ce39..6dab7d7b09 100644 --- a/src/cpu_map/x86_GraniteRapids.xml +++ b/src/cpu_map/x86_GraniteRapids.xml @@ -129,7 +129,6 @@ - diff --git a/src/cpu_map/x86_Haswell-IBRS.xml b/src/cpu_map/x86_Haswell-IBR= S.xml index 57b980d14f..e2e3ce6b51 100644 --- a/src/cpu_map/x86_Haswell-IBRS.xml +++ b/src/cpu_map/x86_Haswell-IBRS.xml @@ -74,7 +74,6 @@ - diff --git a/src/cpu_map/x86_Haswell-noTSX-IBRS.xml b/src/cpu_map/x86_Haswe= ll-noTSX-IBRS.xml index fcae023ffb..c8d050b8d3 100644 --- a/src/cpu_map/x86_Haswell-noTSX-IBRS.xml +++ b/src/cpu_map/x86_Haswell-noTSX-IBRS.xml @@ -72,7 +72,6 @@ - diff --git a/src/cpu_map/x86_Haswell-noTSX.xml b/src/cpu_map/x86_Haswell-no= TSX.xml index 7404052065..d714ce5858 100644 --- a/src/cpu_map/x86_Haswell-noTSX.xml +++ b/src/cpu_map/x86_Haswell-noTSX.xml @@ -71,7 +71,6 @@ - diff --git a/src/cpu_map/x86_Haswell.xml b/src/cpu_map/x86_Haswell.xml index 99986c5c45..583649dbab 100644 --- a/src/cpu_map/x86_Haswell.xml +++ b/src/cpu_map/x86_Haswell.xml @@ -73,7 +73,6 @@ - diff --git a/src/cpu_map/x86_Icelake-Server-noTSX.xml b/src/cpu_map/x86_Ice= lake-Server-noTSX.xml index caba24ab35..8515b6518c 100644 --- a/src/cpu_map/x86_Icelake-Server-noTSX.xml +++ b/src/cpu_map/x86_Icelake-Server-noTSX.xml @@ -99,7 +99,6 @@ - diff --git a/src/cpu_map/x86_Icelake-Server.xml b/src/cpu_map/x86_Icelake-S= erver.xml index 5a864b2fad..9d0cc254c0 100644 --- a/src/cpu_map/x86_Icelake-Server.xml +++ b/src/cpu_map/x86_Icelake-Server.xml @@ -101,7 +101,6 @@ - diff --git a/src/cpu_map/x86_IvyBridge-IBRS.xml b/src/cpu_map/x86_IvyBridge= -IBRS.xml index 27d85d86c4..4822b546e9 100644 --- a/src/cpu_map/x86_IvyBridge-IBRS.xml +++ b/src/cpu_map/x86_IvyBridge-IBRS.xml @@ -66,7 +66,6 @@ - diff --git a/src/cpu_map/x86_IvyBridge.xml b/src/cpu_map/x86_IvyBridge.xml index 72031cfdc6..93edca17ca 100644 --- a/src/cpu_map/x86_IvyBridge.xml +++ b/src/cpu_map/x86_IvyBridge.xml @@ -65,7 +65,6 @@ - diff --git a/src/cpu_map/x86_Nehalem-IBRS.xml b/src/cpu_map/x86_Nehalem-IBR= S.xml index 0cfee14c0f..a6510aa99f 100644 --- a/src/cpu_map/x86_Nehalem-IBRS.xml +++ b/src/cpu_map/x86_Nehalem-IBRS.xml @@ -55,7 +55,6 @@ - diff --git a/src/cpu_map/x86_Nehalem.xml b/src/cpu_map/x86_Nehalem.xml index 74ee64ce1c..6c0dfba451 100644 --- a/src/cpu_map/x86_Nehalem.xml +++ b/src/cpu_map/x86_Nehalem.xml @@ -54,7 +54,6 @@ - diff --git a/src/cpu_map/x86_SandyBridge-IBRS.xml b/src/cpu_map/x86_SandyBr= idge-IBRS.xml index 297eea8e88..6d2b5028ee 100644 --- a/src/cpu_map/x86_SandyBridge-IBRS.xml +++ b/src/cpu_map/x86_SandyBridge-IBRS.xml @@ -58,7 +58,6 @@ - diff --git a/src/cpu_map/x86_SandyBridge.xml b/src/cpu_map/x86_SandyBridge.= xml index 20ea378c47..de3ad60e3d 100644 --- a/src/cpu_map/x86_SandyBridge.xml +++ b/src/cpu_map/x86_SandyBridge.xml @@ -57,7 +57,6 @@ - diff --git a/src/cpu_map/x86_SapphireRapids.xml b/src/cpu_map/x86_SapphireR= apids.xml index 40164a47e2..6321dd36d9 100644 --- a/src/cpu_map/x86_SapphireRapids.xml +++ b/src/cpu_map/x86_SapphireRapids.xml @@ -122,7 +122,6 @@ - diff --git a/src/cpu_map/x86_Skylake-Client-IBRS.xml b/src/cpu_map/x86_Skyl= ake-Client-IBRS.xml index f36a8bd210..7d0d3c7114 100644 --- a/src/cpu_map/x86_Skylake-Client-IBRS.xml +++ b/src/cpu_map/x86_Skylake-Client-IBRS.xml @@ -83,7 +83,6 @@ - diff --git a/src/cpu_map/x86_Skylake-Client-noTSX-IBRS.xml b/src/cpu_map/x8= 6_Skylake-Client-noTSX-IBRS.xml index 5150117db4..383270f5f9 100644 --- a/src/cpu_map/x86_Skylake-Client-noTSX-IBRS.xml +++ b/src/cpu_map/x86_Skylake-Client-noTSX-IBRS.xml @@ -81,7 +81,6 @@ - diff --git a/src/cpu_map/x86_Skylake-Client.xml b/src/cpu_map/x86_Skylake-C= lient.xml index 061c0dfaec..84789d642a 100644 --- a/src/cpu_map/x86_Skylake-Client.xml +++ b/src/cpu_map/x86_Skylake-Client.xml @@ -82,7 +82,6 @@ - diff --git a/src/cpu_map/x86_Skylake-Server-IBRS.xml b/src/cpu_map/x86_Skyl= ake-Server-IBRS.xml index bbd3c8998e..8cd25a2df4 100644 --- a/src/cpu_map/x86_Skylake-Server-IBRS.xml +++ b/src/cpu_map/x86_Skylake-Server-IBRS.xml @@ -88,7 +88,6 @@ - diff --git a/src/cpu_map/x86_Skylake-Server-noTSX-IBRS.xml b/src/cpu_map/x8= 6_Skylake-Server-noTSX-IBRS.xml index ee0d2a2fa3..f3877bfbec 100644 --- a/src/cpu_map/x86_Skylake-Server-noTSX-IBRS.xml +++ b/src/cpu_map/x86_Skylake-Server-noTSX-IBRS.xml @@ -86,7 +86,6 @@ - diff --git a/src/cpu_map/x86_Skylake-Server.xml b/src/cpu_map/x86_Skylake-S= erver.xml index 9d9d112d40..78bd727357 100644 --- a/src/cpu_map/x86_Skylake-Server.xml +++ b/src/cpu_map/x86_Skylake-Server.xml @@ -87,7 +87,6 @@ - diff --git a/src/cpu_map/x86_Snowridge.xml b/src/cpu_map/x86_Snowridge.xml index bc410bd8f8..b31ce6f9f5 100644 --- a/src/cpu_map/x86_Snowridge.xml +++ b/src/cpu_map/x86_Snowridge.xml @@ -81,7 +81,6 @@ - diff --git a/src/cpu_map/x86_Westmere-IBRS.xml b/src/cpu_map/x86_Westmere-I= BRS.xml index a5abe8a1e1..534c752ed9 100644 --- a/src/cpu_map/x86_Westmere-IBRS.xml +++ b/src/cpu_map/x86_Westmere-IBRS.xml @@ -53,7 +53,6 @@ - diff --git a/src/cpu_map/x86_Westmere.xml b/src/cpu_map/x86_Westmere.xml index 161f1a078e..4edc5b3839 100644 --- a/src/cpu_map/x86_Westmere.xml +++ b/src/cpu_map/x86_Westmere.xml @@ -54,7 +54,6 @@ - diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index f930ad2acf..45565326a5 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -3534,6 +3534,7 @@ virQEMUCapsProbeQMPSGXCapabilities(virQEMUCaps *qemuC= aps, const char *ignoredFeatures[] =3D { "cmt", "mbm_total", "mbm_local", /* never supported by QEMU */ "osxsave", "ospke", /* dropped from QEMU */ + "vmx-ept-uc", "vmx-ept-wb", /* never supported by QEMU */ }; =20 bool --=20 2.46.2 From nobody Sat Feb 7 09:00:41 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1728383486770579.1314333942681; Tue, 8 Oct 2024 03:31:26 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 996) id 9E4971298; Tue, 8 Oct 2024 06:31:25 -0400 (EDT) Received: from lists.libvirt.org (localhost [IPv6:::1]) by lists.libvirt.org (Postfix) with ESMTP id 44FEB15E7; Tue, 8 Oct 2024 06:27:26 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 996) id C7AE21602; Tue, 8 Oct 2024 06:27:20 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id C7587150A for ; Tue, 8 Oct 2024 06:27:05 -0400 (EDT) Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-381-lp77_hUVM4O_nswOtItDAA-1; Tue, 08 Oct 2024 06:27:03 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 1F92D1955F3E for ; Tue, 8 Oct 2024 10:27:03 +0000 (UTC) Received: from orkuz (unknown [10.43.3.115]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 9F89E300018D for ; Tue, 8 Oct 2024 10:27:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1728383225; h=from:from: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; bh=aA2XxN+3xjO9STfUfV0DttAQcl7yKOAgQujD6Qlypu8=; b=XDbNDglI6286uiJtizfmrO4pWSNHQ2ENT6Gofits5J2uIrJWWOguQ4akNAUry36VDddKo8 HnpP6n3IE7SW7REwVpCewa/lOxY1XMRTXKb/mV5yetBhoJARzObYibwQhKynM891V6QS6x ++ZY2BJtQ7xP28pY7k5mQefc3i32PDI= X-MC-Unique: lp77_hUVM4O_nswOtItDAA-1 From: Jiri Denemark To: devel@lists.libvirt.org Subject: [PATCH 7/7] cpu_map: Drop vmx-invvpid-single-context from CPU models Date: Tue, 8 Oct 2024 12:26:46 +0200 Message-ID: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: GKE5A4OLL6FGAXIUTCFN3Y2K5TOM4LW5 X-Message-ID-Hash: GKE5A4OLL6FGAXIUTCFN3Y2K5TOM4LW5 X-MailFrom: jdenemar@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-config-1; header-match-config-2; header-match-config-3; header-match-devel.lists.libvirt.org-0; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; suspicious-header X-Mailman-Version: 3.2.2 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1728383487851116600 Content-Type: text/plain; charset="utf-8" QEMU calls the same feature differently, but translating the names in libvirt does not make sense because the name in QEMU conflicts with another feature. QEMU will not change the name for compatibility reasons so we can just drop our invented name as it is not supported by QEMU. Apart from this slightly different reason behind the feature being unsupported by QEMU the situation is similar to vmx-ept-{uc,wb} dropped in the previous patch and so is the implications. Signed-off-by: Jiri Denemark Reviewed-by: J=C3=A1n Tomko --- src/cpu_map/sync_qemu_features_i386.py | 1 - src/cpu_map/sync_qemu_models_i386.py | 2 +- src/cpu_map/x86_Broadwell-IBRS.xml | 1 - src/cpu_map/x86_Broadwell-noTSX-IBRS.xml | 1 - src/cpu_map/x86_Broadwell-noTSX.xml | 1 - src/cpu_map/x86_Broadwell.xml | 1 - src/cpu_map/x86_Cascadelake-Server-noTSX.xml | 1 - src/cpu_map/x86_Cascadelake-Server.xml | 1 - src/cpu_map/x86_Cooperlake.xml | 1 - src/cpu_map/x86_GraniteRapids.xml | 1 - src/cpu_map/x86_Haswell-IBRS.xml | 1 - src/cpu_map/x86_Haswell-noTSX-IBRS.xml | 1 - src/cpu_map/x86_Haswell-noTSX.xml | 1 - src/cpu_map/x86_Haswell.xml | 1 - src/cpu_map/x86_Icelake-Server-noTSX.xml | 1 - src/cpu_map/x86_Icelake-Server.xml | 1 - src/cpu_map/x86_IvyBridge-IBRS.xml | 1 - src/cpu_map/x86_IvyBridge.xml | 1 - src/cpu_map/x86_Nehalem-IBRS.xml | 1 - src/cpu_map/x86_Nehalem.xml | 1 - src/cpu_map/x86_SandyBridge-IBRS.xml | 1 - src/cpu_map/x86_SandyBridge.xml | 1 - src/cpu_map/x86_SapphireRapids.xml | 1 - src/cpu_map/x86_Skylake-Client-IBRS.xml | 1 - src/cpu_map/x86_Skylake-Client-noTSX-IBRS.xml | 1 - src/cpu_map/x86_Skylake-Client.xml | 1 - src/cpu_map/x86_Skylake-Server-IBRS.xml | 1 - src/cpu_map/x86_Skylake-Server-noTSX-IBRS.xml | 1 - src/cpu_map/x86_Skylake-Server.xml | 1 - src/cpu_map/x86_Snowridge.xml | 1 - src/cpu_map/x86_Westmere-IBRS.xml | 1 - src/cpu_map/x86_Westmere.xml | 1 - src/qemu/qemu_capabilities.c | 1 + 33 files changed, 2 insertions(+), 32 deletions(-) diff --git a/src/cpu_map/sync_qemu_features_i386.py b/src/cpu_map/sync_qemu= _features_i386.py index c78c0b2ac9..15a7af85cb 100755 --- a/src/cpu_map/sync_qemu_features_i386.py +++ b/src/cpu_map/sync_qemu_features_i386.py @@ -70,7 +70,6 @@ FEATURES_EXTRA =3D { 18: "cvt16", }, (0x0000048c,): { - 41: "vmx-invvpid-single-context", # wrong name in qe= mu 43: "vmx-invvpid-single-context-noglobals", # wrong name in qe= mu } } diff --git a/src/cpu_map/sync_qemu_models_i386.py b/src/cpu_map/sync_qemu_m= odels_i386.py index 408e07911e..65ae031223 100755 --- a/src/cpu_map/sync_qemu_models_i386.py +++ b/src/cpu_map/sync_qemu_models_i386.py @@ -287,7 +287,6 @@ def translate_feature(name): "MSR_VMX_EPT_INVEPT_ALL_CONTEXT": "vmx-invept-all-context", "MSR_VMX_EPT_INVVPID": "vmx-invvpid", "MSR_VMX_EPT_INVVPID_SINGLE_ADDR": "vmx-invvpid-single-addr", - "MSR_VMX_EPT_INVVPID_SINGLE_CONTEXT": "vmx-invvpid-single-context", "MSR_VMX_EPT_INVVPID_ALL_CONTEXT": "vmx-invvpid-all-context", "MSR_VMX_EPT_INVVPID_SINGLE_CONTEXT_NOGLOBALS": "vmx-invvpid-singl= e-context-noglobals", =20 @@ -306,6 +305,7 @@ def translate_feature(name): name in ("MSR_VMX_BASIC_DUAL_MONITOR", "dual-monitor"), name in ("CPUID_EXT3_TOPOEXT", "topoext"), name in ("MSR_VMX_EPT_UC", "MSR_VMX_EPT_WB"), + name in ("MSR_VMX_EPT_INVVPID_SINGLE_CONTEXT"), ]) =20 if ignore: diff --git a/src/cpu_map/x86_Broadwell-IBRS.xml b/src/cpu_map/x86_Broadwell= -IBRS.xml index e87f54a102..4845931420 100644 --- a/src/cpu_map/x86_Broadwell-IBRS.xml +++ b/src/cpu_map/x86_Broadwell-IBRS.xml @@ -100,7 +100,6 @@ - diff --git a/src/cpu_map/x86_Broadwell-noTSX-IBRS.xml b/src/cpu_map/x86_Bro= adwell-noTSX-IBRS.xml index 59c2c08937..b1e7aa5d5e 100644 --- a/src/cpu_map/x86_Broadwell-noTSX-IBRS.xml +++ b/src/cpu_map/x86_Broadwell-noTSX-IBRS.xml @@ -98,7 +98,6 @@ - diff --git a/src/cpu_map/x86_Broadwell-noTSX.xml b/src/cpu_map/x86_Broadwel= l-noTSX.xml index b9b25d6b6c..24aa6a37bd 100644 --- a/src/cpu_map/x86_Broadwell-noTSX.xml +++ b/src/cpu_map/x86_Broadwell-noTSX.xml @@ -97,7 +97,6 @@ - diff --git a/src/cpu_map/x86_Broadwell.xml b/src/cpu_map/x86_Broadwell.xml index 2845a620ac..1b27489db2 100644 --- a/src/cpu_map/x86_Broadwell.xml +++ b/src/cpu_map/x86_Broadwell.xml @@ -99,7 +99,6 @@ - diff --git a/src/cpu_map/x86_Cascadelake-Server-noTSX.xml b/src/cpu_map/x86= _Cascadelake-Server-noTSX.xml index a3b332c9c1..d1d49fdd58 100644 --- a/src/cpu_map/x86_Cascadelake-Server-noTSX.xml +++ b/src/cpu_map/x86_Cascadelake-Server-noTSX.xml @@ -111,7 +111,6 @@ - diff --git a/src/cpu_map/x86_Cascadelake-Server.xml b/src/cpu_map/x86_Casca= delake-Server.xml index 9faad320e6..09840ce52f 100644 --- a/src/cpu_map/x86_Cascadelake-Server.xml +++ b/src/cpu_map/x86_Cascadelake-Server.xml @@ -112,7 +112,6 @@ - diff --git a/src/cpu_map/x86_Cooperlake.xml b/src/cpu_map/x86_Cooperlake.xml index caccfc048c..8f37df60de 100644 --- a/src/cpu_map/x86_Cooperlake.xml +++ b/src/cpu_map/x86_Cooperlake.xml @@ -122,7 +122,6 @@ - diff --git a/src/cpu_map/x86_GraniteRapids.xml b/src/cpu_map/x86_GraniteRap= ids.xml index 6dab7d7b09..9a94476459 100644 --- a/src/cpu_map/x86_GraniteRapids.xml +++ b/src/cpu_map/x86_GraniteRapids.xml @@ -151,7 +151,6 @@ - diff --git a/src/cpu_map/x86_Haswell-IBRS.xml b/src/cpu_map/x86_Haswell-IBR= S.xml index e2e3ce6b51..0fed6fbb78 100644 --- a/src/cpu_map/x86_Haswell-IBRS.xml +++ b/src/cpu_map/x86_Haswell-IBRS.xml @@ -96,7 +96,6 @@ - diff --git a/src/cpu_map/x86_Haswell-noTSX-IBRS.xml b/src/cpu_map/x86_Haswe= ll-noTSX-IBRS.xml index c8d050b8d3..f7bc81ba4d 100644 --- a/src/cpu_map/x86_Haswell-noTSX-IBRS.xml +++ b/src/cpu_map/x86_Haswell-noTSX-IBRS.xml @@ -94,7 +94,6 @@ - diff --git a/src/cpu_map/x86_Haswell-noTSX.xml b/src/cpu_map/x86_Haswell-no= TSX.xml index d714ce5858..7d17911917 100644 --- a/src/cpu_map/x86_Haswell-noTSX.xml +++ b/src/cpu_map/x86_Haswell-noTSX.xml @@ -93,7 +93,6 @@ - diff --git a/src/cpu_map/x86_Haswell.xml b/src/cpu_map/x86_Haswell.xml index 583649dbab..b121e15d4d 100644 --- a/src/cpu_map/x86_Haswell.xml +++ b/src/cpu_map/x86_Haswell.xml @@ -95,7 +95,6 @@ - diff --git a/src/cpu_map/x86_Icelake-Server-noTSX.xml b/src/cpu_map/x86_Ice= lake-Server-noTSX.xml index 8515b6518c..36596433cb 100644 --- a/src/cpu_map/x86_Icelake-Server-noTSX.xml +++ b/src/cpu_map/x86_Icelake-Server-noTSX.xml @@ -121,7 +121,6 @@ - diff --git a/src/cpu_map/x86_Icelake-Server.xml b/src/cpu_map/x86_Icelake-S= erver.xml index 9d0cc254c0..1e7ff355d5 100644 --- a/src/cpu_map/x86_Icelake-Server.xml +++ b/src/cpu_map/x86_Icelake-Server.xml @@ -122,7 +122,6 @@ - diff --git a/src/cpu_map/x86_IvyBridge-IBRS.xml b/src/cpu_map/x86_IvyBridge= -IBRS.xml index 4822b546e9..324152f856 100644 --- a/src/cpu_map/x86_IvyBridge-IBRS.xml +++ b/src/cpu_map/x86_IvyBridge-IBRS.xml @@ -85,7 +85,6 @@ - diff --git a/src/cpu_map/x86_IvyBridge.xml b/src/cpu_map/x86_IvyBridge.xml index 93edca17ca..49d587afab 100644 --- a/src/cpu_map/x86_IvyBridge.xml +++ b/src/cpu_map/x86_IvyBridge.xml @@ -84,7 +84,6 @@ - diff --git a/src/cpu_map/x86_Nehalem-IBRS.xml b/src/cpu_map/x86_Nehalem-IBR= S.xml index a6510aa99f..ac05a349db 100644 --- a/src/cpu_map/x86_Nehalem-IBRS.xml +++ b/src/cpu_map/x86_Nehalem-IBRS.xml @@ -74,7 +74,6 @@ - diff --git a/src/cpu_map/x86_Nehalem.xml b/src/cpu_map/x86_Nehalem.xml index 6c0dfba451..74b85701e8 100644 --- a/src/cpu_map/x86_Nehalem.xml +++ b/src/cpu_map/x86_Nehalem.xml @@ -73,7 +73,6 @@ - diff --git a/src/cpu_map/x86_SandyBridge-IBRS.xml b/src/cpu_map/x86_SandyBr= idge-IBRS.xml index 6d2b5028ee..d2071f3367 100644 --- a/src/cpu_map/x86_SandyBridge-IBRS.xml +++ b/src/cpu_map/x86_SandyBridge-IBRS.xml @@ -77,7 +77,6 @@ - diff --git a/src/cpu_map/x86_SandyBridge.xml b/src/cpu_map/x86_SandyBridge.= xml index de3ad60e3d..c5d342e0d0 100644 --- a/src/cpu_map/x86_SandyBridge.xml +++ b/src/cpu_map/x86_SandyBridge.xml @@ -76,7 +76,6 @@ - diff --git a/src/cpu_map/x86_SapphireRapids.xml b/src/cpu_map/x86_SapphireR= apids.xml index 6321dd36d9..1e53b30dd3 100644 --- a/src/cpu_map/x86_SapphireRapids.xml +++ b/src/cpu_map/x86_SapphireRapids.xml @@ -144,7 +144,6 @@ - diff --git a/src/cpu_map/x86_Skylake-Client-IBRS.xml b/src/cpu_map/x86_Skyl= ake-Client-IBRS.xml index 7d0d3c7114..892aef2031 100644 --- a/src/cpu_map/x86_Skylake-Client-IBRS.xml +++ b/src/cpu_map/x86_Skylake-Client-IBRS.xml @@ -105,7 +105,6 @@ - diff --git a/src/cpu_map/x86_Skylake-Client-noTSX-IBRS.xml b/src/cpu_map/x8= 6_Skylake-Client-noTSX-IBRS.xml index 383270f5f9..63e5a02296 100644 --- a/src/cpu_map/x86_Skylake-Client-noTSX-IBRS.xml +++ b/src/cpu_map/x86_Skylake-Client-noTSX-IBRS.xml @@ -103,7 +103,6 @@ - diff --git a/src/cpu_map/x86_Skylake-Client.xml b/src/cpu_map/x86_Skylake-C= lient.xml index 84789d642a..83cc6780c7 100644 --- a/src/cpu_map/x86_Skylake-Client.xml +++ b/src/cpu_map/x86_Skylake-Client.xml @@ -104,7 +104,6 @@ - diff --git a/src/cpu_map/x86_Skylake-Server-IBRS.xml b/src/cpu_map/x86_Skyl= ake-Server-IBRS.xml index 8cd25a2df4..84f67c6278 100644 --- a/src/cpu_map/x86_Skylake-Server-IBRS.xml +++ b/src/cpu_map/x86_Skylake-Server-IBRS.xml @@ -109,7 +109,6 @@ - diff --git a/src/cpu_map/x86_Skylake-Server-noTSX-IBRS.xml b/src/cpu_map/x8= 6_Skylake-Server-noTSX-IBRS.xml index f3877bfbec..081e30f5ad 100644 --- a/src/cpu_map/x86_Skylake-Server-noTSX-IBRS.xml +++ b/src/cpu_map/x86_Skylake-Server-noTSX-IBRS.xml @@ -108,7 +108,6 @@ - diff --git a/src/cpu_map/x86_Skylake-Server.xml b/src/cpu_map/x86_Skylake-S= erver.xml index 78bd727357..e814b8dcf3 100644 --- a/src/cpu_map/x86_Skylake-Server.xml +++ b/src/cpu_map/x86_Skylake-Server.xml @@ -108,7 +108,6 @@ - diff --git a/src/cpu_map/x86_Snowridge.xml b/src/cpu_map/x86_Snowridge.xml index b31ce6f9f5..b254c7d71e 100644 --- a/src/cpu_map/x86_Snowridge.xml +++ b/src/cpu_map/x86_Snowridge.xml @@ -103,7 +103,6 @@ - diff --git a/src/cpu_map/x86_Westmere-IBRS.xml b/src/cpu_map/x86_Westmere-I= BRS.xml index 534c752ed9..5d2fd81b8d 100644 --- a/src/cpu_map/x86_Westmere-IBRS.xml +++ b/src/cpu_map/x86_Westmere-IBRS.xml @@ -72,7 +72,6 @@ - diff --git a/src/cpu_map/x86_Westmere.xml b/src/cpu_map/x86_Westmere.xml index 4edc5b3839..abbfb186b4 100644 --- a/src/cpu_map/x86_Westmere.xml +++ b/src/cpu_map/x86_Westmere.xml @@ -73,7 +73,6 @@ - diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 45565326a5..0d4f8a5fcd 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -3535,6 +3535,7 @@ const char *ignoredFeatures[] =3D { "cmt", "mbm_total", "mbm_local", /* never supported by QEMU */ "osxsave", "ospke", /* dropped from QEMU */ "vmx-ept-uc", "vmx-ept-wb", /* never supported by QEMU */ + "vmx-invvpid-single-context", /* never supported by QEMU */ }; =20 bool --=20 2.46.2