From nobody Wed Oct 29 06:43:37 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1524857641088596.5156550974677; Fri, 27 Apr 2018 12:34:01 -0700 (PDT) Received: from localhost ([::1]:49675 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fC984-00015w-A1 for importer@patchew.org; Fri, 27 Apr 2018 15:34:00 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53726) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fC93V-000659-EN for qemu-devel@nongnu.org; Fri, 27 Apr 2018 15:29:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fC93U-000106-3q for qemu-devel@nongnu.org; Fri, 27 Apr 2018 15:29:17 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:54133 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fC93T-0000vu-V8; Fri, 27 Apr 2018 15:29:16 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 59D5440858C0; Fri, 27 Apr 2018 19:29:08 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-124-192.rdu2.redhat.com [10.10.124.192]) by smtp.corp.redhat.com (Postfix) with ESMTP id A8377215CDCB; Fri, 27 Apr 2018 19:29:06 +0000 (UTC) From: Laszlo Ersek To: qemu-devel@nongnu.org Date: Fri, 27 Apr 2018 21:28:48 +0200 Message-Id: <20180427192852.15013-2-lersek@redhat.com> In-Reply-To: <20180427192852.15013-1-lersek@redhat.com> References: <20180427192852.15013-1-lersek@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Fri, 27 Apr 2018 19:29:08 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Fri, 27 Apr 2018 19:29:08 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'lersek@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PATCH v3 1/5] qapi: fill in CpuInfoFast.arch in query-cpus-fast X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-stable@nongnu.org, Cornelia Huck , Markus Armbruster , Viktor VM Mihajlovski Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" * Commit ca230ff33f89 added the @arch field to @CpuInfoFast, but it failed to set the new field in qmp_query_cpus_fast(), when TARGET_S390X was not defined. The updated @query-cpus-fast example in "qapi-schema.json" showed "arch":"x86" only because qmp_query_cpus_fast() calls g_malloc0() to allocate @CpuInfoFast, and the CPU_INFO_ARCH_X86 enum constant is generated with value 0. All @arch values other than @s390 implied the @CpuInfoOther sub-struct for @CpuInfoFast -- at the time of writing the patch --, thus no fields other than @arch needed to be set when TARGET_S390X was not defined. Set @arch now, by copying the corresponding assignments from qmp_query_cpus(). * Commit 25fa194b7b11 added the @riscv enum constant to @CpuInfoArch (used in both @CpuInfo and @CpuInfoFast -- the return types of the @query-cpus and @query-cpus-fast commands, respectively), and assigned, in both return structures, the @CpuInfoRISCV sub-structure to the new enum value. However, qmp_query_cpus_fast() would not populate either the @arch field or the @CpuInfoRISCV sub-structure, when TARGET_RISCV was defined; only qmp_query_cpus() would. Assign @CpuInfoOther to the @riscv enum constant in @CpuInfoFast, and populate only the @arch field in qmp_query_cpus_fast(). Getting CPU state without interrupting KVM is an exceptional thing that only S390X does currently. Quoting Cornelia Huck , "s390x is exceptional in that it has state in QEMU that is actually interesting for upper layers and can be retrieved without performance penalty". See also . Cc: Cornelia Huck Cc: Eric Blake Cc: Markus Armbruster Cc: Viktor VM Mihajlovski Cc: qemu-stable@nongnu.org Fixes: ca230ff33f89bf7102cbfbc2328716da6750aaed Fixes: 25fa194b7b11901561532e435beb83d046899f7a Signed-off-by: Laszlo Ersek Reviewed-by: Eric Blake Reviewed-by: Cornelia Huck Reviewed-by: Markus Armbruster --- Notes: PATCHv3: =20 - pick up Cornelia's and Markus's R-b's =20 - no changes =20 PATCHv2: =20 - squash v1 patches 1/6 and 2/6 [Eric, Markus, Cornelia] =20 - fix "added added" typo in the commit message [Eric] =20 - update commit message wrt. S390X particulars [Cornelia, Markus, Viktor] =20 - pick up Eric's R-b (synthesized from his R-b's for v1 1/6 & 2/6) =20 - don't pick up Cornelia's R-b (only given for v1 1/6) =20 - update the CC list =20 PATCHv1: =20 - new patch qapi/misc.json | 2 +- cpus.c | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/qapi/misc.json b/qapi/misc.json index 5636f4a14997..104d013adba6 100644 --- a/qapi/misc.json +++ b/qapi/misc.json @@ -565,23 +565,23 @@ { 'union': 'CpuInfoFast', 'base': {'cpu-index': 'int', 'qom-path': 'str', 'thread-id': 'int', '*props': 'CpuInstanceProperties', 'arch': 'CpuInfoArch' }, 'discriminator': 'arch', 'data': { 'x86': 'CpuInfoOther', 'sparc': 'CpuInfoOther', 'ppc': 'CpuInfoOther', 'mips': 'CpuInfoOther', 'tricore': 'CpuInfoOther', 's390': 'CpuInfoS390', - 'riscv': 'CpuInfoRISCV', + 'riscv': 'CpuInfoOther', 'other': 'CpuInfoOther' } } =20 ## # @query-cpus-fast: # # Returns information about all virtual CPUs. This command does not # incur a performance penalty and should be used in production # instead of query-cpus. # # Returns: list of @CpuInfoFast # diff --git a/cpus.c b/cpus.c index 38eba8bff334..60563a6d54ec 100644 --- a/cpus.c +++ b/cpus.c @@ -2210,27 +2210,41 @@ CpuInfoFastList *qmp_query_cpus_fast(Error **errp) info->value->qom_path =3D object_get_canonical_path(OBJECT(cpu)); info->value->thread_id =3D cpu->thread_id; =20 info->value->has_props =3D !!mc->cpu_index_to_instance_props; if (info->value->has_props) { CpuInstanceProperties *props; props =3D g_malloc0(sizeof(*props)); *props =3D mc->cpu_index_to_instance_props(ms, cpu->cpu_index); info->value->props =3D props; } =20 -#if defined(TARGET_S390X) +#if defined(TARGET_I386) + info->value->arch =3D CPU_INFO_ARCH_X86; +#elif defined(TARGET_PPC) + info->value->arch =3D CPU_INFO_ARCH_PPC; +#elif defined(TARGET_SPARC) + info->value->arch =3D CPU_INFO_ARCH_SPARC; +#elif defined(TARGET_MIPS) + info->value->arch =3D CPU_INFO_ARCH_MIPS; +#elif defined(TARGET_TRICORE) + info->value->arch =3D CPU_INFO_ARCH_TRICORE; +#elif defined(TARGET_S390X) s390_cpu =3D S390_CPU(cpu); env =3D &s390_cpu->env; info->value->arch =3D CPU_INFO_ARCH_S390; info->value->u.s390.cpu_state =3D env->cpu_state; +#elif defined(TARGET_RISCV) + info->value->arch =3D CPU_INFO_ARCH_RISCV; +#else + info->value->arch =3D CPU_INFO_ARCH_OTHER; #endif if (!cur_item) { head =3D cur_item =3D info; } else { cur_item->next =3D info; cur_item =3D info; } } =20 return head; } --=20 2.14.1.3.gb7cf6e02401b From nobody Wed Oct 29 06:43:37 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1524857642293254.63645869711672; Fri, 27 Apr 2018 12:34:02 -0700 (PDT) Received: from localhost ([::1]:49677 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fC985-00016u-GB for importer@patchew.org; Fri, 27 Apr 2018 15:34:01 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53730) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fC93V-00065F-JK for qemu-devel@nongnu.org; Fri, 27 Apr 2018 15:29:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fC93U-00010O-FT for qemu-devel@nongnu.org; Fri, 27 Apr 2018 15:29:17 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:43330 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fC93U-0000w7-AN for qemu-devel@nongnu.org; Fri, 27 Apr 2018 15:29:16 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 3E6ACEBFF7 for ; Fri, 27 Apr 2018 19:29:10 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-124-192.rdu2.redhat.com [10.10.124.192]) by smtp.corp.redhat.com (Postfix) with ESMTP id B4FF0215CDCB; Fri, 27 Apr 2018 19:29:08 +0000 (UTC) From: Laszlo Ersek To: qemu-devel@nongnu.org Date: Fri, 27 Apr 2018 21:28:49 +0200 Message-Id: <20180427192852.15013-3-lersek@redhat.com> In-Reply-To: <20180427192852.15013-1-lersek@redhat.com> References: <20180427192852.15013-1-lersek@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Fri, 27 Apr 2018 19:29:10 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Fri, 27 Apr 2018 19:29:10 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'lersek@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PATCH v3 2/5] qapi: add SysEmuTarget to "common.json" X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Markus Armbruster Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" We'll soon need an enumeration type that lists all the softmmu targets that QEMU (the project) supports. Introduce @SysEmuTarget to "common.json". The enum constant @x86_64 doesn't match the QAPI convention of preferring hyphen ("-") over underscore ("_"). This is intentional; the @SysEmuTarget constants are supposed to produce QEMU executable names when stringified and appended to the "qemu-system-" prefix. Put differently, the replacement text of the TARGET_NAME preprocessor macro must be possible to look up in the list of (stringified) enum constants. Like other enum types, @SysEmuTarget too can be used for discriminator fields in unions. For the @i386 constant, a C-language union member called "i386" would be generated. On mingw build hosts, "i386" is a macro however. Add "i386" to "polluted_words" at once. Cc: "Daniel P. Berrange" Cc: Eric Blake Cc: Markus Armbruster Signed-off-by: Laszlo Ersek Reviewed-by: Eric Blake Reviewed-by: Markus Armbruster --- Notes: PATCHv3: =20 - copy the suggested (shorter) Notes: wrt. underscore use in @x86_64 to the schema, and move the original (longer) schema Notes: to the commit message [Eric] =20 - no R-b's picked up due to the above change =20 PATCHv2: =20 - document the use of the underscore in @x86_64 in both the commit message and in the schema [Eric, Dan] =20 - extend "polluted_words" with "i386" [Eric] =20 - drop previous R-b's =20 - update the CC list =20 PATCHv1: =20 - pick up R-b's from Markus and Kashyap, no changes =20 RFCv3: =20 - The patch is new in this version. [Dan, Markus] =20 - The original idea was to call the new enum @Target; however, @Target generates exactly the TARGET_AARCH64, TARGET_ALPHA, TARGET_ARM, ... enumeration constants that conflict with the poisoned preprocessing macros of the same names. Hence @SysEmuTarget -- it's more accurate anyway, since we want it to stand for system emulation targets. =20 - Also, we discussed defining the new type in either "common.json" or "misc.json". "misc.json" turned out to be a problem: "firmware.json" would then include "misc.json" for the new type's sake, but that inclusion would become the first appearance of "misc.json" -- within "firmware.json". That messed up the generated documentation. By adding the new type to "common.json", "misc.json" (see the 2nd patch) and "firmware.json" (see the 3rd patch) can both consume the new type without problems. qapi/common.json | 23 +++++++++++++++++++++++ scripts/qapi/common.py | 2 +- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/qapi/common.json b/qapi/common.json index d9b14dd429f3..c811d0498457 100644 --- a/qapi/common.json +++ b/qapi/common.json @@ -118,11 +118,34 @@ # # @bar3: PCI BAR3 is used for the feature # # @bar4: PCI BAR4 is used for the feature # # @bar5: PCI BAR5 is used for the feature # # Since: 2.12 ## { 'enum': 'OffAutoPCIBAR', 'data': [ 'off', 'auto', 'bar0', 'bar1', 'bar2', 'bar3', 'bar4', 'bar5' = ] } + +## +# @SysEmuTarget: +# +# The comprehensive enumeration of QEMU system emulation ("softmmu") +# targets. Run "./configure --help" in the project root directory, and +# look for the *-softmmu targets near the "--target-list" option. The +# individual target constants are not documented here, for the time +# being. +# +# Notes: The resulting QMP strings can be appended to the "qemu-system-" +# prefix to produce the corresponding QEMU executable name. This +# is true even for "qemu-system-x86_64". +# +# Since: 2.13 +## +{ 'enum' : 'SysEmuTarget', + 'data' : [ 'aarch64', 'alpha', 'arm', 'cris', 'hppa', 'i386', 'lm32', + 'm68k', 'microblaze', 'microblazeel', 'mips', 'mips64', + 'mips64el', 'mipsel', 'moxie', 'nios2', 'or1k', 'ppc', + 'ppc64', 'ppcemb', 'riscv32', 'riscv64', 's390x', 'sh4', + 'sh4eb', 'sparc', 'sparc64', 'tricore', 'unicore32', + 'x86_64', 'xtensa', 'xtensaeb' ] } diff --git a/scripts/qapi/common.py b/scripts/qapi/common.py index 3e14bc41f2c0..a032cec37509 100644 --- a/scripts/qapi/common.py +++ b/scripts/qapi/common.py @@ -1814,23 +1814,23 @@ def c_name(name, protect=3DTrue): # C++ ISO/IEC 14882:2003 2.11 cpp_words =3D set(['bool', 'catch', 'class', 'const_cast', 'delete', 'dynamic_cast', 'explicit', 'false', 'friend', 'mutab= le', 'namespace', 'new', 'operator', 'private', 'protected= ', 'public', 'reinterpret_cast', 'static_cast', 'templat= e', 'this', 'throw', 'true', 'try', 'typeid', 'typename', 'using', 'virtual', 'wchar_t', # alternative representations 'and', 'and_eq', 'bitand', 'bitor', 'compl', 'not', 'not_eq', 'or', 'or_eq', 'xor', 'xor_eq']) # namespace pollution: - polluted_words =3D set(['unix', 'errno', 'mips', 'sparc']) + polluted_words =3D set(['unix', 'errno', 'mips', 'sparc', 'i386']) name =3D name.translate(c_name_trans) if protect and (name in c89_words | c99_words | c11_words | gcc_words | cpp_words | polluted_words): return 'q_' + name return name =20 eatspace =3D '\033EATSPACE.' pointer_suffix =3D ' *' + eatspace =20 =20 def genindent(count): --=20 2.14.1.3.gb7cf6e02401b From nobody Wed Oct 29 06:43:37 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 152485747539569.01002797066064; Fri, 27 Apr 2018 12:31:15 -0700 (PDT) Received: from localhost ([::1]:49663 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fC95K-0007PF-0r for importer@patchew.org; Fri, 27 Apr 2018 15:31:10 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53685) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fC93S-0005yd-Hz for qemu-devel@nongnu.org; Fri, 27 Apr 2018 15:29:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fC93Q-0000xp-UE for qemu-devel@nongnu.org; Fri, 27 Apr 2018 15:29:14 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:34462 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fC93Q-0000xb-Oo for qemu-devel@nongnu.org; Fri, 27 Apr 2018 15:29:12 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 55CFD427360E for ; Fri, 27 Apr 2018 19:29:12 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-124-192.rdu2.redhat.com [10.10.124.192]) by smtp.corp.redhat.com (Postfix) with ESMTP id A67D6215CDCB; Fri, 27 Apr 2018 19:29:10 +0000 (UTC) From: Laszlo Ersek To: qemu-devel@nongnu.org Date: Fri, 27 Apr 2018 21:28:50 +0200 Message-Id: <20180427192852.15013-4-lersek@redhat.com> In-Reply-To: <20180427192852.15013-1-lersek@redhat.com> References: <20180427192852.15013-1-lersek@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Fri, 27 Apr 2018 19:29:12 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Fri, 27 Apr 2018 19:29:12 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'lersek@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PATCH v3 3/5] qapi: change the type of TargetInfo.arch from string to enum SysEmuTarget X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Markus Armbruster Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Now that we have @SysEmuTarget, it makes sense to restrict @TargetInfo.@arch to valid sysemu targets at the schema level. Cc: "Daniel P. Berrange" Cc: Eric Blake Cc: Markus Armbruster Signed-off-by: Laszlo Ersek Reviewed-by: Markus Armbruster Reviewed-by: Eric Blake --- Notes: PATCHv3: =20 - pick up Eric's R-b =20 - no change =20 PATCHv2: =20 - drop naive code comment in qmp_query_target() [Markus] =20 - pick up Markus's R-b =20 - update CC list =20 PATCHv1: =20 - qmp_query_target(): pass (-1) as fallback value [Markus] - qmp_query_target(): catch lookup error with error_abort [Markus] =20 RFCv3: =20 - The patch is new in this version. [Markus] qapi/misc.json | 6 ++++-- arch_init.c | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/qapi/misc.json b/qapi/misc.json index 104d013adba6..460866cf542f 100644 --- a/qapi/misc.json +++ b/qapi/misc.json @@ -1,18 +1,20 @@ # -*- Mode: Python -*- # =20 ## # =3D Miscellanea ## =20 +{ 'include': 'common.json' } + ## # @qmp_capabilities: # # Enable QMP capabilities. # # Arguments: # # @enable: An optional list of QMPCapability values to enable. The # client must not enable any capability that is not # mentioned in the QMP greeting message. If the field is not # provided, it means no QMP capabilities will be enabled. @@ -2441,28 +2443,28 @@ # ] # } # ## { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] } =20 ## # @TargetInfo: # # Information describing the QEMU target. # -# @arch: the target architecture (eg "x86_64", "i386", etc) +# @arch: the target architecture # # Since: 1.2.0 ## { 'struct': 'TargetInfo', - 'data': { 'arch': 'str' } } + 'data': { 'arch': 'SysEmuTarget' } } =20 ## # @query-target: # # Return information about the target for this QEMU # # Returns: TargetInfo # # Since: 1.2.0 ## { 'command': 'query-target', 'returns': 'TargetInfo' } diff --git a/arch_init.c b/arch_init.c index 6ee07478bd11..9597218ceda3 100644 --- a/arch_init.c +++ b/arch_init.c @@ -21,22 +21,23 @@ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS = IN * THE SOFTWARE. */ #include "qemu/osdep.h" #include "qemu-common.h" #include "cpu.h" #include "sysemu/sysemu.h" #include "sysemu/arch_init.h" #include "hw/pci/pci.h" #include "hw/audio/soundhw.h" #include "qapi/qapi-commands-misc.h" +#include "qapi/error.h" #include "qemu/config-file.h" #include "qemu/error-report.h" #include "hw/acpi/acpi.h" #include "qemu/help_option.h" =20 #ifdef TARGET_SPARC int graphic_width =3D 1024; int graphic_height =3D 768; int graphic_depth =3D 8; #else int graphic_width =3D 800; @@ -104,15 +105,16 @@ int xen_available(void) return 1; #else return 0; #endif } =20 =20 TargetInfo *qmp_query_target(Error **errp) { TargetInfo *info =3D g_malloc0(sizeof(*info)); =20 - info->arch =3D g_strdup(TARGET_NAME); + info->arch =3D qapi_enum_parse(&SysEmuTarget_lookup, TARGET_NAME, -1, + &error_abort); =20 return info; } --=20 2.14.1.3.gb7cf6e02401b From nobody Wed Oct 29 06:43:37 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1524857481633739.5520810844357; Fri, 27 Apr 2018 12:31:21 -0700 (PDT) Received: from localhost ([::1]:49665 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fC95T-0007Uf-VN for importer@patchew.org; Fri, 27 Apr 2018 15:31:20 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53704) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fC93U-00063r-72 for qemu-devel@nongnu.org; Fri, 27 Apr 2018 15:29:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fC93S-0000z6-HC for qemu-devel@nongnu.org; Fri, 27 Apr 2018 15:29:16 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:34472 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fC93S-0000ye-Bo for qemu-devel@nongnu.org; Fri, 27 Apr 2018 15:29:14 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F0D4042709C9 for ; Fri, 27 Apr 2018 19:29:13 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-124-192.rdu2.redhat.com [10.10.124.192]) by smtp.corp.redhat.com (Postfix) with ESMTP id B2A7C215CDCB; Fri, 27 Apr 2018 19:29:12 +0000 (UTC) From: Laszlo Ersek To: qemu-devel@nongnu.org Date: Fri, 27 Apr 2018 21:28:51 +0200 Message-Id: <20180427192852.15013-5-lersek@redhat.com> In-Reply-To: <20180427192852.15013-1-lersek@redhat.com> References: <20180427192852.15013-1-lersek@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Fri, 27 Apr 2018 19:29:13 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Fri, 27 Apr 2018 19:29:13 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'lersek@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PATCH v3 4/5] qapi: discriminate CpuInfoFast on SysEmuTarget, not CpuInfoArch X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Markus Armbruster Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Add a new field @target (of type @SysEmuTarget) to the output of the @query-cpus-fast command, which provides more information about the emulation target than the field @arch (of type @CpuInfoArch). Make @target the new discriminator for the @CpuInfoFast return structure. Keep @arch for compatibility. Cc: "Daniel P. Berrange" Cc: Eric Blake Cc: Markus Armbruster Signed-off-by: Laszlo Ersek Reviewed-by: Eric Blake Reviewed-by: Markus Armbruster --- Notes: PATCHv3: =20 - remove superfluous empty comment line addition after @target =20 - pick up Eric's R-b =20 - skip Markus's R-b due to the next patch =20 PATCHv2: =20 - drop patch v1 5/6 with the CpuInfoCommon refactoring / extraction, as @CpuInfo / @query-cpus are deprecated [Eric, Markus] =20 - for the same reason, add @target to @CpuInfoFast / @query-cpus-fast only [Eric, Markus] =20 - Can't set @arch compatibly from a QAPI enum lookup of the proposed TARGET_BASE_ARCH macro, because TARGET_BASE_ARCH=3Ds390x is not identical to the @s390 @CpuInfoArch constant -- see more at . Keep sysemu_target_to_cpuinfo_arch() instead. [Markus, Eric] =20 - update CC list =20 PATCHv1: =20 - new patch qapi/misc.json | 62 +++++++++++++++++++++++++++++++---------- cpus.c | 87 ++++++++++++++++++++++++++++++++++++++++++------------= ---- 2 files changed, 110 insertions(+), 39 deletions(-) diff --git a/qapi/misc.json b/qapi/misc.json index 460866cf542f..fa4eec7b6b63 100644 --- a/qapi/misc.json +++ b/qapi/misc.json @@ -550,41 +550,71 @@ # Information about a virtual CPU # # @cpu-index: index of the virtual CPU # # @qom-path: path to the CPU object in the QOM tree # # @thread-id: ID of the underlying host thread # # @props: properties describing to which node/socket/core/thread # virtual CPU belongs to, provided if supported by board # -# @arch: architecture of the cpu, which determines which additional fields -# will be listed +# @arch: base architecture of the cpu +# +# @target: the QEMU system emulation target, which is more specific than +# @arch and determines which additional fields will be listed +# (since 2.13) # # Since: 2.12 # ## -{ 'union': 'CpuInfoFast', - 'base': {'cpu-index': 'int', 'qom-path': 'str', - 'thread-id': 'int', '*props': 'CpuInstanceProperties', - 'arch': 'CpuInfoArch' }, - 'discriminator': 'arch', - 'data': { 'x86': 'CpuInfoOther', - 'sparc': 'CpuInfoOther', - 'ppc': 'CpuInfoOther', - 'mips': 'CpuInfoOther', - 'tricore': 'CpuInfoOther', - 's390': 'CpuInfoS390', - 'riscv': 'CpuInfoOther', - 'other': 'CpuInfoOther' } } +{ 'union' : 'CpuInfoFast', + 'base' : { 'cpu-index' : 'int', + 'qom-path' : 'str', + 'thread-id' : 'int', + '*props' : 'CpuInstanceProperties', + 'arch' : 'CpuInfoArch', + 'target' : 'SysEmuTarget' }, + 'discriminator' : 'target', + 'data' : { 'aarch64' : 'CpuInfoOther', + 'alpha' : 'CpuInfoOther', + 'arm' : 'CpuInfoOther', + 'cris' : 'CpuInfoOther', + 'hppa' : 'CpuInfoOther', + 'i386' : 'CpuInfoOther', + 'lm32' : 'CpuInfoOther', + 'm68k' : 'CpuInfoOther', + 'microblaze' : 'CpuInfoOther', + 'microblazeel' : 'CpuInfoOther', + 'mips' : 'CpuInfoOther', + 'mips64' : 'CpuInfoOther', + 'mips64el' : 'CpuInfoOther', + 'mipsel' : 'CpuInfoOther', + 'moxie' : 'CpuInfoOther', + 'nios2' : 'CpuInfoOther', + 'or1k' : 'CpuInfoOther', + 'ppc' : 'CpuInfoOther', + 'ppc64' : 'CpuInfoOther', + 'ppcemb' : 'CpuInfoOther', + 'riscv32' : 'CpuInfoOther', + 'riscv64' : 'CpuInfoOther', + 's390x' : 'CpuInfoS390', + 'sh4' : 'CpuInfoOther', + 'sh4eb' : 'CpuInfoOther', + 'sparc' : 'CpuInfoOther', + 'sparc64' : 'CpuInfoOther', + 'tricore' : 'CpuInfoOther', + 'unicore32' : 'CpuInfoOther', + 'x86_64' : 'CpuInfoOther', + 'xtensa' : 'CpuInfoOther', + 'xtensaeb' : 'CpuInfoOther' } } =20 ## # @query-cpus-fast: # # Returns information about all virtual CPUs. This command does not # incur a performance penalty and should be used in production # instead of query-cpus. # # Returns: list of @CpuInfoFast # # Since: 2.12 @@ -594,33 +624,35 @@ # -> { "execute": "query-cpus-fast" } # <- { "return": [ # { # "thread-id": 25627, # "props": { # "core-id": 0, # "thread-id": 0, # "socket-id": 0 # }, # "qom-path": "/machine/unattached/device[0]", # "arch":"x86", +# "target":"x86_64", # "cpu-index": 0 # }, # { # "thread-id": 25628, # "props": { # "core-id": 0, # "thread-id": 0, # "socket-id": 1 # }, # "qom-path": "/machine/unattached/device[2]", # "arch":"x86", +# "target":"x86_64", # "cpu-index": 1 # } # ] # } ## { 'command': 'query-cpus-fast', 'returns': [ 'CpuInfoFast' ] } =20 ## # @IOThreadInfo: # # Information about an iothread diff --git a/cpus.c b/cpus.c index 60563a6d54ec..5bcd3ecf3848 100644 --- a/cpus.c +++ b/cpus.c @@ -2179,73 +2179,112 @@ CpuInfoList *qmp_query_cpus(Error **errp) if (!cur_item) { head =3D cur_item =3D info; } else { cur_item->next =3D info; cur_item =3D info; } } =20 return head; } =20 +static CpuInfoArch sysemu_target_to_cpuinfo_arch(SysEmuTarget target) +{ + /* + * The @SysEmuTarget -> @CpuInfoArch mapping below is based on the + * TARGET_ARCH -> TARGET_BASE_ARCH mapping in the "configure" script. + */ + switch (target) { + case SYS_EMU_TARGET_I386: + case SYS_EMU_TARGET_X86_64: + return CPU_INFO_ARCH_X86; + + case SYS_EMU_TARGET_PPC: + case SYS_EMU_TARGET_PPCEMB: + case SYS_EMU_TARGET_PPC64: + return CPU_INFO_ARCH_PPC; + + case SYS_EMU_TARGET_SPARC: + case SYS_EMU_TARGET_SPARC64: + return CPU_INFO_ARCH_SPARC; + + case SYS_EMU_TARGET_MIPS: + case SYS_EMU_TARGET_MIPSEL: + case SYS_EMU_TARGET_MIPS64: + case SYS_EMU_TARGET_MIPS64EL: + return CPU_INFO_ARCH_MIPS; + + case SYS_EMU_TARGET_TRICORE: + return CPU_INFO_ARCH_TRICORE; + + case SYS_EMU_TARGET_S390X: + return CPU_INFO_ARCH_S390; + + case SYS_EMU_TARGET_RISCV32: + case SYS_EMU_TARGET_RISCV64: + return CPU_INFO_ARCH_RISCV; + + default: + return CPU_INFO_ARCH_OTHER; + } +} + +static void cpustate_to_cpuinfo_s390(CpuInfoS390 *info, const CPUState *cp= u) +{ +#ifdef TARGET_S390X + S390CPU *s390_cpu =3D S390_CPU(cpu); + CPUS390XState *env =3D &s390_cpu->env; + + info->cpu_state =3D env->cpu_state; +#else + abort(); +#endif +} + /* * fast means: we NEVER interrupt vCPU threads to retrieve * information from KVM. */ CpuInfoFastList *qmp_query_cpus_fast(Error **errp) { MachineState *ms =3D MACHINE(qdev_get_machine()); MachineClass *mc =3D MACHINE_GET_CLASS(ms); CpuInfoFastList *head =3D NULL, *cur_item =3D NULL; + SysEmuTarget target =3D qapi_enum_parse(&SysEmuTarget_lookup, TARGET_N= AME, + -1, &error_abort); CPUState *cpu; -#if defined(TARGET_S390X) - S390CPU *s390_cpu; - CPUS390XState *env; -#endif =20 CPU_FOREACH(cpu) { CpuInfoFastList *info =3D g_malloc0(sizeof(*info)); info->value =3D g_malloc0(sizeof(*info->value)); =20 info->value->cpu_index =3D cpu->cpu_index; info->value->qom_path =3D object_get_canonical_path(OBJECT(cpu)); info->value->thread_id =3D cpu->thread_id; =20 info->value->has_props =3D !!mc->cpu_index_to_instance_props; if (info->value->has_props) { CpuInstanceProperties *props; props =3D g_malloc0(sizeof(*props)); *props =3D mc->cpu_index_to_instance_props(ms, cpu->cpu_index); info->value->props =3D props; } =20 -#if defined(TARGET_I386) - info->value->arch =3D CPU_INFO_ARCH_X86; -#elif defined(TARGET_PPC) - info->value->arch =3D CPU_INFO_ARCH_PPC; -#elif defined(TARGET_SPARC) - info->value->arch =3D CPU_INFO_ARCH_SPARC; -#elif defined(TARGET_MIPS) - info->value->arch =3D CPU_INFO_ARCH_MIPS; -#elif defined(TARGET_TRICORE) - info->value->arch =3D CPU_INFO_ARCH_TRICORE; -#elif defined(TARGET_S390X) - s390_cpu =3D S390_CPU(cpu); - env =3D &s390_cpu->env; - info->value->arch =3D CPU_INFO_ARCH_S390; - info->value->u.s390.cpu_state =3D env->cpu_state; -#elif defined(TARGET_RISCV) - info->value->arch =3D CPU_INFO_ARCH_RISCV; -#else - info->value->arch =3D CPU_INFO_ARCH_OTHER; -#endif + info->value->arch =3D sysemu_target_to_cpuinfo_arch(target); + info->value->target =3D target; + if (target =3D=3D SYS_EMU_TARGET_S390X) { + cpustate_to_cpuinfo_s390(&info->value->u.s390x, cpu); + } else { + /* do nothing for @CpuInfoOther */ + } + if (!cur_item) { head =3D cur_item =3D info; } else { cur_item->next =3D info; cur_item =3D info; } } =20 return head; } =20 --=20 2.14.1.3.gb7cf6e02401b From nobody Wed Oct 29 06:43:37 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1524857481749259.8329805757945; Fri, 27 Apr 2018 12:31:21 -0700 (PDT) Received: from localhost ([::1]:49666 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fC95U-0007V4-Qy for importer@patchew.org; Fri, 27 Apr 2018 15:31:20 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53719) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fC93V-00064p-3r for qemu-devel@nongnu.org; Fri, 27 Apr 2018 15:29:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fC93T-0000zs-V4 for qemu-devel@nongnu.org; Fri, 27 Apr 2018 15:29:17 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:34474 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fC93T-0000zf-Pu for qemu-devel@nongnu.org; Fri, 27 Apr 2018 15:29:15 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 67E074276E3C for ; Fri, 27 Apr 2018 19:29:15 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-124-192.rdu2.redhat.com [10.10.124.192]) by smtp.corp.redhat.com (Postfix) with ESMTP id 491D0215CDCB; Fri, 27 Apr 2018 19:29:14 +0000 (UTC) From: Laszlo Ersek To: qemu-devel@nongnu.org Date: Fri, 27 Apr 2018 21:28:52 +0200 Message-Id: <20180427192852.15013-6-lersek@redhat.com> In-Reply-To: <20180427192852.15013-1-lersek@redhat.com> References: <20180427192852.15013-1-lersek@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Fri, 27 Apr 2018 19:29:15 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Fri, 27 Apr 2018 19:29:15 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'lersek@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PATCH v3 5/5] qapi: deprecate CpuInfoFast.arch X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Markus Armbruster Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The TARGET_BASE_ARCH values from "configure" don't all map to the @CpuInfoArch enum constants; in particular "s390x" from the former does not match @s390 in the latter. Clients are known to rely on the @s390 constant specifically, so we can't change it silently. Instead, deprecate the @CpuInfoFast.@arch member (in favor of @CpuInfoFast.@target) using the regular deprecation process. (No deprecation reminder is added to sysemu_target_to_cpuinfo_arch(): once @CpuInfoFast.@arch is removed, the assignment expression that calls sysemu_target_to_cpuinfo_arch() from qmp_query_cpus_fast() will have to disappear; in turn the static function left without callers will also break the build, thus it'll have to go.) Cc: "Daniel P. Berrange" Cc: Eric Blake Cc: Markus Armbruster Signed-off-by: Laszlo Ersek Reviewed-by: Eric Blake Reviewed-by: Markus Armbruster --- Notes: PATCHv3: =20 - new patch [Markus, Eric] qapi/misc.json | 8 ++++---- qemu-doc.texi | 5 +++++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/qapi/misc.json b/qapi/misc.json index fa4eec7b6b63..f5988cc0b52d 100644 --- a/qapi/misc.json +++ b/qapi/misc.json @@ -550,27 +550,27 @@ # Information about a virtual CPU # # @cpu-index: index of the virtual CPU # # @qom-path: path to the CPU object in the QOM tree # # @thread-id: ID of the underlying host thread # # @props: properties describing to which node/socket/core/thread # virtual CPU belongs to, provided if supported by board # -# @arch: base architecture of the cpu +# @arch: base architecture of the cpu; deprecated since 2.13.0 in favor +# of @target # -# @target: the QEMU system emulation target, which is more specific than -# @arch and determines which additional fields will be listed -# (since 2.13) +# @target: the QEMU system emulation target, which determines which +# additional fields will be listed (since 2.13) # # Since: 2.12 # ## { 'union' : 'CpuInfoFast', 'base' : { 'cpu-index' : 'int', 'qom-path' : 'str', 'thread-id' : 'int', '*props' : 'CpuInstanceProperties', 'arch' : 'CpuInfoArch', 'target' : 'SysEmuTarget' }, diff --git a/qemu-doc.texi b/qemu-doc.texi index 5813d276156a..0ed0f19e6bab 100644 --- a/qemu-doc.texi +++ b/qemu-doc.texi @@ -2941,22 +2941,27 @@ by the ``convert -l snapshot_param'' argument inste= ad. @section QEMU Machine Protocol (QMP) commands =20 @subsection block-dirty-bitmap-add "autoload" parameter (since 2.12.0) =20 "autoload" parameter is now ignored. All bitmaps are automatically loaded from qcow2 images. =20 @subsection query-cpus (since 2.12.0) =20 The ``query-cpus'' command is replaced by the ``query-cpus-fast'' command. =20 +@subsection query-cpus-fast "arch" output member (since 2.13.0) + +The ``arch'' output member of the ``query-cpus-fast'' command is +replaced by the ``target'' output member. + @section System emulator devices =20 @subsection ivshmem (since 2.6.0) =20 The ``ivshmem'' device type is replaced by either the ``ivshmem-plain'' or ``ivshmem-doorbell`` device types. =20 @subsection Page size support < 4k for embedded PowerPC CPUs (since 2.12.0) =20 qemu-system-ppcemb will be removed. qemu-system-ppc (or qemu-system-ppc64) should be used instead. That means that embedded 4xx PowerPC CPUs will not --=20 2.14.1.3.gb7cf6e02401b