From nobody Thu May 2 12:28:43 2024 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1677571995; cv=none; d=zohomail.com; s=zohoarc; b=JMZwV2/Wuj3ivQpBbjNe9ke1vF0oBEMwH7P2E9oBlhuTjBSBYheClM0bp2pO1BVhtoBzvMYGVIK3im/Qv7og4TTbQyLL5hpAv+oLKvfqyGD4BmlZagxd8d5I7TgZoBB9A12sMh+H7DfPGl2fb2rB/Arqdp1XbjThoHM5TWWczD0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1677571995; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=4MBnMZQuYCXjq3qFanZyNxVcXAhkFNbWYAFPnTIIWY0=; b=fi+L7CR28a3itwOA53i+CWndln7tmE2t5Td0GSUAcis33rKSR539c4tmis5ITfvlYLPz5ax5b2RTCFjW5ZYWW40ul0jK5zTBz/CPppNEDwOXaJj46V7PKYE8MndcnD4G4fDHEPFgui/VH6HdUU4e00iKAJyYdTbBJuLGWhjFpKU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1677571995674352.7052714093056; Tue, 28 Feb 2023 00:13:15 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pWv6N-00061z-IW; Tue, 28 Feb 2023 03:12:47 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pWv6M-00061p-Eo for qemu-devel@nongnu.org; Tue, 28 Feb 2023 03:12:46 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pWv6K-0004JV-AV for qemu-devel@nongnu.org; Tue, 28 Feb 2023 03:12:46 -0500 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-581-tZAE5jkYPzqC-uLP3r0vog-1; Tue, 28 Feb 2023 03:12:37 -0500 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 296D8101A55E; Tue, 28 Feb 2023 08:12:37 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.45.242.16]) by smtp.corp.redhat.com (Postfix) with ESMTP id 92B7C492B12; Tue, 28 Feb 2023 08:12:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1677571963; h=from:from: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; bh=4MBnMZQuYCXjq3qFanZyNxVcXAhkFNbWYAFPnTIIWY0=; b=XFM6NQ37C1GSu5QYSY5eKT2f6LAx6JFUAtCP/zGGyvp+TbrtS2MMSFnpKh4nSIkXqR+rT4 EzYXM/u5rxMYHiWnGDnJXkc5eLzXpKpo8hca0M8HRFjaATCAYM4niAJ0bevOSCLJYzz8P2 X15xlaEg8VyV600RvqOaYU96p2sGWFk= X-MC-Unique: tZAE5jkYPzqC-uLP3r0vog-1 From: Peter Krempa To: qemu-devel@nongnu.org Cc: Eduardo Habkost , Marcel Apfelbaum , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Yanan Wang , Eric Blake , Markus Armbruster Subject: [PATCH v2] qapi: Add 'acpi' field to 'query-machines' output Date: Tue, 28 Feb 2023 09:12:34 +0100 Message-Id: <537625d3e25d345052322c42ca19812b98b4f49a.1677571792.git.pkrempa@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=pkrempa@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer2=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1677571996810100001 Content-Type: text/plain; charset="utf-8" Report which machine types support ACPI so that management applications can properly use the 'acpi' property even on platforms such as ARM where support for ACPI depends on the machine type and thus checking presence of '-machine acpi=3D' in 'query-command-line-options' is insufficient. Signed-off-by: Peter Krempa Acked-by: Markus Armbruster --- Diff to v1: - Fix spelling of 'ACPI' in 'machine.json' - Removed addition of a field to 'struct MachineClass' which was not used in the final version hw/core/machine-qmp-cmds.c | 1 + qapi/machine.json | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/hw/core/machine-qmp-cmds.c b/hw/core/machine-qmp-cmds.c index 2d904747c0..b98ff15089 100644 --- a/hw/core/machine-qmp-cmds.c +++ b/hw/core/machine-qmp-cmds.c @@ -102,6 +102,7 @@ MachineInfoList *qmp_query_machines(Error **errp) info->hotpluggable_cpus =3D mc->has_hotpluggable_cpus; info->numa_mem_supported =3D mc->numa_mem_supported; info->deprecated =3D !!mc->deprecation_reason; + info->acpi =3D !!object_class_property_find(OBJECT_CLASS(mc), "acp= i"); if (mc->default_cpu_type) { info->default_cpu_type =3D g_strdup(mc->default_cpu_type); } diff --git a/qapi/machine.json b/qapi/machine.json index b9228a5e46..604b686e59 100644 --- a/qapi/machine.json +++ b/qapi/machine.json @@ -155,6 +155,8 @@ # # @default-ram-id: the default ID of initial RAM memory backend (since 5.2) # +# @acpi: machine type supports ACPI (since 8.0) +# # Since: 1.2 ## { 'struct': 'MachineInfo', @@ -162,7 +164,7 @@ '*is-default': 'bool', 'cpu-max': 'int', 'hotpluggable-cpus': 'bool', 'numa-mem-supported': 'bool', 'deprecated': 'bool', '*default-cpu-type': 'str', - '*default-ram-id': 'str' } } + '*default-ram-id': 'str', 'acpi': 'bool' } } ## # @query-machines: --=20 2.39.2