From nobody Mon Feb 9 14:33:36 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=1606140903; cv=none; d=zohomail.com; s=zohoarc; b=Es2/0VjicNtYmFWVJKwsTxH+SRcYXbqb0+zjoJViYkygdPtAwjFKfh4rHBhRLJjiCImk5K6MuOj7QNLqa6l9LEhVqkJjwABx0OiikMqrKPYNg5BNA/t/FOf4049sCwMBeqDVSYki0m2hrs7iUU0hG7jL/qzDIw4bAT+Ov4Q9dxA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1606140903; 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=nsrxqYmZLRGuQdmhwl664MNDFSUgV2z7KwoSS9+Eq9I=; b=WZWLFhw8rrUj06bspFiyDYPRh41r+d3a2zk+VdetQU376R0c1jc5VKvzwIaE8nt17K0pcpSq7Av9n3j2dt+3oD+/T4afk8KWD21/nBDisKIbUFBSiuixii6fae//qRZYeDD8vHyvkrJJ3mmI84aG2WSF2A8enaD8sRoClC5Hj4g= 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 1606140903320197.72948065590674; Mon, 23 Nov 2020 06:15: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-5-w6QnjL_gMcysKLclK2rivw-1; Mon, 23 Nov 2020 09:14:58 -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 6482983DAA1; Mon, 23 Nov 2020 14:14:52 +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 416461349A; Mon, 23 Nov 2020 14:14:52 +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 09A9F1809CAF; Mon, 23 Nov 2020 14:14:52 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 0ANEElUf002408 for ; Mon, 23 Nov 2020 09:14:47 -0500 Received: by smtp.corp.redhat.com (Postfix) id 85AEB19D9C; Mon, 23 Nov 2020 14:14:47 +0000 (UTC) Received: from work.redhat.com (ovpn-112-182.ams2.redhat.com [10.36.112.182]) by smtp.corp.redhat.com (Postfix) with ESMTP id C758519D7C; Mon, 23 Nov 2020 14:14:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1606140901; 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=nsrxqYmZLRGuQdmhwl664MNDFSUgV2z7KwoSS9+Eq9I=; b=S6dQSUE6EGsD4vSFFmGmRuhsUZhhPXiDGeQ5dbMfNH0qxzJmOWfnElu584cbFrLTQ5+2QW pmjDHSboUNd2vC5tVxG8h0vNdKNcCw3xbQCmykWqmV/I7YCBWPnk+OsJHtOWBC/US3zVJ8 fxRvo4LP0g4IKLIeAWmCOYzhjaxpEDA= X-MC-Unique: w6QnjL_gMcysKLclK2rivw-1 From: Tim Wiederhake To: libvir-list@redhat.com Subject: [libvirt PATCH v3 06/10] cpu_map: sync_qemu_cpu_i386: Detect features missing in libvirt Date: Mon, 23 Nov 2020 15:14:29 +0100 Message-Id: <20201123141433.35515-7-twiederh@redhat.com> In-Reply-To: <20201123141433.35515-1-twiederh@redhat.com> References: <20201123141433.35515-1-twiederh@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 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" Signed-off-by: Tim Wiederhake Reviewed-by: Jiri Denemark --- 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 83b21a93e5..d2a05db77c 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