From nobody Sun Feb 8 21:33:25 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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 170.10.129.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=1664893763; cv=none; d=zohomail.com; s=zohoarc; b=aIjVdFYifrG9R0Ly9WG5/Ca5YD0+DUPnrAIgI/AhQAu96p4Nd/9iQlM9nLTWxYZu4yPQOMpWLyzqZZrNadtrmGA8mzR+kpCQmqs/8oyhEHVrpC9QZhsRgGolR0S6eT8nMGSo87UojSF4y7ZyilfmeN9tee9Pxj3mrZKQ4RGFLBA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1664893763; h=Content-Type:Content-Transfer-Encoding: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=K1e8JVTPJ1gsQNaNGdbnFGNqafJL348qlgd+EJ3IA5Q=; b=P9TBmJoAR8QKhRQVqoqNULMVd27f+sSWhCHY/ODNL4QXoCt0zAK2dFRuQYICM/tYwgdlOSOWq7ZLe/pHO7/1X074XNja8f0S/Y3ydZsuyVqSroIx9aoU9JZAlEi47oUNa510GkJEubhZsoe17GoCXXzB2XoG7EwE+98w252HjAk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1664893763922333.0649168469714; Tue, 4 Oct 2022 07:29:23 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-473-TZHk25wmNYOTsdlWSvpnEQ-1; Tue, 04 Oct 2022 10:29:20 -0400 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 1D2A82999B53; Tue, 4 Oct 2022 14:29:04 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id C02CE49BB61; Tue, 4 Oct 2022 14:29:03 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id F03BA1943391; Tue, 4 Oct 2022 14:29:01 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 82AAE1947042 for ; Tue, 4 Oct 2022 14:29:00 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 707D140FF681; Tue, 4 Oct 2022 14:29:00 +0000 (UTC) Received: from rein.int.mamuti.net (unknown [10.40.192.36]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1563A40C206B for ; Tue, 4 Oct 2022 14:29:00 +0000 (UTC) Received: by rein.int.mamuti.net (Postfix, from userid 500) id 68F53188FBC; Tue, 4 Oct 2022 16:28:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1664893761; h=from:from:sender:sender: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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=K1e8JVTPJ1gsQNaNGdbnFGNqafJL348qlgd+EJ3IA5Q=; b=U1qDNWgxCgIhf2o8z1dEP3lUqiHykFqkWLDZuf4vxqTkNEu4uX0miI/9mUKKUV6cs4dv0h /mkgbhVpYL/CzgPlbW4NnjX1ytNfAyGm7SB5v+GerNOnU9NH/hjhp35Y/b5S715eORg+7O ROdX583gj5qYuVnpKlzdf3FKz+8pNSI= X-MC-Unique: TZHk25wmNYOTsdlWSvpnEQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Jiri Denemark To: libvir-list@redhat.com Subject: [libvirt PATCH 10/11] domain_capabilities: Add blockers attribute for CPU models Date: Tue, 4 Oct 2022 16:28:53 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1664893764352100002 Content-Type: text/plain; charset="utf-8" We already show whether a specific CPU model is usable on the current host without modification via the 'usable' attribute of each CPU model. But it may be useful to actually see what features are blocking each CPU model from being usable. Especially when we already fetch the info from QEMU and propagating it to domain capabilities XML is all we need to do. Signed-off-by: Jiri Denemark --- docs/formatdomaincaps.rst | 16 ++-- src/conf/domain_capabilities.c | 7 ++ src/conf/schemas/domaincaps.rng | 5 ++ .../domaincapsdata/qemu_4.2.0-q35.x86_64.xml | 36 ++++----- .../domaincapsdata/qemu_4.2.0-tcg.x86_64.xml | 72 +++++++++--------- tests/domaincapsdata/qemu_4.2.0.s390x.xml | 2 +- tests/domaincapsdata/qemu_4.2.0.x86_64.xml | 36 ++++----- .../domaincapsdata/qemu_5.0.0-q35.x86_64.xml | 40 +++++----- .../domaincapsdata/qemu_5.0.0-tcg.x86_64.xml | 72 +++++++++--------- tests/domaincapsdata/qemu_5.0.0.x86_64.xml | 40 +++++----- .../domaincapsdata/qemu_5.1.0-q35.x86_64.xml | 68 ++++++++--------- .../domaincapsdata/qemu_5.1.0-tcg.x86_64.xml | 72 +++++++++--------- tests/domaincapsdata/qemu_5.1.0.x86_64.xml | 68 ++++++++--------- .../domaincapsdata/qemu_5.2.0-q35.x86_64.xml | 68 ++++++++--------- .../domaincapsdata/qemu_5.2.0-tcg.x86_64.xml | 72 +++++++++--------- tests/domaincapsdata/qemu_5.2.0.x86_64.xml | 68 ++++++++--------- .../domaincapsdata/qemu_6.0.0-q35.x86_64.xml | 70 +++++++++--------- .../domaincapsdata/qemu_6.0.0-tcg.x86_64.xml | 74 +++++++++---------- tests/domaincapsdata/qemu_6.0.0.x86_64.xml | 70 +++++++++--------- .../domaincapsdata/qemu_6.1.0-q35.x86_64.xml | 70 +++++++++--------- .../domaincapsdata/qemu_6.1.0-tcg.x86_64.xml | 74 +++++++++---------- tests/domaincapsdata/qemu_6.1.0.x86_64.xml | 70 +++++++++--------- .../domaincapsdata/qemu_6.2.0-q35.x86_64.xml | 70 +++++++++--------- .../domaincapsdata/qemu_6.2.0-tcg.x86_64.xml | 74 +++++++++---------- tests/domaincapsdata/qemu_6.2.0.x86_64.xml | 70 +++++++++--------- .../domaincapsdata/qemu_7.0.0-q35.x86_64.xml | 70 +++++++++--------- .../domaincapsdata/qemu_7.0.0-tcg.x86_64.xml | 74 +++++++++---------- tests/domaincapsdata/qemu_7.0.0.x86_64.xml | 70 +++++++++--------- .../domaincapsdata/qemu_7.1.0-q35.x86_64.xml | 66 ++++++++--------- .../domaincapsdata/qemu_7.1.0-tcg.x86_64.xml | 70 +++++++++--------- tests/domaincapsdata/qemu_7.1.0.x86_64.xml | 66 ++++++++--------- 31 files changed, 907 insertions(+), 893 deletions(-) diff --git a/docs/formatdomaincaps.rst b/docs/formatdomaincaps.rst index 6ce780fb69..81211a3fe6 100644 --- a/docs/formatdomaincaps.rst +++ b/docs/formatdomaincaps.rst @@ -191,10 +191,10 @@ CPUs `__. - Broadwell= + Broadwell Broadwel= l-noTSX - Haswell<= /model> - EPYC-Milan<= /model> + Haswell + EPYC-Milan ... @@ -224,10 +224,12 @@ more details about it: by a dedicated ``model`` element. The ``usable`` attribute specifies wh= ether the model can be used directly on the host. When usable=3D'no' the corresponding model cannot be used without disabling some features that= the - CPU of such model is expected to have. A special value ``unknown`` indi= cates - libvirt does not have enough information to provide the usability data.= The - ``deprecated`` attribute reflects the hypervisor's policy on usage of t= his - model :since:`(since 7.1.0)`. The ``vendor`` attribute :since:`(since 8= .9.0)` + CPU of such model is expected to have. :since:`Since 8.9.0` the ``block= ers`` + attribute contains a comma separated list of these features. A special = value + ``unknown`` of the attribute ``usable`` indicates libvirt does not have + enough information to provide the usability data. The ``deprecated`` + attribute reflects the hypervisor's policy on usage of this model + :since:`(since 7.1.0)`. The ``vendor`` attribute :since:`(since 8.9.0)` contains the vendor of the CPU model for users who want to use CPU mode= ls with specific vendors only. CPU models with undefined vendor will be li= sted with ``vendor=3D'unkwnown'``. diff --git a/src/conf/domain_capabilities.c b/src/conf/domain_capabilities.c index b5d8288982..4a6418ca37 100644 --- a/src/conf/domain_capabilities.c +++ b/src/conf/domain_capabilities.c @@ -386,6 +386,13 @@ virDomainCapsCPUCustomFormat(virBuffer *buf, else virBufferAddLit(buf, " vendor=3D'unknown'"); =20 + if (model->usable =3D=3D VIR_DOMCAPS_CPU_USABLE_NO && + model->blockers && + *model->blockers) { + virBufferAsprintf(buf, " blockers=3D'%s'", + g_strjoinv(",", model->blockers)); + } + virBufferAsprintf(buf, ">%s\n", model->name); } =20 diff --git a/src/conf/schemas/domaincaps.rng b/src/conf/schemas/domaincaps.= rng index c4cb9afeba..7783b49585 100644 --- a/src/conf/schemas/domaincaps.rng +++ b/src/conf/schemas/domaincaps.rng @@ -162,6 +162,11 @@ + + + + + diff --git a/tests/domaincapsdata/qemu_4.2.0-q35.x86_64.xml b/tests/domainc= apsdata/qemu_4.2.0-q35.x86_64.xml index dab12e5888..8ca9e8d2b2 100644 --- a/tests/domaincapsdata/qemu_4.2.0-q35.x86_64.xml +++ b/tests/domaincapsdata/qemu_4.2.0-q35.x86_64.xml @@ -63,7 +63,7 @@ qemu64 qemu32 - phenom + phenom pentium3 pentium2 pentium @@ -72,42 +72,42 @@ kvm32 coreduo core2duo - athlon + athlon Westmere-IBRS Westmere - Snowridge - Skylake-Server-noTSX-IBRS - Skylake-Server-IBRS - Skylake-Server + Snowridge + Skylake-Ser= ver-noTSX-IBRS + Skylake-Ser= ver-IBRS + Skylake-Ser= ver Skylake-Client-noTSX-IBRS Skylake-Client-IBRS Skylake-Client SandyBridge-IBRS SandyBridge Penryn - Opteron_G5 - Opteron_G4 - Opteron_G3 + Opteron_G5 + Opteron_G4 + O= pteron_G3 Opteron_G2 Opteron_G1 Nehalem-IBRS Nehalem IvyBridge-IBRS IvyBridge - Icelake-Server-noTSX - Icelake-Server - Icelake-Client-noTSX - Icelake-Client + Icelake-Server-noTSX + Icelake-Server + Icelake-Client-noTSX + Icelake-Client Haswell-noTSX-IBRS Haswell-noTSX Haswell-IBRS Haswell - EPYC-IBPB - EPYC - Dhyana + EPYC-IBPB + EPYC + Dhyana Conroe - Cascadelake-Server-noTSX - Cascadelake-Server + Cascadelake-Server-noTSX + Cascadelake-Server Broadwell-noTSX-IBRS Broadwell-noTSX Broadwell-IBRS ... --=20 2.37.3