qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 00/13] qapi: add #if pre-processor conditions to generated code (part 3)
@ 2018-12-16 14:08 Marc-André Lureau
  2018-12-16 14:08 ` [Qemu-devel] [PATCH 01/13] build-sys: move qmp-introspect per target Marc-André Lureau
                   ` (13 more replies)
  0 siblings, 14 replies; 19+ messages in thread
From: Marc-André Lureau @ 2018-12-16 14:08 UTC (permalink / raw)
  To: qemu-devel; +Cc: armbru

Hi,

The thrid and last part (of "[PATCH v2 00/54] qapi: add #if
pre-processor conditions to generated code") is about adding schema
conditions based on the target.

For now, the qapi code is compiled in common objects (common to all
targets). This makes it impossible to add #if TARGET_ARM for example.

The patch "RFC: qapi: learn to split the schema by 'top-unit'"
proposes to split the schema by "top-unit", so that generated code can
be built either in common objects or per-target. That patch is a bit
rough, I would like to get some feedback about the approach before
trying to improve it. The following patches demonstrate usage of
target-based #if conditions, and getting rid of the
qmp_unregister_command() hack.

Marc-André Lureau (13):
  build-sys: move qmp-introspect per target
  qapi-commands: don't initialize command list in qmp_init_marshall()
  qapi-commands: rename init_marshal() to register_commands()
  RFC: qapi: learn to split the schema by 'top-unit'
  qapi: add a top-unit 'target' schema
  qapi: make rtc-reset-reinjection and SEV depend on TARGET_I386
  qapi: make s390 commands depend on TARGET_S390X
  target.json: add a note about query-cpu* not being s390x-specific
  qapi: make query-gic-capabilities depend on TARGET_ARM
  qapi: make query-cpu-model-expansion depend on s390 or x86
  qapi: make query-cpu-definitions depend on specific targets
  qapi: remove qmp_unregister_command()
  qapi: move RTC_CHANGE to the target schema

 qapi/misc.json                          | 478 ----------------------
 qapi/qapi-schema.json                   |   1 +
 qapi/target.json                        | 516 ++++++++++++++++++++++++
 scripts/qapi/commands.py                |  28 +-
 scripts/qapi/common.py                  | 105 ++++-
 scripts/qapi/events.py                  |  37 +-
 scripts/qapi/types.py                   |   8 +-
 scripts/qapi/visit.py                   |   8 +-
 include/qapi/qmp-event.h                |   4 +
 include/qapi/qmp/dispatch.h             |   1 -
 include/sysemu/arch_init.h              |  11 -
 target/i386/sev_i386.h                  |   2 +-
 hw/ppc/spapr_rtc.c                      |   2 +-
 hw/s390x/s390-skeys.c                   |   2 +-
 hw/timer/mc146818rtc.c                  |   4 +-
 monitor.c                               | 306 +++++++-------
 qapi/qmp-event.c                        |  11 +
 qapi/qmp-registry.c                     |   8 -
 qga/main.c                              |   3 +-
 qmp.c                                   |  26 --
 stubs/arch-query-cpu-def.c              |  11 -
 stubs/arch-query-cpu-model-baseline.c   |  13 -
 stubs/arch-query-cpu-model-comparison.c |  13 -
 stubs/arch-query-cpu-model-expansion.c  |  13 -
 target/arm/helper.c                     |   3 +-
 target/arm/monitor.c                    |   2 +-
 target/i386/cpu.c                       |   6 +-
 target/ppc/translate_init.inc.c         |   3 +-
 target/s390x/cpu_models.c               |   9 +-
 tests/test-qmp-cmds.c                   |   3 +-
 tests/test-qobject-input-visitor.c      |   1 -
 Makefile                                |   7 +-
 Makefile.objs                           |   2 -
 Makefile.target                         |   4 +
 docs/devel/qapi-code-gen.txt            |   6 +-
 stubs/Makefile.objs                     |   4 -
 36 files changed, 851 insertions(+), 810 deletions(-)
 create mode 100644 qapi/target.json
 delete mode 100644 stubs/arch-query-cpu-def.c
 delete mode 100644 stubs/arch-query-cpu-model-baseline.c
 delete mode 100644 stubs/arch-query-cpu-model-comparison.c
 delete mode 100644 stubs/arch-query-cpu-model-expansion.c

-- 
2.20.0

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2018-12-18 18:19 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-16 14:08 [Qemu-devel] [PATCH 00/13] qapi: add #if pre-processor conditions to generated code (part 3) Marc-André Lureau
2018-12-16 14:08 ` [Qemu-devel] [PATCH 01/13] build-sys: move qmp-introspect per target Marc-André Lureau
2018-12-17  7:06   ` Markus Armbruster
2018-12-16 14:08 ` [Qemu-devel] [PATCH 02/13] qapi-commands: don't initialize command list in qmp_init_marshall() Marc-André Lureau
2018-12-16 14:08 ` [Qemu-devel] [PATCH 03/13] qapi-commands: rename init_marshal() to register_commands() Marc-André Lureau
2018-12-16 14:08 ` [Qemu-devel] [PATCH 04/13] RFC: qapi: learn to split the schema by 'top-unit' Marc-André Lureau
2018-12-16 14:08 ` [Qemu-devel] [PATCH 05/13] qapi: add a top-unit 'target' schema Marc-André Lureau
2018-12-16 14:08 ` [Qemu-devel] [PATCH 06/13] qapi: make rtc-reset-reinjection and SEV depend on TARGET_I386 Marc-André Lureau
2018-12-16 14:08 ` [Qemu-devel] [PATCH 07/13] qapi: make s390 commands depend on TARGET_S390X Marc-André Lureau
2018-12-18 18:00   ` Markus Armbruster
2018-12-16 14:08 ` [Qemu-devel] [PATCH 08/13] target.json: add a note about query-cpu* not being s390x-specific Marc-André Lureau
2018-12-16 14:08 ` [Qemu-devel] [PATCH 09/13] qapi: make query-gic-capabilities depend on TARGET_ARM Marc-André Lureau
2018-12-16 14:08 ` [Qemu-devel] [PATCH 10/13] qapi: make query-cpu-model-expansion depend on s390 or x86 Marc-André Lureau
2018-12-18 12:35   ` Markus Armbruster
2018-12-16 14:09 ` [Qemu-devel] [PATCH 11/13] qapi: make query-cpu-definitions depend on specific targets Marc-André Lureau
2018-12-18 18:01   ` Markus Armbruster
2018-12-16 14:09 ` [Qemu-devel] [PATCH 12/13] qapi: remove qmp_unregister_command() Marc-André Lureau
2018-12-16 14:09 ` [Qemu-devel] [PATCH 13/13] qapi: move RTC_CHANGE to the target schema Marc-André Lureau
2018-12-18 18:19 ` [Qemu-devel] [PATCH 00/13] qapi: add #if pre-processor conditions to generated code (part 3) Markus Armbruster

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).