From nobody Tue Feb 10 04:16:35 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 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=1605713181; cv=none; d=zohomail.com; s=zohoarc; b=nVMtm4/Nq8IMP9CgihDoBF3FH8bRe0zkWo3rox09xhI5OdZuxQZxm9+tnKWIUlX9pLVLRddulAl4YfFDEk1cPo92HLPfJYpBUYepP1quyOW42prOMDP4fKhzpVc26CrnGBIzjmY71fyJdrr11G/DI1kanlUpDkWDDf+f12PptbU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1605713181; 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=lTaqSJu9z9Xn9VWcCKM0/vMCRHRxqWXfE0TiQJeVxLI=; b=D5O3KSF0WFWSDTqu5ZctPeWupz6+bOEu8xQz2RRqY4PEk0Nd4GqUX4vdVBpEgxaV918he20pupquU86CzO3ctzNjd3+glaEGZUJjEBMDh1O7YXwb3l7YEuifPO2WQSjpqvtchGoCuY0dFS8knd3jGBZ/4dyBfxQz/gBJisuyQtI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 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-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1605713181680343.1818620187688; Wed, 18 Nov 2020 07:26:21 -0800 (PST) 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-419-2b4UxugoN3m1htwQoGyg3w-1; Wed, 18 Nov 2020 10:24:47 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 7ACCF81440E; Wed, 18 Nov 2020 15:24:38 +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 5A2A85D9CA; Wed, 18 Nov 2020 15:24:38 +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 1F4A618095C9; Wed, 18 Nov 2020 15:24:38 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 0AIFOV4Q020931 for ; Wed, 18 Nov 2020 10:24:31 -0500 Received: by smtp.corp.redhat.com (Postfix) id E4F3860C05; Wed, 18 Nov 2020 15:24:31 +0000 (UTC) Received: from work.redhat.com (ovpn-114-34.ams2.redhat.com [10.36.114.34]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2206660BE2; Wed, 18 Nov 2020 15:24:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605713180; 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=lTaqSJu9z9Xn9VWcCKM0/vMCRHRxqWXfE0TiQJeVxLI=; b=Z+NBpBIAlcn6lWQx3+8QifV9jfYmVVZ1VHptGx+GAMr47jpKdkCNokgqOwmYZMBbjGqRLL 0GjVWQEtPKoJV2zUXaHjdO+wNvitNwo1Fa0U6AUKTDbTEfzsqmTr6sUzpPP2DAzTTrbliS K8YCrL9caqJQoBEOVJVHEAzpTZglUfU= X-MC-Unique: 2b4UxugoN3m1htwQoGyg3w-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH v2 5/9] cpu_map: sync_qemu_cpu_i386: Simplify ignore features Date: Wed, 18 Nov 2020 16:24:14 +0100 Message-Id: <20201118152418.115450-6-twiederh@redhat.com> In-Reply-To: <20201118152418.115450-1-twiederh@redhat.com> References: <20201118152418.115450-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Cc: Tim Wiederhake 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.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com 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" Signed-off-by: Tim Wiederhake --- src/cpu_map/sync_qemu_i386.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/cpu_map/sync_qemu_i386.py b/src/cpu_map/sync_qemu_i386.py index 21981c58f1..2219e67454 100755 --- a/src/cpu_map/sync_qemu_i386.py +++ b/src/cpu_map/sync_qemu_i386.py @@ -152,14 +152,20 @@ def translate_feature(name): "MSR_ARCH_CAP_SKIP_L1DFL_VMENTRY": "skip-l1dfl-vmentry", "MSR_ARCH_CAP_TAA_NO": "taa-no", "MSR_CORE_CAP_SPLIT_LOCK_DETECT": "split-lock-detect", + } =20 - # always disabled features - "0": None, + ignore =3D ( + name =3D=3D "0", + name.startswith("VMX_"), + name.startswith("MSR_VMX_"), =20 # set to "no auto enable" by qemu - "CPUID_EXT3_TOPOEXT": None, - "MSR_VMX_BASIC_DUAL_MONITOR": None, - } + name =3D=3D "CPUID_EXT3_TOPOEXT", + name =3D=3D "MSR_VMX_BASIC_DUAL_MONITOR", + ) + + if any(ignore): + return None =20 if name in T: return T[name] @@ -291,8 +297,6 @@ def expand_model(model): for k in [k for k in model if k.startswith(".features")]: v =3D model.pop(k) for feature in v.split(): - if feature.startswith("VMX_") or feature.startswith("MSR_VMX_"= ): - continue translated =3D translate_feature(feature) if translated: result["features"].add(translated) --=20 2.26.2