From nobody Sat Mar 8 07:41:23 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.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.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=reject dis=none) header.from=linux.ibm.com ARC-Seal: i=1; a=rsa-sha256; t=1694466574; cv=none; d=zohomail.com; s=zohoarc; b=Ijzee6wUFWwQhfTNSRdIcuejHtA2Gnnk/hcAsUsJRKCYZCCfizUlEpIDkKzwAt0v0HihV8PHvUMnIktUGno4TA/trKjBGBZqqSO2gtbygY0oGlmQ0C9rAmICTOJaOcUv83eMbGHSfFx7v4kzo9s/MQl6da9PmOWw7VAwnKXP7OM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1694466574; 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=2SJyelgv6hFzkIRy/V3QkUyxw1jWm5+gKOECrSIVc3E=; b=RVcmXfth+BZ/E1Leg1Ib5L1Px2Avq+xbqVSgxC16BDZOWl/W27JGvqbIgcJhk2nrGvqr5Du+tZMhgER1IswVe9+k62Tpz/hrQYdh5WXLg35hS6sYyinNyouHs+K1kkzt/PD9bcgdWyNp6mWgbAv7SsnEF16GxNUpjhZ38ZpjoqI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=reject dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1694466574649259.29882274890906; Mon, 11 Sep 2023 14:09:34 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-180-IHPyiCC6OH2s6ReBmvEmBw-1; Mon, 11 Sep 2023 17:09:27 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B6F5F181A701; Mon, 11 Sep 2023 21:09:22 +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 9300B40C200B; Mon, 11 Sep 2023 21:09:22 +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 E4B041946A50; Mon, 11 Sep 2023 21:09:21 +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 DEB2A1946A67 for ; Mon, 11 Sep 2023 21:09:19 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id B1E3740C200A; Mon, 11 Sep 2023 21:09:19 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast03.extmail.prod.ext.rdu2.redhat.com [10.11.55.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AA5F040C2009 for ; Mon, 11 Sep 2023 21:09:19 +0000 (UTC) Received: from us-smtp-inbound-delivery-1.mimecast.com (us-smtp-inbound-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8227180268A for ; Mon, 11 Sep 2023 21:09:19 +0000 (UTC) Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-475-ZoXYn2PmNnKFupH9CTMh9w-1; Mon, 11 Sep 2023 17:09:17 -0400 Received: from pps.filterd (m0360083.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 38BKjoAb026811 for ; Mon, 11 Sep 2023 21:09:16 GMT Received: from ppma22.wdc07v.mail.ibm.com (5c.69.3da9.ip4.static.sl-reverse.com [169.61.105.92]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3t2a7dgnbw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 11 Sep 2023 21:09:15 +0000 Received: from pps.filterd (ppma22.wdc07v.mail.ibm.com [127.0.0.1]) by ppma22.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 38BIpqvp012037 for ; Mon, 11 Sep 2023 21:09:14 GMT Received: from smtprelay06.dal12v.mail.ibm.com ([172.16.1.8]) by ppma22.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3t13dydybe-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 11 Sep 2023 21:09:14 +0000 Received: from smtpav04.dal12v.mail.ibm.com (smtpav04.dal12v.mail.ibm.com [10.241.53.103]) by smtprelay06.dal12v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 38BL9DlL721652 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 11 Sep 2023 21:09:13 GMT Received: from smtpav04.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BE7F958052; Mon, 11 Sep 2023 21:09:13 +0000 (GMT) Received: from smtpav04.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 7DD8358062; Mon, 11 Sep 2023 21:09:13 +0000 (GMT) Received: from li-d664314c-3171-11b2-a85c-fa8047ef35bd.ibm.com.com (unknown [9.67.49.93]) by smtpav04.dal12v.mail.ibm.com (Postfix) with ESMTP; Mon, 11 Sep 2023 21:09:13 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1694466573; 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=2SJyelgv6hFzkIRy/V3QkUyxw1jWm5+gKOECrSIVc3E=; b=MwNETl4k/rZlQOYMnpUN8jiKsvKRkC0HQvSAHue88v7VB2+dizqCJiCLCJmRTRmbhWOmVG aTloc7tiWW+WobKk+8dXJ15nk5HZUAHatWNdkMkZfN6G18fQN5/irWaDGcGgTdGaULU5E+ xhg005tBBmZhEAuua8qwTPeP7fz+5/k= X-MC-Unique: IHPyiCC6OH2s6ReBmvEmBw-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: ZoXYn2PmNnKFupH9CTMh9w-1 From: Collin Walling To: libvir-list@redhat.com Subject: [PATCH v1 2/9] qemu: capabilities: add static-recommended capability Date: Mon, 11 Sep 2023 17:07:09 -0400 Message-ID: <20230911210716.75648-3-walling@linux.ibm.com> In-Reply-To: <20230911210716.75648-1-walling@linux.ibm.com> References: <20230911210716.75648-1-walling@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: XL6WjmbSJXIASMyuuO1Aj2_-xiAlcN1t X-Proofpoint-ORIG-GUID: XL6WjmbSJXIASMyuuO1Aj2_-xiAlcN1t X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.601,FMLib:17.11.176.26 definitions=2023-09-11_16,2023-09-05_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 suspectscore=0 malwarescore=0 adultscore=0 mlxscore=0 lowpriorityscore=0 bulkscore=0 clxscore=1015 spamscore=0 impostorscore=0 phishscore=0 mlxlogscore=917 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2308100000 definitions=main-2309110194 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false 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: , Cc: Boris Fiuczynski Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: linux.ibm.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1694466640883100001 Content-Type: text/plain; charset="utf-8"; x-default="true" Check for the QEMU capability to query for a static-recommended CPU model via CPU model expansion. Cache this capability for later. Signed-off-by: Collin Walling Reviewed-by: Boris Fiuczynski --- src/qemu/qemu_capabilities.c | 2 ++ src/qemu/qemu_capabilities.h | 1 + tests/qemucapabilitiesdata/caps_8.1.0_s390x.replies | 6 +++++- tests/qemucapabilitiesdata/caps_8.1.0_s390x.xml | 1 + 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 87412dd4ec..4ace8eea4a 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -697,6 +697,7 @@ VIR_ENUM_IMPL(virQEMUCaps, =20 /* 450 */ "run-with.async-teardown", /* QEMU_CAPS_RUN_WITH_ASYNC_TEARD= OWN */ + "query-cpu-model-expansion.static-recommended", /* QEMU_CAPS= _QUERY_CPU_MODEL_EXPANSION_STATIC_RECOMMENDED */ ); =20 =20 @@ -1557,6 +1558,7 @@ static struct virQEMUCapsStringFlags virQEMUCapsQMPSc= hemaQueries[] =3D { { "object-add/arg-type/+iothread/thread-pool-max", QEMU_CAPS_IOTHREAD_= THREAD_POOL_MAX }, { "query-migrate/ret-type/blocked-reasons", QEMU_CAPS_MIGRATION_BLOCKE= D_REASONS }, { "screendump/arg-type/format/^png", QEMU_CAPS_SCREENSHOT_FORMAT_PNG }, + { "query-cpu-model-expansion/arg-type/type/^static-recommended", QEMU_= CAPS_QUERY_CPU_MODEL_EXPANSION_STATIC_RECOMMENDED }, }; =20 typedef struct _virQEMUCapsObjectTypeProps virQEMUCapsObjectTypeProps; diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index e51d3fffdc..4fa64b6435 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -676,6 +676,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for = syntax-check */ =20 /* 450 */ QEMU_CAPS_RUN_WITH_ASYNC_TEARDOWN, /* asynchronous teardown -run-with = async-teardown=3Don|off */ + QEMU_CAPS_QUERY_CPU_MODEL_EXPANSION_STATIC_RECOMMENDED, /* query-cpu-m= odel-expansion supports type static-recommended*/ =20 QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; diff --git a/tests/qemucapabilitiesdata/caps_8.1.0_s390x.replies b/tests/qe= mucapabilitiesdata/caps_8.1.0_s390x.replies index 57ce64e88e..8cd7312bea 100644 --- a/tests/qemucapabilitiesdata/caps_8.1.0_s390x.replies +++ b/tests/qemucapabilitiesdata/caps_8.1.0_s390x.replies @@ -15398,12 +15398,16 @@ }, { "name": "full" + }, + { + "name": "static-recommended" } ], "meta-type": "enum", "values": [ "static", - "full" + "full", + "static-recommended" ] }, { diff --git a/tests/qemucapabilitiesdata/caps_8.1.0_s390x.xml b/tests/qemuca= pabilitiesdata/caps_8.1.0_s390x.xml index 427ee9d5c7..0bb4233383 100644 --- a/tests/qemucapabilitiesdata/caps_8.1.0_s390x.xml +++ b/tests/qemucapabilitiesdata/caps_8.1.0_s390x.xml @@ -112,6 +112,7 @@ + 8000050 39100245 v8.0.0-1270-g1c12355b --=20 2.41.0