From nobody Tue Feb 10 02:55:01 2026 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 Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1503411621765292.186815257841; Tue, 22 Aug 2017 07:20:21 -0700 (PDT) Received: from localhost ([::1]:47513 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dkA2W-0004cK-HI for importer@patchew.org; Tue, 22 Aug 2017 10:20:20 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55466) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dk9Jq-0008U6-7m for qemu-devel@nongnu.org; Tue, 22 Aug 2017 09:34:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dk9Jp-0007Mv-50 for qemu-devel@nongnu.org; Tue, 22 Aug 2017 09:34:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:17571) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dk9Jo-0007MC-Ro for qemu-devel@nongnu.org; Tue, 22 Aug 2017 09:34:09 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 73AB0C0546C3; Tue, 22 Aug 2017 13:27:56 +0000 (UTC) Received: from localhost (ovpn-112-43.ams2.redhat.com [10.36.112.43]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2F22D7E575; Tue, 22 Aug 2017 13:27:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 73AB0C0546C3 Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=marcandre.lureau@redhat.com From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= To: qemu-devel@nongnu.org Date: Tue, 22 Aug 2017 15:22:54 +0200 Message-Id: <20170822132255.23945-54-marcandre.lureau@redhat.com> In-Reply-To: <20170822132255.23945-1-marcandre.lureau@redhat.com> References: <20170822132255.23945-1-marcandre.lureau@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Tue, 22 Aug 2017 13:27:56 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH v2 53/54] qapi: make query-cpu-model-expansion depend on s390 or x86 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: Alexander Graf , Eduardo Habkost , "Dr. David Alan Gilbert" , Markus Armbruster , Paolo Bonzini , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Marc-Andr=C3=A9 Lureau --- qapi-schema.json | 4 +++- include/sysemu/arch_init.h | 3 --- monitor.c | 3 --- qmp.c | 7 ------- stubs/arch-query-cpu-model-expansion.c | 12 ------------ target/i386/cpu.c | 2 +- target/s390x/cpu_models.c | 3 ++- stubs/Makefile.objs | 1 - 8 files changed, 6 insertions(+), 29 deletions(-) delete mode 100644 stubs/arch-query-cpu-model-expansion.c diff --git a/qapi-schema.json b/qapi-schema.json index 6c1adb35b5..127a2c71c6 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -4535,7 +4535,9 @@ { 'command': 'query-cpu-model-expansion', 'data': { 'type': 'CpuModelExpansionType', 'model': 'CpuModelInfo' }, - 'returns': 'CpuModelExpansionInfo' } + 'returns': 'CpuModelExpansionInfo', + 'if': ['defined(NEED_CPU_H)', + 'defined(TARGET_S390X) || defined(TARGET_I386)']} =20 ## # @CpuModelCompareResult: diff --git a/include/sysemu/arch_init.h b/include/sysemu/arch_init.h index e9f1ea0cca..fb3d20a1b8 100644 --- a/include/sysemu/arch_init.h +++ b/include/sysemu/arch_init.h @@ -32,8 +32,5 @@ int kvm_available(void); int xen_available(void); =20 CpuDefinitionInfoList *arch_query_cpu_definitions(Error **errp); -CpuModelExpansionInfo *arch_query_cpu_model_expansion(CpuModelExpansionTyp= e type, - CpuModelInfo *mode, - Error **errp); =20 #endif diff --git a/monitor.c b/monitor.c index 6ddc3c7ff7..ca67a584d2 100644 --- a/monitor.c +++ b/monitor.c @@ -971,9 +971,6 @@ static void qmp_query_qmp_schema(QDict *qdict, QObject = **ret_data, */ static void qmp_unregister_commands_hack(void) { -#if !defined(TARGET_S390X) && !defined(TARGET_I386) - qmp_unregister_command(&qmp_commands, "query-cpu-model-expansion"); -#endif #if !defined(TARGET_PPC) && !defined(TARGET_ARM) && !defined(TARGET_I386) \ && !defined(TARGET_S390X) qmp_unregister_command(&qmp_commands, "query-cpu-definitions"); diff --git a/qmp.c b/qmp.c index 7b6861846f..afa266ec1e 100644 --- a/qmp.c +++ b/qmp.c @@ -546,13 +546,6 @@ CpuDefinitionInfoList *qmp_query_cpu_definitions(Error= **errp) return arch_query_cpu_definitions(errp); } =20 -CpuModelExpansionInfo *qmp_query_cpu_model_expansion(CpuModelExpansionType= type, - CpuModelInfo *model, - Error **errp) -{ - return arch_query_cpu_model_expansion(type, model, errp); -} - void qmp_add_client(const char *protocol, const char *fdname, bool has_skipauth, bool skipauth, bool has_tls, bool t= ls, Error **errp) diff --git a/stubs/arch-query-cpu-model-expansion.c b/stubs/arch-query-cpu-= model-expansion.c deleted file mode 100644 index ae7cf554d1..0000000000 --- a/stubs/arch-query-cpu-model-expansion.c +++ /dev/null @@ -1,12 +0,0 @@ -#include "qemu/osdep.h" -#include "qemu-common.h" -#include "sysemu/arch_init.h" -#include "qapi/qmp/qerror.h" - -CpuModelExpansionInfo *arch_query_cpu_model_expansion(CpuModelExpansionTyp= e type, - CpuModelInfo *mode, - Error **errp) -{ - error_setg(errp, QERR_UNSUPPORTED); - return NULL; -} diff --git a/target/i386/cpu.c b/target/i386/cpu.c index ddc45abd70..d683e70a13 100644 --- a/target/i386/cpu.c +++ b/target/i386/cpu.c @@ -2574,7 +2574,7 @@ out: } =20 CpuModelExpansionInfo * -arch_query_cpu_model_expansion(CpuModelExpansionType type, +qmp_query_cpu_model_expansion(CpuModelExpansionType type, CpuModelInfo *model, Error **errp) { diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c index cdff9cdd3b..863dce064f 100644 --- a/target/s390x/cpu_models.c +++ b/target/s390x/cpu_models.c @@ -22,6 +22,7 @@ #ifndef CONFIG_USER_ONLY #include "sysemu/arch_init.h" #endif +#include "qmp-commands.h" =20 #define CPUDEF_INIT(_type, _gen, _ec_ga, _mha_pow, _hmfai, _name, _desc) \ { \ @@ -520,7 +521,7 @@ static void cpu_info_from_model(CpuModelInfo *info, con= st S390CPUModel *model, } } =20 -CpuModelExpansionInfo *arch_query_cpu_model_expansion(CpuModelExpansionTyp= e type, +CpuModelExpansionInfo *qmp_query_cpu_model_expansion(CpuModelExpansionType= type, CpuModelInfo *model, Error **errp) { diff --git a/stubs/Makefile.objs b/stubs/Makefile.objs index 1421824eb3..eb17628ede 100644 --- a/stubs/Makefile.objs +++ b/stubs/Makefile.objs @@ -1,5 +1,4 @@ stub-obj-y +=3D arch-query-cpu-def.o -stub-obj-y +=3D arch-query-cpu-model-expansion.o stub-obj-y +=3D bdrv-next-monitor-owned.o stub-obj-y +=3D blk-commit-all.o stub-obj-y +=3D blockdev-close-all-bdrv-states.o --=20 2.14.1.146.gd35faa819