[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 53/54] qapi: make query-cpu-model-expansion d
From: |
Marc-André Lureau |
Subject: |
Re: [Qemu-devel] [PATCH v2 53/54] qapi: make query-cpu-model-expansion depend on s390 or x86 |
Date: |
Wed, 23 Aug 2017 06:21:16 -0400 (EDT) |
Hi
----- Original Message -----
> On Tue, Aug 22, 2017 at 03:22:54PM +0200, Marc-André Lureau wrote:
> > Signed-off-by: Marc-André Lureau <address@hidden>
> > ---
> > 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)']}
>
> Maybe this is already documented somewhere in the series (I'm
> still going through the other patches), but: why exactly is
> 'defined(NEED_CPU_H)' in the list, too?
The point of this series is to make qapi schema configurable.
Some types/commands/events are target-specifc. In order to #ifdef on poisoined
symbols, we make most of QAPI generated code built per-target in patch 49/54.
But the common code still need to compile some units, that's why #ifdef
NEED_CPU_U. The clean solution is probably to split the generated schema to
common & per-target, that's not covered in the series.
>
> I always assumed that all the QAPI and QMP dispatching code would
> be compiled only once, and never be compiled with -DNEED_CPU_H
> defined.
No longer after 49/54.
- [Qemu-devel] [PATCH v2 13/54] qapi: drop the sentinel in enum array, (continued)
[Qemu-devel] [PATCH v2 27/54] qapi-types: add #if conditions to types, Marc-André Lureau, 2017/08/22
[Qemu-devel] [PATCH v2 49/54] build-sys: make qemu qapi objects per-target, Marc-André Lureau, 2017/08/22
[Qemu-devel] [PATCH v2 23/54] qapi-commands: add #if conditions to commands, Marc-André Lureau, 2017/08/22
[Qemu-devel] [PATCH v2 40/54] docs: document schema configuration, Marc-André Lureau, 2017/08/22
[Qemu-devel] [PATCH v2 46/54] qapi: add conditions to SPICE type/commands/events on the schema, Marc-André Lureau, 2017/08/22
[Qemu-devel] [PATCH v2 41/54] qapi2texi: add 'If:' section to generated documentation, Marc-André Lureau, 2017/08/22
[Qemu-devel] [PATCH v2 44/54] qapi2texi: add condition to variants, Marc-André Lureau, 2017/08/22