[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 51/54] qapi: make s390 commands depend on TAR
From: |
Cornelia Huck |
Subject: |
Re: [Qemu-devel] [PATCH v2 51/54] qapi: make s390 commands depend on TARGET_S390X |
Date: |
Tue, 22 Aug 2017 16:24:00 +0200 |
On Tue, 22 Aug 2017 15:22:52 +0200
Marc-André Lureau <address@hidden> wrote:
> Signed-off-by: Marc-André Lureau <address@hidden>
> ---
> qapi-schema.json | 10 +++++++---
> include/sysemu/arch_init.h | 6 ------
> monitor.c | 14 --------------
> qmp.c | 14 --------------
> stubs/arch-query-cpu-model-baseline.c | 12 ------------
> stubs/arch-query-cpu-model-comparison.c | 12 ------------
> target/s390x/cpu_models.c | 4 ++--
> stubs/Makefile.objs | 2 --
> 8 files changed, 9 insertions(+), 65 deletions(-)
> delete mode 100644 stubs/arch-query-cpu-model-baseline.c
> delete mode 100644 stubs/arch-query-cpu-model-comparison.c
>
> diff --git a/qapi-schema.json b/qapi-schema.json
> index 58574b3044..d4e1552ddc 100644
> --- a/qapi-schema.json
> +++ b/qapi-schema.json
> @@ -3577,7 +3577,8 @@
> #
> ##
> { 'command': 'dump-skeys',
> - 'data': { 'filename': 'str' } }
> + 'data': { 'filename': 'str' },
> + 'if': ['defined(NEED_CPU_H)', 'defined(TARGET_S390X)']}
I agree with making this s390x specific...
>
> ##
> # @netdev_add:
> @@ -4621,7 +4622,9 @@
> ##
> { 'command': 'query-cpu-model-comparison',
> 'data': { 'modela': 'CpuModelInfo', 'modelb': 'CpuModelInfo' },
> - 'returns': 'CpuModelCompareInfo' }
> + 'returns': 'CpuModelCompareInfo',
> + 'if': ['defined(NEED_CPU_H)', 'defined(TARGET_S390X)']}
> +
>
> ##
> # @CpuModelBaselineInfo:
> @@ -4673,7 +4676,8 @@
> { 'command': 'query-cpu-model-baseline',
> 'data': { 'modela': 'CpuModelInfo',
> 'modelb': 'CpuModelInfo' },
> - 'returns': 'CpuModelBaselineInfo' }
> + 'returns': 'CpuModelBaselineInfo',
> + 'if': ['defined(NEED_CPU_H)', 'defined(TARGET_S390X)']}
...but I'm not sure about the cpu model stuff. Wasn't the idea to move
to this model for all architectures later? (Given that we have stubs
for architectures not implementing this, instead of ifdeffing it in
monitor.c)
>
> ##
> # @AddfdInfo:
> diff --git a/include/sysemu/arch_init.h b/include/sysemu/arch_init.h
> index 8751c468ed..e9f1ea0cca 100644
> --- a/include/sysemu/arch_init.h
> +++ b/include/sysemu/arch_init.h
> @@ -35,11 +35,5 @@ CpuDefinitionInfoList *arch_query_cpu_definitions(Error
> **errp);
> CpuModelExpansionInfo *arch_query_cpu_model_expansion(CpuModelExpansionType
> type,
> CpuModelInfo *mode,
> Error **errp);
> -CpuModelCompareInfo *arch_query_cpu_model_comparison(CpuModelInfo *modela,
> - CpuModelInfo *modelb,
> - Error **errp);
> -CpuModelBaselineInfo *arch_query_cpu_model_baseline(CpuModelInfo *modela,
> - CpuModelInfo *modelb,
> - Error **errp);
>
> #endif
> diff --git a/monitor.c b/monitor.c
> index fcacf10f59..c9f04652b4 100644
> --- a/monitor.c
> +++ b/monitor.c
> @@ -971,19 +971,12 @@ static void qmp_query_qmp_schema(QDict *qdict, QObject
> **ret_data,
> */
> static void qmp_unregister_commands_hack(void)
> {
> -#ifndef TARGET_S390X
> - qmp_unregister_command(&qmp_commands, "dump-skeys");
> -#endif
> #ifndef TARGET_ARM
> qmp_unregister_command(&qmp_commands, "query-gic-capabilities");
> #endif
> #if !defined(TARGET_S390X) && !defined(TARGET_I386)
> qmp_unregister_command(&qmp_commands, "query-cpu-model-expansion");
> #endif
> -#if !defined(TARGET_S390X)
> - qmp_unregister_command(&qmp_commands, "query-cpu-model-baseline");
> - qmp_unregister_command(&qmp_commands, "query-cpu-model-comparison");
> -#endif
> #if !defined(TARGET_PPC) && !defined(TARGET_ARM) && !defined(TARGET_I386) \
> && !defined(TARGET_S390X)
> qmp_unregister_command(&qmp_commands, "query-cpu-definitions");
> @@ -4153,13 +4146,6 @@ QemuOptsList qemu_mon_opts = {
> },
> };
>
> -#ifndef TARGET_S390X
> -void qmp_dump_skeys(const char *filename, Error **errp)
> -{
> - error_setg(errp, QERR_FEATURE_DISABLED, "dump-skeys");
> -}
> -#endif
> -
> #ifndef TARGET_ARM
> GICCapabilityList *qmp_query_gic_capabilities(Error **errp)
> {
> diff --git a/qmp.c b/qmp.c
> index 90816ba283..7b6861846f 100644
> --- a/qmp.c
> +++ b/qmp.c
> @@ -553,20 +553,6 @@ CpuModelExpansionInfo
> *qmp_query_cpu_model_expansion(CpuModelExpansionType type,
> return arch_query_cpu_model_expansion(type, model, errp);
> }
>
> -CpuModelCompareInfo *qmp_query_cpu_model_comparison(CpuModelInfo *modela,
> - CpuModelInfo *modelb,
> - Error **errp)
> -{
> - return arch_query_cpu_model_comparison(modela, modelb, errp);
> -}
> -
> -CpuModelBaselineInfo *qmp_query_cpu_model_baseline(CpuModelInfo *modela,
> - CpuModelInfo *modelb,
> - Error **errp)
> -{
> - return arch_query_cpu_model_baseline(modela, modelb, errp);
> -}
> -
> void qmp_add_client(const char *protocol, const char *fdname,
> bool has_skipauth, bool skipauth, bool has_tls, bool tls,
> Error **errp)
> diff --git a/stubs/arch-query-cpu-model-baseline.c
> b/stubs/arch-query-cpu-model-baseline.c
> deleted file mode 100644
> index 094ec13c2c..0000000000
> --- a/stubs/arch-query-cpu-model-baseline.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"
> -
> -CpuModelBaselineInfo *arch_query_cpu_model_baseline(CpuModelInfo *modela,
> - CpuModelInfo *modelb,
> - Error **errp)
> -{
> - error_setg(errp, QERR_UNSUPPORTED);
> - return NULL;
> -}
> diff --git a/stubs/arch-query-cpu-model-comparison.c
> b/stubs/arch-query-cpu-model-comparison.c
> deleted file mode 100644
> index d5486ae980..0000000000
> --- a/stubs/arch-query-cpu-model-comparison.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"
> -
> -CpuModelCompareInfo *arch_query_cpu_model_comparison(CpuModelInfo *modela,
> - CpuModelInfo *modelb,
> - Error **errp)
> -{
> - error_setg(errp, QERR_UNSUPPORTED);
> - return NULL;
> -}
> diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c
> index fa1338fc72..cdff9cdd3b 100644
> --- a/target/s390x/cpu_models.c
> +++ b/target/s390x/cpu_models.c
> @@ -559,7 +559,7 @@ static void list_add_feat(const char *name, void *opaque)
> *last = entry;
> }
>
> -CpuModelCompareInfo *arch_query_cpu_model_comparison(CpuModelInfo *infoa,
> +CpuModelCompareInfo *qmp_query_cpu_model_comparison(CpuModelInfo *infoa,
> CpuModelInfo *infob,
> Error **errp)
> {
> @@ -632,7 +632,7 @@ CpuModelCompareInfo
> *arch_query_cpu_model_comparison(CpuModelInfo *infoa,
> return compare_info;
> }
>
> -CpuModelBaselineInfo *arch_query_cpu_model_baseline(CpuModelInfo *infoa,
> +CpuModelBaselineInfo *qmp_query_cpu_model_baseline(CpuModelInfo *infoa,
> CpuModelInfo *infob,
> Error **errp)
> {
> diff --git a/stubs/Makefile.objs b/stubs/Makefile.objs
> index 717b342c80..1421824eb3 100644
> --- a/stubs/Makefile.objs
> +++ b/stubs/Makefile.objs
> @@ -1,7 +1,5 @@
> stub-obj-y += arch-query-cpu-def.o
> stub-obj-y += arch-query-cpu-model-expansion.o
> -stub-obj-y += arch-query-cpu-model-comparison.o
> -stub-obj-y += arch-query-cpu-model-baseline.o
> stub-obj-y += bdrv-next-monitor-owned.o
> stub-obj-y += blk-commit-all.o
> stub-obj-y += blockdev-close-all-bdrv-states.o
- [Qemu-devel] [PATCH v2 05/54] qapi: generate a literal qobject for introspection, (continued)
- [Qemu-devel] [PATCH v2 05/54] qapi: generate a literal qobject for introspection, Marc-André Lureau, 2017/08/22
- [Qemu-devel] [PATCH v2 31/54] tests: add some enum members tests, Marc-André Lureau, 2017/08/22
- [Qemu-devel] [PATCH v2 16/54] qapi: add a test for invalid 'if', Marc-André Lureau, 2017/08/22
- [Qemu-devel] [PATCH v2 35/54] qapi: add 'if' on union variants, Marc-André Lureau, 2017/08/22
- [Qemu-devel] [PATCH v2 19/54] qapi: add #if/#endif helpers, Marc-André Lureau, 2017/08/22
- [Qemu-devel] [PATCH v2 50/54] qapi: make rtc-reset-reinjection depend on TARGET_I386, Marc-André Lureau, 2017/08/22
- [Qemu-devel] [PATCH v2 17/54] qapi: add 'if' condition on entity objects, Marc-André Lureau, 2017/08/22
- [Qemu-devel] [PATCH v2 33/54] qapi: add some struct member tests, Marc-André Lureau, 2017/08/22
- [Qemu-devel] [PATCH v2 45/54] qapi: add conditions to VNC type/commands/events on the schema, Marc-André Lureau, 2017/08/22
- [Qemu-devel] [PATCH v2 51/54] qapi: make s390 commands depend on TARGET_S390X, Marc-André Lureau, 2017/08/22
- Re: [Qemu-devel] [PATCH v2 51/54] qapi: make s390 commands depend on TARGET_S390X,
Cornelia Huck <=
- Re: [Qemu-devel] [PATCH v2 51/54] qapi: make s390 commands depend on TARGET_S390X, Markus Armbruster, 2017/08/22
- Re: [Qemu-devel] [PATCH v2 51/54] qapi: make s390 commands depend on TARGET_S390X, David Hildenbrand, 2017/08/22
- Re: [Qemu-devel] [PATCH v2 51/54] qapi: make s390 commands depend on TARGET_S390X, Markus Armbruster, 2017/08/22
[Qemu-devel] [PATCH v2 25/54] qapi-visit: add #if conditions to visitors, Marc-André Lureau, 2017/08/22
[Qemu-devel] [PATCH v2 48/54] tests/qmp-test: add query-qmp-schema test, Marc-André Lureau, 2017/08/22
[Qemu-devel] [PATCH v2 09/54] hmp: use qapi_enum_parse() in hmp_migrate_set_parameter, Marc-André Lureau, 2017/08/22