From nobody Fri Apr 19 19:50:33 2024 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=1605713079; cv=none; d=zohomail.com; s=zohoarc; b=Vl+QZmoQwc75JIiOqRh0JF4NAFiH3mL3JuF++jrVXIA4o7BlYEsYmpl653JANxtQxeIXjowScjm1mI29OaMQtrPrSQffqywh9+WAKVAJdeKUylxUwjvIugRGjP9VTorBZsDhQpWvdhw8yNFJmrORHDfkkfXsJ2Bv/vK9uS7zmiU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1605713079; 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=iqG8xCRvTkoWe1g6yEGMdxgghe/1iGLEKpQhV/2qC4E=; b=N2282GsYbS1H0CJJY8ySxcxTaKfEQJqSyiqw/ABA0W9f6Tv6NLv+v5lniWHwlb1kKa8mGTIvk3aVPMi9gy46fbyNCST1teItLv/iv2AuLxPO+cVrz3loju3MIddANv2rSoiyvPBGvyxvbe1+s+1sw6BlLGd46WcGN6Bb9skNB8c= 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 1605713079409123.13360671108217; Wed, 18 Nov 2020 07:24:39 -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-473-W7EdfDVFM-6vCgzhbNpB8A-1; Wed, 18 Nov 2020 10:24:35 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 3462E1005D4C; Wed, 18 Nov 2020 15:24:29 +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 217C35D6A1; Wed, 18 Nov 2020 15:24:28 +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 BE7DD5813E; Wed, 18 Nov 2020 15:24:26 +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 0AIFOOx0020893 for ; Wed, 18 Nov 2020 10:24:24 -0500 Received: by smtp.corp.redhat.com (Postfix) id 52DEB60C05; Wed, 18 Nov 2020 15:24:24 +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 9192E60BE2; Wed, 18 Nov 2020 15:24:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605713078; 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=iqG8xCRvTkoWe1g6yEGMdxgghe/1iGLEKpQhV/2qC4E=; b=ccEMzRnw3h/i0toTIUR0RkxI9r9iuBRBa9tMSC4CSTnQOC5fxP8GaRRMamyi4ToV32GtLv UD9naBTtr1dBTEPLJVV0S5UXEdDEH9RyT3rGmL3WDzBhgGtVNKtBPumoDxno6IqZrJ1G8X KMRSAe0Hqst43MjsV8JPpJZ15tSQQ64= X-MC-Unique: W7EdfDVFM-6vCgzhbNpB8A-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH v2 1/9] cpu_map: sync_qemu_cpu_i386: Translate features in model versions Date: Wed, 18 Nov 2020 16:24:10 +0100 Message-Id: <20201118152418.115450-2-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.15 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 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/cpu_map/sync_qemu_i386.py b/src/cpu_map/sync_qemu_i386.py index 8deda869df..82413d831e 100755 --- a/src/cpu_map/sync_qemu_i386.py +++ b/src/cpu_map/sync_qemu_i386.py @@ -292,6 +292,8 @@ def expand_model(model): =20 props =3D version.pop(".props", dict()) for k, v in props: + if k not in ("model-id", "stepping", "model"): + k =3D T.get(k, k) if v =3D=3D "on": result["features"].add(k) elif v =3D=3D "off" and k in result["features"]: --=20 2.26.2 From nobody Fri Apr 19 19:50:33 2024 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=1605713091; cv=none; d=zohomail.com; s=zohoarc; b=Jq5/KmW5SarA2NUu6LgfAKfsZuhZ1oYkpLA0oT1N6futw7LwuO8VcXmotpYcrUFAPMer26Q27v6S3oXOaC8BMhtsFNOlqadG2ElCO1wHZA+GXXH4w9DAynGoBCIm88/HgPOfjYP8VUO4pXjCvnxL5/NlsF4C0T1X3WiAyJyndTo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1605713091; 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=6JAjkxN5XWw6sAL5vRgTCjSQ47QspKHHLhg0FUa7w0o=; b=FzMOqvOgX+yX92TeYWp2gLvXhH1j7Vik75YrkRGH/ZIki5HDcyQZCUvd351LwHp144fZnHa/CrFgC1Wdzf/w2svQyQk5SBNxpyixVWMIzi9xf4B48kwCdz5pArgMtaU5IisvNMOC5BseiIUZL9y48gTNvL7aAxxYNhRFKl536LE= 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 16057130911851005.709845627097; Wed, 18 Nov 2020 07:24:51 -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-457-ODXLNJuQNSGzZsfKaztE0w-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 75524814418; Wed, 18 Nov 2020 15:24:39 +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 2E8185D9CA; Wed, 18 Nov 2020 15:24:39 +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 E50711809CA0; 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 0AIFOSVW020908 for ; Wed, 18 Nov 2020 10:24:28 -0500 Received: by smtp.corp.redhat.com (Postfix) id 8717860CD0; Wed, 18 Nov 2020 15:24:28 +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 AA1DF60BE2; Wed, 18 Nov 2020 15:24:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605713090; 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=6JAjkxN5XWw6sAL5vRgTCjSQ47QspKHHLhg0FUa7w0o=; b=BiLN1XRohP+2TOxRQW4oLpDJAysBxAc35vQh5UjMiPQEgSymqi0XsuB1LlZeApSt7ljcj3 bXL5Vg1iTiGeqOvYnACvwQaaiAhVABXoDfE3IlKq5kApdXK5KO3T9Yj2yL2XeeLBnpaGwY lLT61w2PxqAiDR3GSbnZrmD5zyqqp+4= X-MC-Unique: ODXLNJuQNSGzZsfKaztE0w-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH v2 2/9] cpu_map: sync_qemu_cpu_i386: Factor out translation of vendors Date: Wed, 18 Nov 2020 16:24:11 +0100 Message-Id: <20201118152418.115450-3-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 | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/src/cpu_map/sync_qemu_i386.py b/src/cpu_map/sync_qemu_i386.py index 82413d831e..fe95f26511 100755 --- a/src/cpu_map/sync_qemu_i386.py +++ b/src/cpu_map/sync_qemu_i386.py @@ -8,11 +8,6 @@ import re =20 =20 T =3D { - # translating qemu -> libvirt cpu vendor names - "CPUID_VENDOR_AMD": "AMD", - "CPUID_VENDOR_INTEL": "Intel", - "CPUID_VENDOR_HYGON": "Hygon", - # translating qemu -> libvirt cpu feature names "CPUID_6_EAX_ARAT": "arat", "CPUID_7_0_EBX_ADX": "adx", @@ -152,6 +147,20 @@ T =3D { } =20 =20 +def translate_vendor(name): + T =3D { + "CPUID_VENDOR_AMD": "AMD", + "CPUID_VENDOR_INTEL": "Intel", + "CPUID_VENDOR_HYGON": "Hygon", + } + + if name in T: + return T[name] + + print("warning: Unknown vendor '{}'".format(name)) + return name + + def readline_cont(f): """Read one logical line from a file `f` i.e. continues lines that end= in a backslash.""" @@ -264,7 +273,7 @@ def expand_model(model): =20 result =3D { "name": model.pop(".name"), - "vendor": T[model.pop(".vendor")], + "vendor": translate_vendor(model.pop(".vendor")), "features": set(), "extra": dict()} =20 --=20 2.26.2 From nobody Fri Apr 19 19:50:33 2024 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=1605713083; cv=none; d=zohomail.com; s=zohoarc; b=JuOjrgUqA/jpLHYmpJW8pD0PZOOvcNOgDguRDO8cMJLj8An6CuYGkIk/3lOEYxx6APOHFzwLGLEAgwmNgNLeZex0OmvLYvbbWmELq1PV5CAnCrn6PL+pAlEuQ/7QgeZSULTudwicyiKWP0yeG27pztFC/VeZlCROH5xWr4Mai4k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1605713083; 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=Lw5WVgdNtRBOoAppdnQVrc4EIPH7y85iLBu1H+Dw0Lc=; b=E5G5fqJqIBbOjxx5wpceNRNrCVhRyuraQN0SQVWCbKqOgHx6ABcQgwUYMDbBByKqqUahZQk/nYPqj0rQtZOFfdJ1St0Lj1TEPYjJuhNp3bgtZ4anGH3DgjIFQPf6+eFB9lJrRXH7KDOV6emcB8SR8ejj6Lmv8ZeqrK7HZ2BPd/s= 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 1605713083156323.4575936845239; Wed, 18 Nov 2020 07:24:43 -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-14-KiGyALBzN6-p2LVqPELuLw-1; Wed, 18 Nov 2020 10:24:38 -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 56835187653A; Wed, 18 Nov 2020 15:24:32 +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 2AFDB5D9D2; Wed, 18 Nov 2020 15:24:32 +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 E7F975813B; Wed, 18 Nov 2020 15:24:31 +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 0AIFOT5H020913 for ; Wed, 18 Nov 2020 10:24:29 -0500 Received: by smtp.corp.redhat.com (Postfix) id AB22460CD0; Wed, 18 Nov 2020 15:24:29 +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 DEF2460BE2; Wed, 18 Nov 2020 15:24:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605713081; 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=Lw5WVgdNtRBOoAppdnQVrc4EIPH7y85iLBu1H+Dw0Lc=; b=IfTbiqiZ3EHdnsu6rG0sTHI3UlcVUCh3q3YFBnNrT17Ivt8Wmn8F3fTGOs8hJWjE2ZtANX qE+WpnxyYxgyCosWIdPPje5mXDp/5O+sKLOSBpDgwa/Nha6ONsuSoN5BcW9HAu379+MKgb K19aWZW+HUQawd8eOjB4vGuzrrZGjis= X-MC-Unique: KiGyALBzN6-p2LVqPELuLw-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH v2 3/9] cpu_map: sync_qemu_cpu_i386: Factor out translation of features Date: Wed, 18 Nov 2020 16:24:12 +0100 Message-Id: <20201118152418.115450-4-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 | 291 +++++++++++++++++----------------- 1 file changed, 149 insertions(+), 142 deletions(-) diff --git a/src/cpu_map/sync_qemu_i386.py b/src/cpu_map/sync_qemu_i386.py index fe95f26511..6a5a02dbd1 100755 --- a/src/cpu_map/sync_qemu_i386.py +++ b/src/cpu_map/sync_qemu_i386.py @@ -7,146 +7,6 @@ import os import re =20 =20 -T =3D { - # translating qemu -> libvirt cpu feature names - "CPUID_6_EAX_ARAT": "arat", - "CPUID_7_0_EBX_ADX": "adx", - "CPUID_7_0_EBX_AVX2": "avx2", - "CPUID_7_0_EBX_AVX512BW": "avx512bw", - "CPUID_7_0_EBX_AVX512CD": "avx512cd", - "CPUID_7_0_EBX_AVX512DQ": "avx512dq", - "CPUID_7_0_EBX_AVX512ER": "avx512er", - "CPUID_7_0_EBX_AVX512F": "avx512f", - "CPUID_7_0_EBX_AVX512PF": "avx512pf", - "CPUID_7_0_EBX_AVX512VL": "avx512vl", - "CPUID_7_0_EBX_BMI1": "bmi1", - "CPUID_7_0_EBX_BMI2": "bmi2", - "CPUID_7_0_EBX_CLFLUSHOPT": "clflushopt", - "CPUID_7_0_EBX_CLWB": "clwb", - "CPUID_7_0_EBX_ERMS": "erms", - "CPUID_7_0_EBX_FSGSBASE": "fsgsbase", - "CPUID_7_0_EBX_HLE": "hle", - "CPUID_7_0_EBX_INVPCID": "invpcid", - "CPUID_7_0_EBX_MPX": "mpx", - "CPUID_7_0_EBX_RDSEED": "rdseed", - "CPUID_7_0_EBX_RTM": "rtm", - "CPUID_7_0_EBX_SHA_NI": "sha-ni", - "CPUID_7_0_EBX_SMAP": "smap", - "CPUID_7_0_EBX_SMEP": "smep", - "CPUID_7_0_ECX_AVX512BITALG": "avx512bitalg", - "CPUID_7_0_ECX_AVX512_VBMI2": "avx512vbmi2", - "CPUID_7_0_ECX_AVX512_VBMI": "avx512vbmi", - "CPUID_7_0_ECX_AVX512VNNI": "avx512vnni", - "CPUID_7_0_ECX_AVX512_VPOPCNTDQ": "avx512-vpopcntdq", - "CPUID_7_0_ECX_CLDEMOTE": "cldemote", - "CPUID_7_0_ECX_GFNI": "gfni", - "CPUID_7_0_ECX_LA57": "la57", - "CPUID_7_0_ECX_MOVDIR64B": "movdir64b", - "CPUID_7_0_ECX_MOVDIRI": "movdiri", - "CPUID_7_0_ECX_PKU": "pku", - "CPUID_7_0_ECX_RDPID": "rdpid", - "CPUID_7_0_ECX_UMIP": "umip", - "CPUID_7_0_ECX_VAES": "vaes", - "CPUID_7_0_ECX_VPCLMULQDQ": "vpclmulqdq", - "CPUID_7_0_EDX_ARCH_CAPABILITIES": "arch-capabilities", - "CPUID_7_0_EDX_AVX512_4FMAPS": "avx512-4fmaps", - "CPUID_7_0_EDX_AVX512_4VNNIW": "avx512-4vnniw", - "CPUID_7_0_EDX_CORE_CAPABILITY": "core-capability", - "CPUID_7_0_EDX_SPEC_CTRL": "spec-ctrl", - "CPUID_7_0_EDX_SPEC_CTRL_SSBD": "ssbd", - "CPUID_7_0_EDX_STIBP": "stibp", - "CPUID_7_1_EAX_AVX512_BF16": "avx512-bf16", - "CPUID_8000_0008_EBX_CLZERO": "clzero", - "CPUID_8000_0008_EBX_IBPB": "ibpb", - "CPUID_8000_0008_EBX_STIBP": "amd-stibp", - "CPUID_8000_0008_EBX_WBNOINVD": "wbnoinvd", - "CPUID_8000_0008_EBX_XSAVEERPTR": "xsaveerptr", - "CPUID_ACPI": "acpi", - "CPUID_APIC": "apic", - "CPUID_CLFLUSH": "clflush", - "CPUID_CMOV": "cmov", - "CPUID_CX8": "cx8", - "CPUID_DE": "de", - "CPUID_EXT2_3DNOW": "3dnow", - "CPUID_EXT2_3DNOWEXT": "3dnowext", - "CPUID_EXT2_FFXSR": "fxsr_opt", - "CPUID_EXT2_LM": "lm", - "CPUID_EXT2_MMXEXT": "mmxext", - "CPUID_EXT2_NX": "nx", - "CPUID_EXT2_PDPE1GB": "pdpe1gb", - "CPUID_EXT2_RDTSCP": "rdtscp", - "CPUID_EXT2_SYSCALL": "syscall", - "CPUID_EXT3_3DNOWPREFETCH": "3dnowprefetch", - "CPUID_EXT3_ABM": "abm", - "CPUID_EXT3_CR8LEG": "cr8legacy", - "CPUID_EXT3_FMA4": "fma4", - "CPUID_EXT3_LAHF_LM": "lahf_lm", - "CPUID_EXT3_MISALIGNSSE": "misalignsse", - "CPUID_EXT3_OSVW": "osvw", - "CPUID_EXT3_PERFCORE": "perfctr_core", - "CPUID_EXT3_SSE4A": "sse4a", - "CPUID_EXT3_SVM": "svm", - "CPUID_EXT3_TBM": "tbm", - "CPUID_EXT3_XOP": "xop", - "CPUID_EXT_AES": "aes", - "CPUID_EXT_AVX": "avx", - "CPUID_EXT_CX16": "cx16", - "CPUID_EXT_F16C": "f16c", - "CPUID_EXT_FMA": "fma", - "CPUID_EXT_MOVBE": "movbe", - "CPUID_EXT_PCID": "pcid", - "CPUID_EXT_PCLMULQDQ": "pclmuldq", - "CPUID_EXT_POPCNT": "popcnt", - "CPUID_EXT_RDRAND": "rdrand", - "CPUID_EXT_SSE3": "pni", - "CPUID_EXT_SSE41": "sse4.1", - "CPUID_EXT_SSE42": "sse4.2", - "CPUID_EXT_SSSE3": "ssse3", - "CPUID_EXT_TSC_DEADLINE_TIMER": "tsc-deadline", - "CPUID_EXT_X2APIC": "x2apic", - "CPUID_EXT_XSAVE": "xsave", - "CPUID_FP87": "fpu", - "CPUID_FXSR": "fxsr", - "CPUID_MCA": "mca", - "CPUID_MCE": "mce", - "CPUID_MMX": "mmx", - "CPUID_MSR": "msr", - "CPUID_MTRR": "mtrr", - "CPUID_PAE": "pae", - "CPUID_PAT": "pat", - "CPUID_PGE": "pge", - "CPUID_PSE36": "pse36", - "CPUID_PSE": "pse", - "CPUID_SEP": "sep", - "CPUID_SSE2": "sse2", - "CPUID_SSE": "sse", - "CPUID_SS": "ss", - "CPUID_SVM_NPT": "npt", - "CPUID_SVM_NRIPSAVE": "nrip-save", - "CPUID_TSC": "tsc", - "CPUID_VME": "vme", - "CPUID_XSAVE_XGETBV1": "xgetbv1", - "CPUID_XSAVE_XSAVEC": "xsavec", - "CPUID_XSAVE_XSAVEOPT": "xsaveopt", - "CPUID_XSAVE_XSAVES": "xsaves", - "MSR_ARCH_CAP_IBRS_ALL": "ibrs-all", - "MSR_ARCH_CAP_MDS_NO": "mds-no", - "MSR_ARCH_CAP_PSCHANGE_MC_NO": "pschange-mc-no", - "MSR_ARCH_CAP_RDCL_NO": "rdctl-no", - "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", - - # always disabled features - "CPUID_EXT_MONITOR": None, - "0": None, - - # set to "no auto enable" by qemu - "CPUID_EXT3_TOPOEXT": None, - "MSR_VMX_BASIC_DUAL_MONITOR": None, -} - - def translate_vendor(name): T =3D { "CPUID_VENDOR_AMD": "AMD", @@ -161,6 +21,153 @@ def translate_vendor(name): return name =20 =20 +def translate_feature(name): + T =3D { + # translating qemu -> libvirt cpu feature names + "CPUID_6_EAX_ARAT": "arat", + "CPUID_7_0_EBX_ADX": "adx", + "CPUID_7_0_EBX_AVX2": "avx2", + "CPUID_7_0_EBX_AVX512BW": "avx512bw", + "CPUID_7_0_EBX_AVX512CD": "avx512cd", + "CPUID_7_0_EBX_AVX512DQ": "avx512dq", + "CPUID_7_0_EBX_AVX512ER": "avx512er", + "CPUID_7_0_EBX_AVX512F": "avx512f", + "CPUID_7_0_EBX_AVX512PF": "avx512pf", + "CPUID_7_0_EBX_AVX512VL": "avx512vl", + "CPUID_7_0_EBX_BMI1": "bmi1", + "CPUID_7_0_EBX_BMI2": "bmi2", + "CPUID_7_0_EBX_CLFLUSHOPT": "clflushopt", + "CPUID_7_0_EBX_CLWB": "clwb", + "CPUID_7_0_EBX_ERMS": "erms", + "CPUID_7_0_EBX_FSGSBASE": "fsgsbase", + "CPUID_7_0_EBX_HLE": "hle", + "CPUID_7_0_EBX_INVPCID": "invpcid", + "CPUID_7_0_EBX_MPX": "mpx", + "CPUID_7_0_EBX_RDSEED": "rdseed", + "CPUID_7_0_EBX_RTM": "rtm", + "CPUID_7_0_EBX_SHA_NI": "sha-ni", + "CPUID_7_0_EBX_SMAP": "smap", + "CPUID_7_0_EBX_SMEP": "smep", + "CPUID_7_0_ECX_AVX512BITALG": "avx512bitalg", + "CPUID_7_0_ECX_AVX512_VBMI2": "avx512vbmi2", + "CPUID_7_0_ECX_AVX512_VBMI": "avx512vbmi", + "CPUID_7_0_ECX_AVX512VNNI": "avx512vnni", + "CPUID_7_0_ECX_AVX512_VPOPCNTDQ": "avx512-vpopcntdq", + "CPUID_7_0_ECX_CLDEMOTE": "cldemote", + "CPUID_7_0_ECX_GFNI": "gfni", + "CPUID_7_0_ECX_LA57": "la57", + "CPUID_7_0_ECX_MOVDIR64B": "movdir64b", + "CPUID_7_0_ECX_MOVDIRI": "movdiri", + "CPUID_7_0_ECX_PKU": "pku", + "CPUID_7_0_ECX_RDPID": "rdpid", + "CPUID_7_0_ECX_UMIP": "umip", + "CPUID_7_0_ECX_VAES": "vaes", + "CPUID_7_0_ECX_VPCLMULQDQ": "vpclmulqdq", + "CPUID_7_0_EDX_ARCH_CAPABILITIES": "arch-capabilities", + "CPUID_7_0_EDX_AVX512_4FMAPS": "avx512-4fmaps", + "CPUID_7_0_EDX_AVX512_4VNNIW": "avx512-4vnniw", + "CPUID_7_0_EDX_CORE_CAPABILITY": "core-capability", + "CPUID_7_0_EDX_SPEC_CTRL": "spec-ctrl", + "CPUID_7_0_EDX_SPEC_CTRL_SSBD": "ssbd", + "CPUID_7_0_EDX_STIBP": "stibp", + "CPUID_7_1_EAX_AVX512_BF16": "avx512-bf16", + "CPUID_8000_0008_EBX_CLZERO": "clzero", + "CPUID_8000_0008_EBX_IBPB": "ibpb", + "CPUID_8000_0008_EBX_STIBP": "amd-stibp", + "CPUID_8000_0008_EBX_WBNOINVD": "wbnoinvd", + "CPUID_8000_0008_EBX_XSAVEERPTR": "xsaveerptr", + "CPUID_ACPI": "acpi", + "CPUID_APIC": "apic", + "CPUID_CLFLUSH": "clflush", + "CPUID_CMOV": "cmov", + "CPUID_CX8": "cx8", + "CPUID_DE": "de", + "CPUID_EXT2_3DNOW": "3dnow", + "CPUID_EXT2_3DNOWEXT": "3dnowext", + "CPUID_EXT2_FFXSR": "fxsr_opt", + "CPUID_EXT2_LM": "lm", + "CPUID_EXT2_MMXEXT": "mmxext", + "CPUID_EXT2_NX": "nx", + "CPUID_EXT2_PDPE1GB": "pdpe1gb", + "CPUID_EXT2_RDTSCP": "rdtscp", + "CPUID_EXT2_SYSCALL": "syscall", + "CPUID_EXT3_3DNOWPREFETCH": "3dnowprefetch", + "CPUID_EXT3_ABM": "abm", + "CPUID_EXT3_CR8LEG": "cr8legacy", + "CPUID_EXT3_FMA4": "fma4", + "CPUID_EXT3_LAHF_LM": "lahf_lm", + "CPUID_EXT3_MISALIGNSSE": "misalignsse", + "CPUID_EXT3_OSVW": "osvw", + "CPUID_EXT3_PERFCORE": "perfctr_core", + "CPUID_EXT3_SSE4A": "sse4a", + "CPUID_EXT3_SVM": "svm", + "CPUID_EXT3_TBM": "tbm", + "CPUID_EXT3_XOP": "xop", + "CPUID_EXT_AES": "aes", + "CPUID_EXT_AVX": "avx", + "CPUID_EXT_CX16": "cx16", + "CPUID_EXT_F16C": "f16c", + "CPUID_EXT_FMA": "fma", + "CPUID_EXT_MOVBE": "movbe", + "CPUID_EXT_PCID": "pcid", + "CPUID_EXT_PCLMULQDQ": "pclmuldq", + "CPUID_EXT_POPCNT": "popcnt", + "CPUID_EXT_RDRAND": "rdrand", + "CPUID_EXT_SSE3": "pni", + "CPUID_EXT_SSE41": "sse4.1", + "CPUID_EXT_SSE42": "sse4.2", + "CPUID_EXT_SSSE3": "ssse3", + "CPUID_EXT_TSC_DEADLINE_TIMER": "tsc-deadline", + "CPUID_EXT_X2APIC": "x2apic", + "CPUID_EXT_XSAVE": "xsave", + "CPUID_FP87": "fpu", + "CPUID_FXSR": "fxsr", + "CPUID_MCA": "mca", + "CPUID_MCE": "mce", + "CPUID_MMX": "mmx", + "CPUID_MSR": "msr", + "CPUID_MTRR": "mtrr", + "CPUID_PAE": "pae", + "CPUID_PAT": "pat", + "CPUID_PGE": "pge", + "CPUID_PSE36": "pse36", + "CPUID_PSE": "pse", + "CPUID_SEP": "sep", + "CPUID_SSE2": "sse2", + "CPUID_SSE": "sse", + "CPUID_SS": "ss", + "CPUID_SVM_NPT": "npt", + "CPUID_SVM_NRIPSAVE": "nrip-save", + "CPUID_TSC": "tsc", + "CPUID_VME": "vme", + "CPUID_XSAVE_XGETBV1": "xgetbv1", + "CPUID_XSAVE_XSAVEC": "xsavec", + "CPUID_XSAVE_XSAVEOPT": "xsaveopt", + "CPUID_XSAVE_XSAVES": "xsaves", + "MSR_ARCH_CAP_IBRS_ALL": "ibrs-all", + "MSR_ARCH_CAP_MDS_NO": "mds-no", + "MSR_ARCH_CAP_PSCHANGE_MC_NO": "pschange-mc-no", + "MSR_ARCH_CAP_RDCL_NO": "rdctl-no", + "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", + + # always disabled features + "CPUID_EXT_MONITOR": None, + "0": None, + + # set to "no auto enable" by qemu + "CPUID_EXT3_TOPOEXT": None, + "MSR_VMX_BASIC_DUAL_MONITOR": None, + } + + if name in T: + return T[name] + + print("warning: Unknown feature '{}'".format(name)) + return name + + def readline_cont(f): """Read one logical line from a file `f` i.e. continues lines that end= in a backslash.""" @@ -286,7 +293,7 @@ def expand_model(model): for feature in v.split(): if feature.startswith("VMX_") or feature.startswith("MSR_VMX_"= ): continue - translated =3D T.get(feature, feature) + translated =3D translate_feature(feature) if translated: result["features"].add(translated) =20 @@ -302,7 +309,7 @@ def expand_model(model): props =3D version.pop(".props", dict()) for k, v in props: if k not in ("model-id", "stepping", "model"): - k =3D T.get(k, k) + k =3D translate_feature(k) if v =3D=3D "on": result["features"].add(k) elif v =3D=3D "off" and k in result["features"]: --=20 2.26.2 From nobody Fri Apr 19 19:50:33 2024 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=1605713090; cv=none; d=zohomail.com; s=zohoarc; b=h+/w+zvkGRFWCp/XLNzw0cac4OYlaP8wPp2PCEVK3c1oxmulkohK2MjFMoLSR7diKCb/LHPQd5yz+/n3RTItQeocFHFLU0ADhbq3EdskQX9FB7bkHFaaksL9TuvWZFGGaziPYTD9lyugpCYw89p5BnpqX5eHr30wiDOvZkpjBc0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1605713090; 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=N9txdJrRpeXHOqgmchIg+teMdXxczKoFivx4+R4mDTI=; b=LAsII+lA5SP2b7nO0WGUXf7bbQLYYsKpAFDzAhoSwk6V4uzTevN5T9d+gTqspMPQncEYQeEKIQF5kcAakF/QsbhxQyyrZ27vn/EHkHAR5H+fuhHbT4idGr9Y0fk0YJIO/FOyETUgEOQGEOBuXbFxWt2N46YV5DEHQK+rBampma4= 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 160571309053253.197455121040434; Wed, 18 Nov 2020 07:24:50 -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-425-VLkRxUhcPvOpxZRIs8HLdA-1; Wed, 18 Nov 2020 10:24:46 -0500 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id 96B0086ABD3; Wed, 18 Nov 2020 15:24:39 +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 75C9A5C1D7; Wed, 18 Nov 2020 15:24:39 +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 15D081809CA1; Wed, 18 Nov 2020 15:24:39 +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 0AIFOU7v020923 for ; Wed, 18 Nov 2020 10:24:30 -0500 Received: by smtp.corp.redhat.com (Postfix) id BF1AC60CD0; Wed, 18 Nov 2020 15:24:30 +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 0AA4C60BE2; Wed, 18 Nov 2020 15:24:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605713089; 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=N9txdJrRpeXHOqgmchIg+teMdXxczKoFivx4+R4mDTI=; b=KseRAnXuO1ONdlCw1oG6kjh7SfQ3pVY6XMU++ysdHfblLXVyngkFFj+P6/o7DDdctD6EJX 1MB+pVXMFDD+fqIfpceQliiDcRfL6/uUFkwe0en9deS8FBvht0ivSrKXudsEfKsCWJLkG8 iluHPLE7J6CWhddm2jdOFWwUOa1Qib0= X-MC-Unique: VLkRxUhcPvOpxZRIs8HLdA-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH v2 4/9] cpu_map: sync_qemu_cpu_i386: Do not ignore CPUID_EXT_MONITOR Date: Wed, 18 Nov 2020 16:24:13 +0100 Message-Id: <20201118152418.115450-5-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.16 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cpu_map/sync_qemu_i386.py b/src/cpu_map/sync_qemu_i386.py index 6a5a02dbd1..21981c58f1 100755 --- a/src/cpu_map/sync_qemu_i386.py +++ b/src/cpu_map/sync_qemu_i386.py @@ -108,6 +108,7 @@ def translate_feature(name): "CPUID_EXT_CX16": "cx16", "CPUID_EXT_F16C": "f16c", "CPUID_EXT_FMA": "fma", + "CPUID_EXT_MONITOR": "monitor", "CPUID_EXT_MOVBE": "movbe", "CPUID_EXT_PCID": "pcid", "CPUID_EXT_PCLMULQDQ": "pclmuldq", @@ -153,7 +154,6 @@ def translate_feature(name): "MSR_CORE_CAP_SPLIT_LOCK_DETECT": "split-lock-detect", =20 # always disabled features - "CPUID_EXT_MONITOR": None, "0": None, =20 # set to "no auto enable" by qemu --=20 2.26.2 From nobody Fri Apr 19 19:50:33 2024 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 From nobody Fri Apr 19 19:50:33 2024 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 From nobody Fri Apr 19 19:50:33 2024 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=1605713096; cv=none; d=zohomail.com; s=zohoarc; b=OpWW0i+N4yCj/IlcAg6pujtfncHuGBm4kZGPN4B9EPSJZi+kxFHCjG9I5WM5nAMwmJNITPo/APZJiClDU8y5axeydfUNeYTSpE5KTXPjsVVV7ZJgxBX0XeTUmCEjWOxjBKbzPx73oCa7mRlKVWMp9YMeYuVAkLfZIIxx/I89k/k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1605713096; 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=BO4XPt6/nY7kV8h12Scqdk/MQcxmpX0HOETi0GJu8Yg=; b=ZRFerEMlhCsdHmZyvsiarmddMjIIxUz0XjYYMyM7mL8saPknHQiUmLz8VDNnjDiT+UWLGhjFhUl8ffZQgq5bUnKGS+lA0FzqLhiyiu64x2qRsPy6B3HZYjKHSrGpbjjJbyjY/qdj9JKu/5U5bkDQoXD3vR5H1nVh0mHJMYR81pE= 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 1605713096917926.4343326480364; Wed, 18 Nov 2020 07:24:56 -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-248-38BRk6FxNfifLfv8IbioJg-1; Wed, 18 Nov 2020 10:24:51 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DC0EC1876527; Wed, 18 Nov 2020 15:24:45 +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 B640D5D6A8; Wed, 18 Nov 2020 15:24:45 +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 7D0EF1809CA4; Wed, 18 Nov 2020 15:24:45 +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 0AIFOb8p020960 for ; Wed, 18 Nov 2020 10:24:37 -0500 Received: by smtp.corp.redhat.com (Postfix) id 8820E60FC2; Wed, 18 Nov 2020 15:24:37 +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 6145560BE2; Wed, 18 Nov 2020 15:24:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605713093; 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=BO4XPt6/nY7kV8h12Scqdk/MQcxmpX0HOETi0GJu8Yg=; b=g4aETS2lp2GWilsNSU8sTkD05jPYZYpmlx6T+GumqSOTuL6Nruyle+fV7TjIgXFkwXBlSq DQsZXpvmsLFM2TVx069yJJ/6qlvjOI3un8XkFU974xkgh6DwyQmSoNS4hGqr/y9XoHMYY6 gxWikFSw5PMKqXHCYYY9aQ4vju0BmZU= X-MC-Unique: 38BRk6FxNfifLfv8IbioJg-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH v2 7/9] cpu_map: sync_qemu_cpu_i386: Add missing features Date: Wed, 18 Nov 2020 16:24:16 +0100 Message-Id: <20201118152418.115450-8-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.15 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 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/cpu_map/sync_qemu_i386.py b/src/cpu_map/sync_qemu_i386.py index b27e5793ff..69114c5bb6 100755 --- a/src/cpu_map/sync_qemu_i386.py +++ b/src/cpu_map/sync_qemu_i386.py @@ -32,6 +32,7 @@ def translate_feature(name): "CPUID_7_0_EBX_AVX512DQ": "avx512dq", "CPUID_7_0_EBX_AVX512ER": "avx512er", "CPUID_7_0_EBX_AVX512F": "avx512f", + "CPUID_7_0_EBX_AVX512IFMA": "avx512ifma", "CPUID_7_0_EBX_AVX512PF": "avx512pf", "CPUID_7_0_EBX_AVX512VL": "avx512vl", "CPUID_7_0_EBX_BMI1": "bmi1", @@ -67,6 +68,7 @@ def translate_feature(name): "CPUID_7_0_EDX_AVX512_4FMAPS": "avx512-4fmaps", "CPUID_7_0_EDX_AVX512_4VNNIW": "avx512-4vnniw", "CPUID_7_0_EDX_CORE_CAPABILITY": "core-capability", + "CPUID_7_0_EDX_FSRM": "fsrm", "CPUID_7_0_EDX_SPEC_CTRL": "spec-ctrl", "CPUID_7_0_EDX_SPEC_CTRL_SSBD": "ssbd", "CPUID_7_0_EDX_STIBP": "stibp", --=20 2.26.2 From nobody Fri Apr 19 19:50:33 2024 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=1605713098; cv=none; d=zohomail.com; s=zohoarc; b=Bq5jxIH+X8QTc6nq7cTK4rMpDFdjmzRadWfneeSDID/DuJ0snVogONxave2c6r+FSJj+ngQ8hMW22TLwtbwMrgcKNMySUe+PNF27ecwFYNH5lHBx6TAxXByLdht2ctZgXyJeg+HH7SaUr4tiDXABgrsRAL9QHh7HiZ659y1TEjA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1605713098; 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=b5FoK9UNHawOTe5OH4+M+vZ91EFCI6j90nzRcEa5ROs=; b=I7P4evhMSSzxEGDHj5FOpbu2Kv1GBK7fex0GhAs7hFwD+K47esSj2iyXiQoG1xB1XIVwgel+IhGLsEB/nHmyi9orhDOgPS/fXIegeWlaZLZSWKdXiA88fWfUFG0HE5ThKFUzVW6OllOWPcMV0XrCHFs4Q5wsYTLf+zITinIKdhc= 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 1605713098925814.6215690369585; Wed, 18 Nov 2020 07:24:58 -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-64-uB4IZqX5P86FwMJXSJwnRg-1; Wed, 18 Nov 2020 10:24:55 -0500 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 mimecast-mx01.redhat.com (Postfix) with ESMTPS id C98B680B727; Wed, 18 Nov 2020 15:24:48 +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 A2A825C1DC; Wed, 18 Nov 2020 15:24: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 69C8286C0A; Wed, 18 Nov 2020 15:24:48 +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 0AIFOcM8020967 for ; Wed, 18 Nov 2020 10:24:38 -0500 Received: by smtp.corp.redhat.com (Postfix) id A0965610AF; Wed, 18 Nov 2020 15:24:38 +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 DF13660BE2; Wed, 18 Nov 2020 15:24:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605713097; 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=b5FoK9UNHawOTe5OH4+M+vZ91EFCI6j90nzRcEa5ROs=; b=PAIhHdg+b/0nYPH5TRbj52sShiN1rw0SECP+aVIFKY4Vxl8eiN4yfcDJXfgFxJYG42Mb+G odo29Q6w8fWYHtafDNpwlBn/Jj3RP4Vb2mCLc4UrCDnmVccqjKyuPSCnljDEqieZSMbCZx m8hcrWZIdh6z62D6dAMfcmYIjbNZMNM= X-MC-Unique: uB4IZqX5P86FwMJXSJwnRg-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH v2 8/9] cpu_map: sync_qemu_cpu_i386: Detect features missing in libvirt Date: Wed, 18 Nov 2020 16:24:17 +0100 Message-Id: <20201118152418.115450-9-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.16 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 | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/cpu_map/sync_qemu_i386.py b/src/cpu_map/sync_qemu_i386.py index 69114c5bb6..4743161b0c 100755 --- a/src/cpu_map/sync_qemu_i386.py +++ b/src/cpu_map/sync_qemu_i386.py @@ -5,6 +5,7 @@ import copy import lark import os import re +import xml.etree.ElementTree =20 =20 def translate_vendor(name): @@ -393,6 +394,22 @@ def main(): with open(name, "wt") as f: output_model(f, model) =20 + features =3D set() + for model in models: + features.update(model["features"]) + + try: + filename =3D os.path.join(args.outdir, "x86_features.xml") + dom =3D xml.etree.ElementTree.parse(filename) + known =3D [x.attrib["name"] for x in dom.getroot().iter("feature")] + unknown =3D [x for x in features if x not in known and x is not No= ne] + except Exception as e: + unknown =3D [] + print("warning: Unable to read libvirt x86_features.xml: {}".forma= t(e)) + + for x in unknown: + print("warning: Feature unknown to libvirt: {}".format(x)) + =20 if __name__ =3D=3D "__main__": main() --=20 2.26.2 From nobody Fri Apr 19 19:50:33 2024 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=1605713103; cv=none; d=zohomail.com; s=zohoarc; b=D8XGyv7+BfBftJF2ckL9DScADWrkgWZyotXs4ZeSWY/dgeMaEhm7I2iujexG3GRa9IkQOnmCs8J0bC5NS+/Lu0Qz4JUqGKtMHTYbBeuSuCY/5qWBqqeHrTG8F4FnFty2EQuk+wk0oKwkQ0DTW4FTr4QiWaKSR2vW9PxhGHSTIrE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1605713103; 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=8T5EwMeTmPh4xlhBluHyKCFEfGXGYzYdQf82hrApaz0=; b=AgsBH0q95AFNDtdgVeU7HRs2HeEwEvVz0t1uAB+2o/3w7bJ5xgjiUgZbOvXXw1pxCcTfRApt4pELq1eDIMDSbC6zm7JobzunSEPwvuNqePhY1CfqwYLzdoA9BkJ3F+PIiSj8glCq9YGidiml1WMw9aVSwboNeNKTnUbTgaaTdLw= 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 1605713103326257.60342987994704; Wed, 18 Nov 2020 07:25:03 -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-377-dI_5wmsYPoWGshdI7xP_dg-1; Wed, 18 Nov 2020 10:24:59 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9E4161084C92; Wed, 18 Nov 2020 15:24:51 +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 7C5A860BE2; Wed, 18 Nov 2020 15:24:51 +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 48F338C7A0; Wed, 18 Nov 2020 15:24:51 +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 0AIFOhm5020993 for ; Wed, 18 Nov 2020 10:24:43 -0500 Received: by smtp.corp.redhat.com (Postfix) id 2482C60F96; Wed, 18 Nov 2020 15:24:43 +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 5E58060C05; Wed, 18 Nov 2020 15:24:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605713102; 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=8T5EwMeTmPh4xlhBluHyKCFEfGXGYzYdQf82hrApaz0=; b=Yhzqrexk4v/EIA1EK8Y1j1cSJ8UNIV69pwmhE/EsZsEzcIIQIbFROnUcFVI4ZfvmgQm+Pl YfspXG1nhYdbVzNAGo72u8rw9JhMozAvRqfgUHvjS4xizQfml8P/PBtnWQYXwk7R8rvbpm tQ7REXj9cEy1Vc1TEjEsqTmK0lrXWwI= X-MC-Unique: dI_5wmsYPoWGshdI7xP_dg-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH v2 9/9] cpu_map: Add missing feature fsrm Date: Wed, 18 Nov 2020 16:24:18 +0100 Message-Id: <20201118152418.115450-10-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.12 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/x86_features.xml | 3 +++ tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-guest.xml | 1 + tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-host.xml | 1 + 3 files changed, 5 insertions(+) diff --git a/src/cpu_map/x86_features.xml b/src/cpu_map/x86_features.xml index a55f52b16c..b0bf22d916 100644 --- a/src/cpu_map/x86_features.xml +++ b/src/cpu_map/x86_features.xml @@ -339,6 +339,9 @@ + + + diff --git a/tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-guest.xml b/tes= ts/cputestdata/x86_64-cpuid-Ice-Lake-Server-guest.xml index 9b75ace710..3a71b28cfb 100644 --- a/tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-guest.xml +++ b/tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-guest.xml @@ -24,6 +24,7 @@ + diff --git a/tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-host.xml b/test= s/cputestdata/x86_64-cpuid-Ice-Lake-Server-host.xml index efbf9d363b..1582de0422 100644 --- a/tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-host.xml +++ b/tests/cputestdata/x86_64-cpuid-Ice-Lake-Server-host.xml @@ -25,6 +25,7 @@ + --=20 2.26.2