From nobody Tue Feb 10 06:27:49 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.124 as permitted sender) client-ip=63.128.21.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 63.128.21.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=1605713092; cv=none; d=zohomail.com; s=zohoarc; b=Krcia6u8P3MpR5WyedwTD+TTsjZtRdO7O/wus3oo1qfNe4EgEyyV4hLpuECvFaDeIW6INo909i9QuE3tUwewbYYpwEI6Avjb8v1U44UyWTOcRuyfozUrqmuO9sXTFElj1C0aOGjIhZX2H1MaXTKOCaTdPXwHsC3LnARgkrNi/3c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1605713092; 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=7GoXZ8vKlZg90JAN9tgZksVbUWDKvHdy6RStIGl8g5E=; b=H6pdjBsvmbCmT3C5TQUFzrYI8wcGWmtuOsp+ix/JOgUBCfqEyPsq/yayHD9qZ/SE2SoMObiXdt1wnzmSjzJp/6UOdXo3ocn43h6EQW4BY7D5zom5jmoD7jfs/RkC2V4jfjVY2pv89nHPOKLDAsGrRZzitI0IZkpArmO6/fBBzHE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.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 [63.128.21.124]) by mx.zohomail.com with SMTPS id 1605713092715530.3768616167316; Wed, 18 Nov 2020 07:24:52 -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-194-dOx2iDGFMhaEbVRY5nRIug-1; Wed, 18 Nov 2020 10:24:48 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2BDFC5F9FF; Wed, 18 Nov 2020 15:24:42 +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 0BC814D; Wed, 18 Nov 2020 15:24:42 +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 CCE5B86380; Wed, 18 Nov 2020 15:24:41 +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 0AIFOXuE020942 for ; Wed, 18 Nov 2020 10:24:33 -0500 Received: by smtp.corp.redhat.com (Postfix) id 063DE60CD0; Wed, 18 Nov 2020 15:24:33 +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 46CCC60BE2; Wed, 18 Nov 2020 15:24:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605713091; 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=7GoXZ8vKlZg90JAN9tgZksVbUWDKvHdy6RStIGl8g5E=; b=JLwixTXMOVw0Cxlg9qAQgv4zY3t5fMY88lwrnNfnWR0bB2+niQr98bgEZtfrkAbOaNi1VT 9cCCMu42vAzQqrycjQzKPXfLJj0J7gsWIs9/ediLBQBUkNcG89AgJs0H3fn6AD7uxyMqJX 3bkdy5boUpS6sIrHF/CkiXSJ/BPMD8I= X-MC-Unique: dOx2iDGFMhaEbVRY5nRIug-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH v2 6/9] cpu_map: sync_qemu_cpu_i386: Translate qemu feature pretty names Date: Wed, 18 Nov 2020 16:24:15 +0100 Message-Id: <20201118152418.115450-7-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.11 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" If a feature is added (or removed) in a QEMU CPU model version, we get to see the QEMU pretty name for the feature, not the name of the macro. Signed-off-by: Tim Wiederhake --- src/cpu_map/sync_qemu_i386.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/cpu_map/sync_qemu_i386.py b/src/cpu_map/sync_qemu_i386.py index 2219e67454..b27e5793ff 100755 --- a/src/cpu_map/sync_qemu_i386.py +++ b/src/cpu_map/sync_qemu_i386.py @@ -158,6 +158,7 @@ def translate_feature(name): name =3D=3D "0", name.startswith("VMX_"), name.startswith("MSR_VMX_"), + name.startswith("vmx-"), =20 # set to "no auto enable" by qemu name =3D=3D "CPUID_EXT3_TOPOEXT", @@ -170,6 +171,10 @@ def translate_feature(name): if name in T: return T[name] =20 + for v in T.values(): + if name.replace("-", "_") =3D=3D v.replace("-", "_"): + return v + print("warning: Unknown feature '{}'".format(name)) return name =20 --=20 2.26.2