Browse Source

Include less of the generated modular QAPI headers

In my "build everything" tree, a change to the types in
qapi-schema.json triggers a recompile of about 4800 out of 5100
objects.

The previous commit split up qmp-commands.h, qmp-event.h, qmp-visit.h,
qapi-types.h.  Each of these headers still includes all its shards.
Reduce compile time by including just the shards we actually need.

To illustrate the benefits: adding a type to qapi/migration.json now
recompiles some 2300 instead of 4800 objects.  The next commit will
improve it further.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20180211093607.27351-24-armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
[eblake: rebase to master]
Signed-off-by: Eric Blake <eblake@redhat.com>
Markus Armbruster 7 years ago
parent
commit
9af2398977
100 changed files with 119 additions and 94 deletions
  1. 0 1
      backends/cryptodev.c
  2. 2 1
      backends/hostmem.c
  3. 0 1
      block.c
  4. 1 1
      block/block-backend.c
  5. 1 1
      block/crypto.c
  6. 1 1
      block/nbd.c
  7. 1 1
      block/nfs.c
  8. 2 2
      block/qapi.c
  9. 1 2
      block/qcow2.c
  10. 1 1
      block/quorum.c
  11. 1 1
      block/sheepdog.c
  12. 1 1
      block/ssh.c
  13. 1 1
      block/throttle-groups.c
  14. 2 2
      block/write-threshold.c
  15. 1 1
      blockdev-nbd.c
  16. 3 2
      blockdev.c
  17. 1 1
      blockjob.c
  18. 0 1
      chardev/char-fe.c
  19. 1 1
      chardev/char-ringbuf.c
  20. 1 0
      chardev/char-socket.c
  21. 1 2
      chardev/char.c
  22. 1 1
      cpus.c
  23. 1 1
      crypto/cipherpriv.h
  24. 1 1
      hmp.c
  25. 1 1
      hw/acpi/core.c
  26. 1 0
      hw/block/block.c
  27. 1 0
      hw/block/hd-geometry.c
  28. 1 1
      hw/char/virtio-console.c
  29. 1 1
      hw/core/machine.c
  30. 1 1
      hw/i386/pc.c
  31. 0 1
      hw/mem/nvdimm.c
  32. 1 1
      hw/net/rocker/qmp-norocker.c
  33. 1 1
      hw/net/rocker/rocker.c
  34. 1 1
      hw/net/rocker/rocker_fp.c
  35. 1 1
      hw/net/rocker/rocker_of_dpa.c
  36. 1 1
      hw/net/virtio-net.c
  37. 0 1
      hw/ppc/spapr_rtas.c
  38. 1 0
      hw/tpm/tpm_emulator.c
  39. 1 0
      hw/tpm/tpm_passthrough.c
  40. 1 1
      hw/watchdog/watchdog.c
  41. 1 1
      include/block/block.h
  42. 1 1
      include/block/dirty-bitmap.h
  43. 1 1
      include/block/nbd.h
  44. 1 0
      include/chardev/char.h
  45. 1 1
      include/crypto/cipher.h
  46. 1 1
      include/crypto/hash.h
  47. 1 1
      include/crypto/hmac.h
  48. 1 0
      include/crypto/secret.h
  49. 1 0
      include/crypto/tlscreds.h
  50. 1 1
      include/hw/block/block.h
  51. 1 1
      include/hw/block/fdc.h
  52. 1 0
      include/hw/ppc/spapr_drc.h
  53. 1 0
      include/hw/qdev-properties.h
  54. 1 0
      include/io/dns-resolver.h
  55. 1 1
      include/migration/colo.h
  56. 1 1
      include/migration/failover.h
  57. 1 0
      include/migration/global_state.h
  58. 1 0
      include/monitor/monitor.h
  59. 1 0
      include/net/filter.h
  60. 1 1
      include/net/net.h
  61. 0 1
      include/qapi/clone-visitor.h
  62. 1 1
      include/qapi/error.h
  63. 1 1
      include/qapi/qmp/qobject.h
  64. 1 1
      include/qapi/visitor.h
  65. 1 1
      include/qemu/sockets.h
  66. 1 1
      include/qemu/throttle.h
  67. 1 0
      include/qom/cpu.h
  68. 1 1
      include/qom/object.h
  69. 2 0
      include/sysemu/dump.h
  70. 1 0
      include/sysemu/hostmem.h
  71. 1 0
      include/sysemu/replay.h
  72. 1 0
      include/sysemu/sysemu.h
  73. 1 0
      include/sysemu/tpm.h
  74. 1 1
      include/sysemu/watchdog.h
  75. 1 0
      include/ui/console.h
  76. 1 1
      include/ui/input.h
  77. 1 0
      io/channel-socket.c
  78. 1 0
      io/dns-resolver.c
  79. 1 1
      migration/colo-failover.c
  80. 1 1
      migration/colo.c
  81. 2 2
      migration/migration.c
  82. 1 0
      migration/migration.h
  83. 1 1
      migration/ram.c
  84. 1 1
      migration/ram.h
  85. 0 1
      net/colo-compare.c
  86. 1 1
      net/filter-buffer.c
  87. 0 1
      net/filter-mirror.c
  88. 0 1
      net/filter-rewriter.c
  89. 2 2
      net/net.c
  90. 1 1
      net/tap_int.h
  91. 1 1
      net/vhost-user.c
  92. 1 1
      qemu-img.c
  93. 1 1
      qom/object.c
  94. 0 1
      qom/object_interfaces.c
  95. 1 0
      replay/replay-input.c
  96. 1 0
      replication.h
  97. 8 6
      scripts/qapi/commands.py
  98. 6 4
      scripts/qapi/events.py
  99. 5 3
      scripts/qapi/types.py
  100. 6 4
      scripts/qapi/visit.py

+ 0 - 1
backends/cryptodev.c

@@ -26,7 +26,6 @@
 #include "hw/boards.h"
 #include "hw/boards.h"
 #include "qapi/error.h"
 #include "qapi/error.h"
 #include "qapi/visitor.h"
 #include "qapi/visitor.h"
-#include "qapi-visit.h"
 #include "qemu/config-file.h"
 #include "qemu/config-file.h"
 #include "qom/object_interfaces.h"
 #include "qom/object_interfaces.h"
 #include "hw/virtio/virtio-crypto.h"
 #include "hw/virtio/virtio-crypto.h"

+ 2 - 1
backends/hostmem.c

@@ -9,12 +9,13 @@
  * This work is licensed under the terms of the GNU GPL, version 2 or later.
  * This work is licensed under the terms of the GNU GPL, version 2 or later.
  * See the COPYING file in the top-level directory.
  * See the COPYING file in the top-level directory.
  */
  */
+
 #include "qemu/osdep.h"
 #include "qemu/osdep.h"
 #include "sysemu/hostmem.h"
 #include "sysemu/hostmem.h"
 #include "hw/boards.h"
 #include "hw/boards.h"
 #include "qapi/error.h"
 #include "qapi/error.h"
+#include "qapi-builtin-visit.h"
 #include "qapi/visitor.h"
 #include "qapi/visitor.h"
-#include "qapi-visit.h"
 #include "qemu/config-file.h"
 #include "qemu/config-file.h"
 #include "qom/object_interfaces.h"
 #include "qom/object_interfaces.h"
 
 

+ 0 - 1
block.c

@@ -41,7 +41,6 @@
 #include "qemu/coroutine.h"
 #include "qemu/coroutine.h"
 #include "block/qapi.h"
 #include "block/qapi.h"
 #include "qemu/timer.h"
 #include "qemu/timer.h"
-#include "qapi-event.h"
 #include "qemu/cutils.h"
 #include "qemu/cutils.h"
 #include "qemu/id.h"
 #include "qemu/id.h"
 
 

+ 1 - 1
block/block-backend.c

@@ -17,8 +17,8 @@
 #include "block/throttle-groups.h"
 #include "block/throttle-groups.h"
 #include "sysemu/blockdev.h"
 #include "sysemu/blockdev.h"
 #include "sysemu/sysemu.h"
 #include "sysemu/sysemu.h"
-#include "qapi-event.h"
 #include "qapi/error.h"
 #include "qapi/error.h"
+#include "qapi/qapi-events-block.h"
 #include "qemu/id.h"
 #include "qemu/id.h"
 #include "qemu/option.h"
 #include "qemu/option.h"
 #include "trace.h"
 #include "trace.h"

+ 1 - 1
block/crypto.c

@@ -24,9 +24,9 @@
 #include "sysemu/block-backend.h"
 #include "sysemu/block-backend.h"
 #include "crypto/block.h"
 #include "crypto/block.h"
 #include "qapi/opts-visitor.h"
 #include "qapi/opts-visitor.h"
+#include "qapi/qapi-visit-crypto.h"
 #include "qapi/qmp/qdict.h"
 #include "qapi/qmp/qdict.h"
 #include "qapi/qobject-input-visitor.h"
 #include "qapi/qobject-input-visitor.h"
-#include "qapi-visit.h"
 #include "qapi/error.h"
 #include "qapi/error.h"
 #include "qemu/option.h"
 #include "qemu/option.h"
 #include "block/crypto.h"
 #include "block/crypto.h"

+ 1 - 1
block/nbd.c

@@ -33,7 +33,7 @@
 #include "block/block_int.h"
 #include "block/block_int.h"
 #include "qemu/module.h"
 #include "qemu/module.h"
 #include "qemu/option.h"
 #include "qemu/option.h"
-#include "qapi-visit.h"
+#include "qapi/qapi-visit-sockets.h"
 #include "qapi/qobject-input-visitor.h"
 #include "qapi/qobject-input-visitor.h"
 #include "qapi/qobject-output-visitor.h"
 #include "qapi/qobject-output-visitor.h"
 #include "qapi/qmp/qdict.h"
 #include "qapi/qmp/qdict.h"

+ 1 - 1
block/nfs.c

@@ -35,9 +35,9 @@
 #include "qemu/uri.h"
 #include "qemu/uri.h"
 #include "qemu/cutils.h"
 #include "qemu/cutils.h"
 #include "sysemu/sysemu.h"
 #include "sysemu/sysemu.h"
+#include "qapi/qapi-visit-block-core.h"
 #include "qapi/qmp/qdict.h"
 #include "qapi/qmp/qdict.h"
 #include "qapi/qmp/qstring.h"
 #include "qapi/qmp/qstring.h"
-#include "qapi-visit.h"
 #include "qapi/qobject-input-visitor.h"
 #include "qapi/qobject-input-visitor.h"
 #include "qapi/qobject-output-visitor.h"
 #include "qapi/qobject-output-visitor.h"
 #include <nfsc/libnfs.h>
 #include <nfsc/libnfs.h>

+ 2 - 2
block/qapi.c

@@ -27,10 +27,10 @@
 #include "block/block_int.h"
 #include "block/block_int.h"
 #include "block/throttle-groups.h"
 #include "block/throttle-groups.h"
 #include "block/write-threshold.h"
 #include "block/write-threshold.h"
-#include "qmp-commands.h"
-#include "qapi-visit.h"
 #include "qapi/error.h"
 #include "qapi/error.h"
+#include "qapi/qapi-commands-block-core.h"
 #include "qapi/qobject-output-visitor.h"
 #include "qapi/qobject-output-visitor.h"
+#include "qapi/qapi-visit-block-core.h"
 #include "qapi/qmp/qbool.h"
 #include "qapi/qmp/qbool.h"
 #include "qapi/qmp/qdict.h"
 #include "qapi/qmp/qdict.h"
 #include "qapi/qmp/qlist.h"
 #include "qapi/qmp/qlist.h"

+ 1 - 2
block/qcow2.c

@@ -30,15 +30,14 @@
 #include "block/qcow2.h"
 #include "block/qcow2.h"
 #include "qemu/error-report.h"
 #include "qemu/error-report.h"
 #include "qapi/error.h"
 #include "qapi/error.h"
+#include "qapi/qapi-events-block-core.h"
 #include "qapi/qmp/qdict.h"
 #include "qapi/qmp/qdict.h"
 #include "qapi/qmp/qstring.h"
 #include "qapi/qmp/qstring.h"
-#include "qapi-event.h"
 #include "trace.h"
 #include "trace.h"
 #include "qemu/option_int.h"
 #include "qemu/option_int.h"
 #include "qemu/cutils.h"
 #include "qemu/cutils.h"
 #include "qemu/bswap.h"
 #include "qemu/bswap.h"
 #include "qapi/opts-visitor.h"
 #include "qapi/opts-visitor.h"
-#include "qapi-visit.h"
 #include "block/crypto.h"
 #include "block/crypto.h"
 
 
 /*
 /*

+ 1 - 1
block/quorum.c

@@ -18,11 +18,11 @@
 #include "qemu/option.h"
 #include "qemu/option.h"
 #include "block/block_int.h"
 #include "block/block_int.h"
 #include "qapi/error.h"
 #include "qapi/error.h"
+#include "qapi/qapi-events-block.h"
 #include "qapi/qmp/qdict.h"
 #include "qapi/qmp/qdict.h"
 #include "qapi/qmp/qerror.h"
 #include "qapi/qmp/qerror.h"
 #include "qapi/qmp/qlist.h"
 #include "qapi/qmp/qlist.h"
 #include "qapi/qmp/qstring.h"
 #include "qapi/qmp/qstring.h"
-#include "qapi-event.h"
 #include "crypto/hash.h"
 #include "crypto/hash.h"
 
 
 #define HASH_LENGTH 32
 #define HASH_LENGTH 32

+ 1 - 1
block/sheepdog.c

@@ -13,8 +13,8 @@
  */
  */
 
 
 #include "qemu/osdep.h"
 #include "qemu/osdep.h"
-#include "qapi-visit.h"
 #include "qapi/error.h"
 #include "qapi/error.h"
+#include "qapi/qapi-visit-sockets.h"
 #include "qapi/qmp/qdict.h"
 #include "qapi/qmp/qdict.h"
 #include "qapi/qobject-input-visitor.h"
 #include "qapi/qobject-input-visitor.h"
 #include "qemu/uri.h"
 #include "qemu/uri.h"

+ 1 - 1
block/ssh.c

@@ -34,7 +34,7 @@
 #include "qemu/cutils.h"
 #include "qemu/cutils.h"
 #include "qemu/sockets.h"
 #include "qemu/sockets.h"
 #include "qemu/uri.h"
 #include "qemu/uri.h"
-#include "qapi-visit.h"
+#include "qapi/qapi-visit-sockets.h"
 #include "qapi/qmp/qdict.h"
 #include "qapi/qmp/qdict.h"
 #include "qapi/qmp/qstring.h"
 #include "qapi/qmp/qstring.h"
 #include "qapi/qobject-input-visitor.h"
 #include "qapi/qobject-input-visitor.h"

+ 1 - 1
block/throttle-groups.c

@@ -30,7 +30,7 @@
 #include "qemu/thread.h"
 #include "qemu/thread.h"
 #include "sysemu/qtest.h"
 #include "sysemu/qtest.h"
 #include "qapi/error.h"
 #include "qapi/error.h"
-#include "qapi-visit.h"
+#include "qapi/qapi-visit-block-core.h"
 #include "qom/object.h"
 #include "qom/object.h"
 #include "qom/object_interfaces.h"
 #include "qom/object_interfaces.h"
 
 

+ 2 - 2
block/write-threshold.c

@@ -15,9 +15,9 @@
 #include "qemu/coroutine.h"
 #include "qemu/coroutine.h"
 #include "block/write-threshold.h"
 #include "block/write-threshold.h"
 #include "qemu/notify.h"
 #include "qemu/notify.h"
-#include "qapi-event.h"
 #include "qapi/error.h"
 #include "qapi/error.h"
-#include "qmp-commands.h"
+#include "qapi/qapi-commands-block-core.h"
+#include "qapi/qapi-events-block-core.h"
 
 
 uint64_t bdrv_write_threshold_get(const BlockDriverState *bs)
 uint64_t bdrv_write_threshold_get(const BlockDriverState *bs)
 {
 {

+ 1 - 1
blockdev-nbd.c

@@ -14,8 +14,8 @@
 #include "sysemu/block-backend.h"
 #include "sysemu/block-backend.h"
 #include "hw/block/block.h"
 #include "hw/block/block.h"
 #include "qapi/error.h"
 #include "qapi/error.h"
+#include "qapi/qapi-commands-block.h"
 #include "sysemu/sysemu.h"
 #include "sysemu/sysemu.h"
-#include "qmp-commands.h"
 #include "block/nbd.h"
 #include "block/nbd.h"
 #include "io/channel-socket.h"
 #include "io/channel-socket.h"
 #include "io/net-listener.h"
 #include "io/net-listener.h"

+ 3 - 2
blockdev.c

@@ -40,10 +40,12 @@
 #include "qemu/error-report.h"
 #include "qemu/error-report.h"
 #include "qemu/option.h"
 #include "qemu/option.h"
 #include "qemu/config-file.h"
 #include "qemu/config-file.h"
+#include "qapi/qapi-commands-block.h"
+#include "qapi/qapi-commands-transaction.h"
+#include "qapi/qapi-visit-block-core.h"
 #include "qapi/qmp/qdict.h"
 #include "qapi/qmp/qdict.h"
 #include "qapi/qmp/qnum.h"
 #include "qapi/qmp/qnum.h"
 #include "qapi/qmp/qstring.h"
 #include "qapi/qmp/qstring.h"
-#include "qapi-visit.h"
 #include "qapi/error.h"
 #include "qapi/error.h"
 #include "qapi/qmp/qerror.h"
 #include "qapi/qmp/qerror.h"
 #include "qapi/qmp/qlist.h"
 #include "qapi/qmp/qlist.h"
@@ -51,7 +53,6 @@
 #include "sysemu/sysemu.h"
 #include "sysemu/sysemu.h"
 #include "sysemu/iothread.h"
 #include "sysemu/iothread.h"
 #include "block/block_int.h"
 #include "block/block_int.h"
-#include "qmp-commands.h"
 #include "block/trace.h"
 #include "block/trace.h"
 #include "sysemu/arch_init.h"
 #include "sysemu/arch_init.h"
 #include "sysemu/qtest.h"
 #include "sysemu/qtest.h"

+ 1 - 1
blockjob.c

@@ -30,11 +30,11 @@
 #include "block/block_int.h"
 #include "block/block_int.h"
 #include "sysemu/block-backend.h"
 #include "sysemu/block-backend.h"
 #include "qapi/error.h"
 #include "qapi/error.h"
+#include "qapi/qapi-events-block-core.h"
 #include "qapi/qmp/qerror.h"
 #include "qapi/qmp/qerror.h"
 #include "qemu/coroutine.h"
 #include "qemu/coroutine.h"
 #include "qemu/id.h"
 #include "qemu/id.h"
 #include "qemu/timer.h"
 #include "qemu/timer.h"
-#include "qapi-event.h"
 
 
 /* Right now, this mutex is only needed to synchronize accesses to job->busy
 /* Right now, this mutex is only needed to synchronize accesses to job->busy
  * and job->sleep_timer, such as concurrent calls to block_job_do_yield and
  * and job->sleep_timer, such as concurrent calls to block_job_do_yield and

+ 0 - 1
chardev/char-fe.c

@@ -25,7 +25,6 @@
 #include "qemu/error-report.h"
 #include "qemu/error-report.h"
 #include "qapi/error.h"
 #include "qapi/error.h"
 #include "qapi/qmp/qerror.h"
 #include "qapi/qmp/qerror.h"
-#include "qapi-visit.h"
 #include "sysemu/replay.h"
 #include "sysemu/replay.h"
 
 
 #include "chardev/char-fe.h"
 #include "chardev/char-fe.h"

+ 1 - 1
chardev/char-ringbuf.c

@@ -24,8 +24,8 @@
 
 
 #include "qemu/osdep.h"
 #include "qemu/osdep.h"
 #include "chardev/char.h"
 #include "chardev/char.h"
-#include "qmp-commands.h"
 #include "qapi/error.h"
 #include "qapi/error.h"
+#include "qapi/qapi-commands-char.h"
 #include "qemu/base64.h"
 #include "qemu/base64.h"
 #include "qemu/option.h"
 #include "qemu/option.h"
 
 

+ 1 - 0
chardev/char-socket.c

@@ -31,6 +31,7 @@
 #include "qemu/option.h"
 #include "qemu/option.h"
 #include "qapi/error.h"
 #include "qapi/error.h"
 #include "qapi/clone-visitor.h"
 #include "qapi/clone-visitor.h"
+#include "qapi/qapi-visit-sockets.h"
 
 
 #include "chardev/char-io.h"
 #include "chardev/char-io.h"
 
 

+ 1 - 2
chardev/char.c

@@ -29,9 +29,8 @@
 #include "qemu/config-file.h"
 #include "qemu/config-file.h"
 #include "qemu/error-report.h"
 #include "qemu/error-report.h"
 #include "chardev/char.h"
 #include "chardev/char.h"
-#include "qmp-commands.h"
-#include "qapi-visit.h"
 #include "qapi/error.h"
 #include "qapi/error.h"
+#include "qapi/qapi-commands-char.h"
 #include "qapi/qmp/qerror.h"
 #include "qapi/qmp/qerror.h"
 #include "sysemu/replay.h"
 #include "sysemu/replay.h"
 #include "qemu/help_option.h"
 #include "qemu/help_option.h"

+ 1 - 1
cpus.c

@@ -27,6 +27,7 @@
 #include "cpu.h"
 #include "cpu.h"
 #include "monitor/monitor.h"
 #include "monitor/monitor.h"
 #include "qapi/error.h"
 #include "qapi/error.h"
+#include "qapi/qapi-events-run-state.h"
 #include "qapi/qmp/qerror.h"
 #include "qapi/qmp/qerror.h"
 #include "qemu/error-report.h"
 #include "qemu/error-report.h"
 #include "sysemu/sysemu.h"
 #include "sysemu/sysemu.h"
@@ -49,7 +50,6 @@
 #include "qemu/bitmap.h"
 #include "qemu/bitmap.h"
 #include "qemu/seqlock.h"
 #include "qemu/seqlock.h"
 #include "tcg.h"
 #include "tcg.h"
-#include "qapi-event.h"
 #include "hw/nmi.h"
 #include "hw/nmi.h"
 #include "sysemu/replay.h"
 #include "sysemu/replay.h"
 #include "hw/boards.h"
 #include "hw/boards.h"

+ 1 - 1
crypto/cipherpriv.h

@@ -15,7 +15,7 @@
 #ifndef QCRYPTO_CIPHERPRIV_H
 #ifndef QCRYPTO_CIPHERPRIV_H
 #define QCRYPTO_CIPHERPRIV_H
 #define QCRYPTO_CIPHERPRIV_H
 
 
-#include "qapi-types.h"
+#include "qapi/qapi-types-crypto.h"
 
 
 typedef struct QCryptoCipherDriver QCryptoCipherDriver;
 typedef struct QCryptoCipherDriver QCryptoCipherDriver;
 
 

+ 1 - 1
hmp.c

@@ -29,11 +29,11 @@
 #include "monitor/qdev.h"
 #include "monitor/qdev.h"
 #include "qapi/error.h"
 #include "qapi/error.h"
 #include "qapi/opts-visitor.h"
 #include "qapi/opts-visitor.h"
+#include "qapi-builtin-visit.h"
 #include "qapi/qmp/qdict.h"
 #include "qapi/qmp/qdict.h"
 #include "qapi/qmp/qerror.h"
 #include "qapi/qmp/qerror.h"
 #include "qapi/string-input-visitor.h"
 #include "qapi/string-input-visitor.h"
 #include "qapi/string-output-visitor.h"
 #include "qapi/string-output-visitor.h"
-#include "qapi-visit.h"
 #include "qom/object_interfaces.h"
 #include "qom/object_interfaces.h"
 #include "ui/console.h"
 #include "ui/console.h"
 #include "block/nbd.h"
 #include "block/nbd.h"

+ 1 - 1
hw/acpi/core.c

@@ -27,8 +27,8 @@
 #include "qemu/config-file.h"
 #include "qemu/config-file.h"
 #include "qapi/error.h"
 #include "qapi/error.h"
 #include "qapi/opts-visitor.h"
 #include "qapi/opts-visitor.h"
+#include "qapi/qapi-events-run-state.h"
 #include "qapi-visit.h"
 #include "qapi-visit.h"
-#include "qapi-event.h"
 #include "qemu/error-report.h"
 #include "qemu/error-report.h"
 #include "qemu/option.h"
 #include "qemu/option.h"
 
 

+ 1 - 0
hw/block/block.c

@@ -12,6 +12,7 @@
 #include "sysemu/block-backend.h"
 #include "sysemu/block-backend.h"
 #include "hw/block/block.h"
 #include "hw/block/block.h"
 #include "qapi/error.h"
 #include "qapi/error.h"
+#include "qapi/qapi-types-block.h"
 #include "qemu/error-report.h"
 #include "qemu/error-report.h"
 
 
 void blkconf_serial(BlockConf *conf, char **serial)
 void blkconf_serial(BlockConf *conf, char **serial)

+ 1 - 0
hw/block/hd-geometry.c

@@ -32,6 +32,7 @@
 
 
 #include "qemu/osdep.h"
 #include "qemu/osdep.h"
 #include "sysemu/block-backend.h"
 #include "sysemu/block-backend.h"
+#include "qapi/qapi-types-block.h"
 #include "qemu/bswap.h"
 #include "qemu/bswap.h"
 #include "hw/block/block.h"
 #include "hw/block/block.h"
 #include "trace.h"
 #include "trace.h"

+ 1 - 1
hw/char/virtio-console.c

@@ -15,8 +15,8 @@
 #include "qemu/error-report.h"
 #include "qemu/error-report.h"
 #include "trace.h"
 #include "trace.h"
 #include "hw/virtio/virtio-serial.h"
 #include "hw/virtio/virtio-serial.h"
-#include "qapi-event.h"
 #include "qapi/error.h"
 #include "qapi/error.h"
+#include "qapi/qapi-events-char.h"
 
 
 #define TYPE_VIRTIO_CONSOLE_SERIAL_PORT "virtserialport"
 #define TYPE_VIRTIO_CONSOLE_SERIAL_PORT "virtserialport"
 #define VIRTIO_CONSOLE(obj) \
 #define VIRTIO_CONSOLE(obj) \

+ 1 - 1
hw/core/machine.c

@@ -13,7 +13,7 @@
 #include "qemu/osdep.h"
 #include "qemu/osdep.h"
 #include "hw/boards.h"
 #include "hw/boards.h"
 #include "qapi/error.h"
 #include "qapi/error.h"
-#include "qapi-visit.h"
+#include "qapi/qapi-visit-common.h"
 #include "qapi/visitor.h"
 #include "qapi/visitor.h"
 #include "hw/sysbus.h"
 #include "hw/sysbus.h"
 #include "sysemu/sysemu.h"
 #include "sysemu/sysemu.h"

+ 1 - 1
hw/i386/pc.c

@@ -67,8 +67,8 @@
 #include "acpi-build.h"
 #include "acpi-build.h"
 #include "hw/mem/pc-dimm.h"
 #include "hw/mem/pc-dimm.h"
 #include "qapi/error.h"
 #include "qapi/error.h"
+#include "qapi/qapi-visit-common.h"
 #include "qapi/visitor.h"
 #include "qapi/visitor.h"
-#include "qapi-visit.h"
 #include "qom/cpu.h"
 #include "qom/cpu.h"
 #include "hw/nmi.h"
 #include "hw/nmi.h"
 #include "hw/i386/intel_iommu.h"
 #include "hw/i386/intel_iommu.h"

+ 0 - 1
hw/mem/nvdimm.c

@@ -25,7 +25,6 @@
 #include "qemu/osdep.h"
 #include "qemu/osdep.h"
 #include "qapi/error.h"
 #include "qapi/error.h"
 #include "qapi/visitor.h"
 #include "qapi/visitor.h"
-#include "qapi-visit.h"
 #include "hw/mem/nvdimm.h"
 #include "hw/mem/nvdimm.h"
 
 
 static void nvdimm_get_label_size(Object *obj, Visitor *v, const char *name,
 static void nvdimm_get_label_size(Object *obj, Visitor *v, const char *name,

+ 1 - 1
hw/net/rocker/qmp-norocker.c

@@ -17,8 +17,8 @@
 
 
 #include "qemu/osdep.h"
 #include "qemu/osdep.h"
 #include "qemu-common.h"
 #include "qemu-common.h"
-#include "qmp-commands.h"
 #include "qapi/error.h"
 #include "qapi/error.h"
+#include "qapi/qapi-commands-rocker.h"
 #include "qapi/qmp/qerror.h"
 #include "qapi/qmp/qerror.h"
 
 
 RockerSwitch *qmp_query_rocker(const char *name, Error **errp)
 RockerSwitch *qmp_query_rocker(const char *name, Error **errp)

+ 1 - 1
hw/net/rocker/rocker.c

@@ -22,9 +22,9 @@
 #include "net/net.h"
 #include "net/net.h"
 #include "net/eth.h"
 #include "net/eth.h"
 #include "qapi/error.h"
 #include "qapi/error.h"
+#include "qapi/qapi-commands-rocker.h"
 #include "qemu/iov.h"
 #include "qemu/iov.h"
 #include "qemu/bitops.h"
 #include "qemu/bitops.h"
-#include "qmp-commands.h"
 
 
 #include "rocker.h"
 #include "rocker.h"
 #include "rocker_hw.h"
 #include "rocker_hw.h"

+ 1 - 1
hw/net/rocker/rocker_fp.c

@@ -16,7 +16,7 @@
 
 
 #include "qemu/osdep.h"
 #include "qemu/osdep.h"
 #include "net/clients.h"
 #include "net/clients.h"
-
+#include "qapi/qapi-types-rocker.h"
 #include "rocker.h"
 #include "rocker.h"
 #include "rocker_hw.h"
 #include "rocker_hw.h"
 #include "rocker_fp.h"
 #include "rocker_fp.h"

+ 1 - 1
hw/net/rocker/rocker_of_dpa.c

@@ -17,9 +17,9 @@
 #include "qemu/osdep.h"
 #include "qemu/osdep.h"
 #include "net/eth.h"
 #include "net/eth.h"
 #include "qapi/error.h"
 #include "qapi/error.h"
+#include "qapi/qapi-commands-rocker.h"
 #include "qemu/iov.h"
 #include "qemu/iov.h"
 #include "qemu/timer.h"
 #include "qemu/timer.h"
-#include "qmp-commands.h"
 
 
 #include "rocker.h"
 #include "rocker.h"
 #include "rocker_hw.h"
 #include "rocker_hw.h"

+ 1 - 1
hw/net/virtio-net.c

@@ -23,7 +23,7 @@
 #include "net/vhost_net.h"
 #include "net/vhost_net.h"
 #include "hw/virtio/virtio-bus.h"
 #include "hw/virtio/virtio-bus.h"
 #include "qapi/error.h"
 #include "qapi/error.h"
-#include "qapi-event.h"
+#include "qapi/qapi-events-net.h"
 #include "hw/virtio/virtio-access.h"
 #include "hw/virtio/virtio-access.h"
 #include "migration/misc.h"
 #include "migration/misc.h"
 
 

+ 0 - 1
hw/ppc/spapr_rtas.c

@@ -38,7 +38,6 @@
 #include "hw/ppc/spapr_vio.h"
 #include "hw/ppc/spapr_vio.h"
 #include "hw/ppc/spapr_rtas.h"
 #include "hw/ppc/spapr_rtas.h"
 #include "hw/ppc/ppc.h"
 #include "hw/ppc/ppc.h"
-#include "qapi-event.h"
 #include "hw/boards.h"
 #include "hw/boards.h"
 
 
 #include <libfdt.h>
 #include <libfdt.h>

+ 1 - 0
hw/tpm/tpm_emulator.c

@@ -38,6 +38,7 @@
 #include "migration/blocker.h"
 #include "migration/blocker.h"
 #include "qapi/error.h"
 #include "qapi/error.h"
 #include "qapi/clone-visitor.h"
 #include "qapi/clone-visitor.h"
+#include "qapi/qapi-visit-tpm.h"
 #include "chardev/char-fe.h"
 #include "chardev/char-fe.h"
 
 
 #define DEBUG_TPM 0
 #define DEBUG_TPM 0

+ 1 - 0
hw/tpm/tpm_passthrough.c

@@ -30,6 +30,7 @@
 #include "tpm_int.h"
 #include "tpm_int.h"
 #include "hw/hw.h"
 #include "hw/hw.h"
 #include "qapi/clone-visitor.h"
 #include "qapi/clone-visitor.h"
+#include "qapi/qapi-visit-tpm.h"
 #include "tpm_util.h"
 #include "tpm_util.h"
 
 
 #define DEBUG_TPM 0
 #define DEBUG_TPM 0

+ 1 - 1
hw/watchdog/watchdog.c

@@ -24,9 +24,9 @@
 #include "qemu/config-file.h"
 #include "qemu/config-file.h"
 #include "qemu/queue.h"
 #include "qemu/queue.h"
 #include "qapi/error.h"
 #include "qapi/error.h"
+#include "qapi/qapi-events-run-state.h"
 #include "sysemu/sysemu.h"
 #include "sysemu/sysemu.h"
 #include "sysemu/watchdog.h"
 #include "sysemu/watchdog.h"
-#include "qapi-event.h"
 #include "hw/nmi.h"
 #include "hw/nmi.h"
 #include "qemu/help_option.h"
 #include "qemu/help_option.h"
 #include "qmp-commands.h"
 #include "qmp-commands.h"

+ 1 - 1
include/block/block.h

@@ -2,7 +2,7 @@
 #define BLOCK_H
 #define BLOCK_H
 
 
 #include "block/aio.h"
 #include "block/aio.h"
-#include "qapi-types.h"
+#include "qapi/qapi-types-block-core.h"
 #include "qemu/iov.h"
 #include "qemu/iov.h"
 #include "qemu/coroutine.h"
 #include "qemu/coroutine.h"
 #include "block/accounting.h"
 #include "block/accounting.h"

+ 1 - 1
include/block/dirty-bitmap.h

@@ -2,7 +2,7 @@
 #define BLOCK_DIRTY_BITMAP_H
 #define BLOCK_DIRTY_BITMAP_H
 
 
 #include "qemu-common.h"
 #include "qemu-common.h"
-#include "qapi-types.h"
+#include "qapi/qapi-types-block-core.h"
 #include "qemu/hbitmap.h"
 #include "qemu/hbitmap.h"
 
 
 BdrvDirtyBitmap *bdrv_create_dirty_bitmap(BlockDriverState *bs,
 BdrvDirtyBitmap *bdrv_create_dirty_bitmap(BlockDriverState *bs,

+ 1 - 1
include/block/nbd.h

@@ -20,7 +20,7 @@
 #ifndef NBD_H
 #ifndef NBD_H
 #define NBD_H
 #define NBD_H
 
 
-
+#include "qapi/qapi-types-block.h"
 #include "io/channel-socket.h"
 #include "io/channel-socket.h"
 #include "crypto/tlscreds.h"
 #include "crypto/tlscreds.h"
 
 

+ 1 - 0
include/chardev/char.h

@@ -1,6 +1,7 @@
 #ifndef QEMU_CHAR_H
 #ifndef QEMU_CHAR_H
 #define QEMU_CHAR_H
 #define QEMU_CHAR_H
 
 
+#include "qapi/qapi-types-char.h"
 #include "qemu/main-loop.h"
 #include "qemu/main-loop.h"
 #include "qemu/bitmap.h"
 #include "qemu/bitmap.h"
 #include "qom/object.h"
 #include "qom/object.h"

+ 1 - 1
include/crypto/cipher.h

@@ -21,7 +21,7 @@
 #ifndef QCRYPTO_CIPHER_H
 #ifndef QCRYPTO_CIPHER_H
 #define QCRYPTO_CIPHER_H
 #define QCRYPTO_CIPHER_H
 
 
-#include "qapi-types.h"
+#include "qapi/qapi-types-crypto.h"
 
 
 typedef struct QCryptoCipher QCryptoCipher;
 typedef struct QCryptoCipher QCryptoCipher;
 
 

+ 1 - 1
include/crypto/hash.h

@@ -21,7 +21,7 @@
 #ifndef QCRYPTO_HASH_H
 #ifndef QCRYPTO_HASH_H
 #define QCRYPTO_HASH_H
 #define QCRYPTO_HASH_H
 
 
-#include "qapi-types.h"
+#include "qapi/qapi-types-crypto.h"
 
 
 /* See also "QCryptoHashAlgorithm" defined in qapi/crypto.json */
 /* See also "QCryptoHashAlgorithm" defined in qapi/crypto.json */
 
 

+ 1 - 1
include/crypto/hmac.h

@@ -12,7 +12,7 @@
 #ifndef QCRYPTO_HMAC_H
 #ifndef QCRYPTO_HMAC_H
 #define QCRYPTO_HMAC_H
 #define QCRYPTO_HMAC_H
 
 
-#include "qapi-types.h"
+#include "qapi/qapi-types-crypto.h"
 
 
 typedef struct QCryptoHmac QCryptoHmac;
 typedef struct QCryptoHmac QCryptoHmac;
 struct QCryptoHmac {
 struct QCryptoHmac {

+ 1 - 0
include/crypto/secret.h

@@ -21,6 +21,7 @@
 #ifndef QCRYPTO_SECRET_H
 #ifndef QCRYPTO_SECRET_H
 #define QCRYPTO_SECRET_H
 #define QCRYPTO_SECRET_H
 
 
+#include "qapi/qapi-types-crypto.h"
 #include "qom/object.h"
 #include "qom/object.h"
 
 
 #define TYPE_QCRYPTO_SECRET "secret"
 #define TYPE_QCRYPTO_SECRET "secret"

+ 1 - 0
include/crypto/tlscreds.h

@@ -21,6 +21,7 @@
 #ifndef QCRYPTO_TLSCREDS_H
 #ifndef QCRYPTO_TLSCREDS_H
 #define QCRYPTO_TLSCREDS_H
 #define QCRYPTO_TLSCREDS_H
 
 
+#include "qapi/qapi-types-crypto.h"
 #include "qom/object.h"
 #include "qom/object.h"
 
 
 #ifdef CONFIG_GNUTLS
 #ifdef CONFIG_GNUTLS

+ 1 - 1
include/hw/block/block.h

@@ -12,7 +12,7 @@
 #define HW_BLOCK_H
 #define HW_BLOCK_H
 
 
 #include "qemu-common.h"
 #include "qemu-common.h"
-#include "qapi-types.h"
+#include "qapi/qapi-types-block-core.h"
 
 
 /* Configuration */
 /* Configuration */
 
 

+ 1 - 1
include/hw/block/fdc.h

@@ -2,7 +2,7 @@
 #define HW_FDC_H
 #define HW_FDC_H
 
 
 #include "qemu-common.h"
 #include "qemu-common.h"
-#include "qapi-types.h"
+#include "qapi/qapi-types-block.h"
 
 
 /* fdc.c */
 /* fdc.c */
 #define MAX_FD 2
 #define MAX_FD 2

+ 1 - 0
include/hw/ppc/spapr_drc.h

@@ -14,6 +14,7 @@
 #define HW_SPAPR_DRC_H
 #define HW_SPAPR_DRC_H
 
 
 #include <libfdt.h>
 #include <libfdt.h>
+#include "qapi/qapi-types-run-state.h"
 #include "qom/object.h"
 #include "qom/object.h"
 #include "sysemu/sysemu.h"
 #include "sysemu/sysemu.h"
 #include "hw/qdev.h"
 #include "hw/qdev.h"

+ 1 - 0
include/hw/qdev-properties.h

@@ -1,6 +1,7 @@
 #ifndef QEMU_QDEV_PROPERTIES_H
 #ifndef QEMU_QDEV_PROPERTIES_H
 #define QEMU_QDEV_PROPERTIES_H
 #define QEMU_QDEV_PROPERTIES_H
 
 
+#include "qapi-types.h"
 #include "hw/qdev-core.h"
 #include "hw/qdev-core.h"
 
 
 /*** qdev-properties.c ***/
 /*** qdev-properties.c ***/

+ 1 - 0
include/io/dns-resolver.h

@@ -22,6 +22,7 @@
 #define QIO_DNS_RESOLVER_H
 #define QIO_DNS_RESOLVER_H
 
 
 #include "qemu-common.h"
 #include "qemu-common.h"
+#include "qapi/qapi-types-sockets.h"
 #include "qom/object.h"
 #include "qom/object.h"
 #include "io/task.h"
 #include "io/task.h"
 
 

+ 1 - 1
include/migration/colo.h

@@ -14,7 +14,7 @@
 #define QEMU_COLO_H
 #define QEMU_COLO_H
 
 
 #include "qemu-common.h"
 #include "qemu-common.h"
-#include "qapi-types.h"
+#include "qapi/qapi-types-migration.h"
 
 
 void colo_info_init(void);
 void colo_info_init(void);
 
 

+ 1 - 1
include/migration/failover.h

@@ -14,7 +14,7 @@
 #define QEMU_FAILOVER_H
 #define QEMU_FAILOVER_H
 
 
 #include "qemu-common.h"
 #include "qemu-common.h"
-#include "qapi-types.h"
+#include "qapi/qapi-types-migration.h"
 
 
 void failover_init_state(void);
 void failover_init_state(void);
 FailoverStatus failover_set_state(FailoverStatus old_state,
 FailoverStatus failover_set_state(FailoverStatus old_state,

+ 1 - 0
include/migration/global_state.h

@@ -13,6 +13,7 @@
 #ifndef QEMU_MIGRATION_GLOBAL_STATE_H
 #ifndef QEMU_MIGRATION_GLOBAL_STATE_H
 #define QEMU_MIGRATION_GLOBAL_STATE_H
 #define QEMU_MIGRATION_GLOBAL_STATE_H
 
 
+#include "qapi/qapi-types-run-state.h"
 #include "sysemu/sysemu.h"
 #include "sysemu/sysemu.h"
 
 
 void register_global_state(void);
 void register_global_state(void);

+ 1 - 0
include/monitor/monitor.h

@@ -3,6 +3,7 @@
 
 
 #include "qemu-common.h"
 #include "qemu-common.h"
 #include "block/block.h"
 #include "block/block.h"
+#include "qapi-types.h"
 #include "qemu/readline.h"
 #include "qemu/readline.h"
 
 
 extern Monitor *cur_mon;
 extern Monitor *cur_mon;

+ 1 - 0
include/net/filter.h

@@ -9,6 +9,7 @@
 #ifndef QEMU_NET_FILTER_H
 #ifndef QEMU_NET_FILTER_H
 #define QEMU_NET_FILTER_H
 #define QEMU_NET_FILTER_H
 
 
+#include "qapi/qapi-types-net.h"
 #include "qom/object.h"
 #include "qom/object.h"
 #include "qemu-common.h"
 #include "qemu-common.h"
 #include "net/queue.h"
 #include "net/queue.h"

+ 1 - 1
include/net/net.h

@@ -2,7 +2,7 @@
 #define QEMU_NET_H
 #define QEMU_NET_H
 
 
 #include "qemu/queue.h"
 #include "qemu/queue.h"
-#include "qapi-types.h"
+#include "qapi/qapi-types-net.h"
 #include "net/queue.h"
 #include "net/queue.h"
 #include "migration/vmstate.h"
 #include "migration/vmstate.h"
 
 

+ 0 - 1
include/qapi/clone-visitor.h

@@ -12,7 +12,6 @@
 #define QAPI_CLONE_VISITOR_H
 #define QAPI_CLONE_VISITOR_H
 
 
 #include "qapi/visitor.h"
 #include "qapi/visitor.h"
-#include "qapi-visit.h"
 
 
 /*
 /*
  * The clone visitor is for direct use only by the QAPI_CLONE() macro;
  * The clone visitor is for direct use only by the QAPI_CLONE() macro;

+ 1 - 1
include/qapi/error.h

@@ -115,7 +115,7 @@
 #ifndef ERROR_H
 #ifndef ERROR_H
 #define ERROR_H
 #define ERROR_H
 
 
-#include "qapi-types.h"
+#include "qapi/qapi-types-common.h"
 
 
 /*
 /*
  * Overall category of an error.
  * Overall category of an error.

+ 1 - 1
include/qapi/qmp/qobject.h

@@ -32,7 +32,7 @@
 #ifndef QOBJECT_H
 #ifndef QOBJECT_H
 #define QOBJECT_H
 #define QOBJECT_H
 
 
-#include "qapi-types.h"
+#include "qapi-builtin-types.h"
 
 
 struct QObject {
 struct QObject {
     QType type;
     QType type;

+ 1 - 1
include/qapi/visitor.h

@@ -15,7 +15,7 @@
 #ifndef QAPI_VISITOR_H
 #ifndef QAPI_VISITOR_H
 #define QAPI_VISITOR_H
 #define QAPI_VISITOR_H
 
 
-#include "qapi-types.h"
+#include "qapi-builtin-types.h"
 
 
 /*
 /*
  * The QAPI schema defines both a set of C data types, and a QMP wire
  * The QAPI schema defines both a set of C data types, and a QMP wire

+ 1 - 1
include/qemu/sockets.h

@@ -9,7 +9,7 @@ int inet_aton(const char *cp, struct in_addr *ia);
 
 
 #endif /* !_WIN32 */
 #endif /* !_WIN32 */
 
 
-#include "qapi-types.h"
+#include "qapi/qapi-types-sockets.h"
 
 
 /* misc helpers */
 /* misc helpers */
 int qemu_socket(int domain, int type, int protocol);
 int qemu_socket(int domain, int type, int protocol);

+ 1 - 1
include/qemu/throttle.h

@@ -26,7 +26,7 @@
 #define THROTTLE_H
 #define THROTTLE_H
 
 
 #include "qemu-common.h"
 #include "qemu-common.h"
-#include "qapi-types.h"
+#include "qapi/qapi-types-block-core.h"
 #include "qemu/timer.h"
 #include "qemu/timer.h"
 
 
 #define THROTTLE_VALUE_MAX 1000000000000000LL
 #define THROTTLE_VALUE_MAX 1000000000000000LL

+ 1 - 0
include/qom/cpu.h

@@ -24,6 +24,7 @@
 #include "disas/bfd.h"
 #include "disas/bfd.h"
 #include "exec/hwaddr.h"
 #include "exec/hwaddr.h"
 #include "exec/memattrs.h"
 #include "exec/memattrs.h"
+#include "qapi/qapi-types-run-state.h"
 #include "qemu/bitmap.h"
 #include "qemu/bitmap.h"
 #include "qemu/queue.h"
 #include "qemu/queue.h"
 #include "qemu/thread.h"
 #include "qemu/thread.h"

+ 1 - 1
include/qom/object.h

@@ -14,7 +14,7 @@
 #ifndef QEMU_OBJECT_H
 #ifndef QEMU_OBJECT_H
 #define QEMU_OBJECT_H
 #define QEMU_OBJECT_H
 
 
-#include "qapi-types.h"
+#include "qapi-builtin-types.h"
 #include "qemu/queue.h"
 #include "qemu/queue.h"
 
 
 struct TypeImpl;
 struct TypeImpl;

+ 2 - 0
include/sysemu/dump.h

@@ -14,6 +14,8 @@
 #ifndef DUMP_H
 #ifndef DUMP_H
 #define DUMP_H
 #define DUMP_H
 
 
+#include "qapi-types.h"
+
 #define MAKEDUMPFILE_SIGNATURE      "makedumpfile"
 #define MAKEDUMPFILE_SIGNATURE      "makedumpfile"
 #define MAX_SIZE_MDF_HEADER         (4096) /* max size of makedumpfile_header */
 #define MAX_SIZE_MDF_HEADER         (4096) /* max size of makedumpfile_header */
 #define TYPE_FLAT_HEADER            (1)    /* type of flattened format */
 #define TYPE_FLAT_HEADER            (1)    /* type of flattened format */

+ 1 - 0
include/sysemu/hostmem.h

@@ -14,6 +14,7 @@
 #define SYSEMU_HOSTMEM_H
 #define SYSEMU_HOSTMEM_H
 
 
 #include "sysemu/sysemu.h" /* for MAX_NODES */
 #include "sysemu/sysemu.h" /* for MAX_NODES */
+#include "qapi-types.h"
 #include "qom/object.h"
 #include "qom/object.h"
 #include "exec/memory.h"
 #include "exec/memory.h"
 #include "qemu/bitmap.h"
 #include "qemu/bitmap.h"

+ 1 - 0
include/sysemu/replay.h

@@ -13,6 +13,7 @@
  */
  */
 
 
 #include "sysemu.h"
 #include "sysemu.h"
+#include "qapi-types.h"
 
 
 /* replay clock kinds */
 /* replay clock kinds */
 enum ReplayClockKind {
 enum ReplayClockKind {

+ 1 - 0
include/sysemu/sysemu.h

@@ -2,6 +2,7 @@
 #define SYSEMU_H
 #define SYSEMU_H
 /* Misc. things related to the system emulator.  */
 /* Misc. things related to the system emulator.  */
 
 
+#include "qapi/qapi-types-run-state.h"
 #include "qemu/queue.h"
 #include "qemu/queue.h"
 #include "qemu/timer.h"
 #include "qemu/timer.h"
 #include "qemu/notify.h"
 #include "qemu/notify.h"

+ 1 - 0
include/sysemu/tpm.h

@@ -12,6 +12,7 @@
 #ifndef QEMU_TPM_H
 #ifndef QEMU_TPM_H
 #define QEMU_TPM_H
 #define QEMU_TPM_H
 
 
+#include "qapi/qapi-types-tpm.h"
 #include "qom/object.h"
 #include "qom/object.h"
 
 
 int tpm_config_parse(QemuOptsList *opts_list, const char *optarg);
 int tpm_config_parse(QemuOptsList *opts_list, const char *optarg);

+ 1 - 1
include/sysemu/watchdog.h

@@ -23,7 +23,7 @@
 #define QEMU_WATCHDOG_H
 #define QEMU_WATCHDOG_H
 
 
 #include "qemu/queue.h"
 #include "qemu/queue.h"
-#include "qapi-types.h"
+#include "qapi/qapi-types-run-state.h"
 
 
 struct WatchdogTimerModel {
 struct WatchdogTimerModel {
     QLIST_ENTRY(WatchdogTimerModel) entry;
     QLIST_ENTRY(WatchdogTimerModel) entry;

+ 1 - 0
include/ui/console.h

@@ -5,6 +5,7 @@
 #include "qom/object.h"
 #include "qom/object.h"
 #include "qemu/notify.h"
 #include "qemu/notify.h"
 #include "qemu/error-report.h"
 #include "qemu/error-report.h"
+#include "qapi/qapi-types-ui.h"
 
 
 #ifdef CONFIG_OPENGL
 #ifdef CONFIG_OPENGL
 # include <epoxy/gl.h>
 # include <epoxy/gl.h>

+ 1 - 1
include/ui/input.h

@@ -1,7 +1,7 @@
 #ifndef INPUT_H
 #ifndef INPUT_H
 #define INPUT_H
 #define INPUT_H
 
 
-#include "qapi-types.h"
+#include "qapi/qapi-types-ui.h"
 
 
 #define INPUT_EVENT_MASK_KEY   (1<<INPUT_EVENT_KIND_KEY)
 #define INPUT_EVENT_MASK_KEY   (1<<INPUT_EVENT_KIND_KEY)
 #define INPUT_EVENT_MASK_BTN   (1<<INPUT_EVENT_KIND_BTN)
 #define INPUT_EVENT_MASK_BTN   (1<<INPUT_EVENT_KIND_BTN)

+ 1 - 0
io/channel-socket.c

@@ -20,6 +20,7 @@
 
 
 #include "qemu/osdep.h"
 #include "qemu/osdep.h"
 #include "qapi/error.h"
 #include "qapi/error.h"
+#include "qapi/qapi-visit-sockets.h"
 #include "io/channel-socket.h"
 #include "io/channel-socket.h"
 #include "io/channel-watch.h"
 #include "io/channel-watch.h"
 #include "trace.h"
 #include "trace.h"

+ 1 - 0
io/dns-resolver.c

@@ -21,6 +21,7 @@
 #include "qemu/osdep.h"
 #include "qemu/osdep.h"
 #include "io/dns-resolver.h"
 #include "io/dns-resolver.h"
 #include "qapi/clone-visitor.h"
 #include "qapi/clone-visitor.h"
+#include "qapi/qapi-visit-sockets.h"
 #include "qemu/sockets.h"
 #include "qemu/sockets.h"
 #include "qapi/error.h"
 #include "qapi/error.h"
 #include "qemu/cutils.h"
 #include "qemu/cutils.h"

+ 1 - 1
migration/colo-failover.c

@@ -15,8 +15,8 @@
 #include "migration/failover.h"
 #include "migration/failover.h"
 #include "qemu/main-loop.h"
 #include "qemu/main-loop.h"
 #include "migration.h"
 #include "migration.h"
-#include "qmp-commands.h"
 #include "qapi/error.h"
 #include "qapi/error.h"
+#include "qapi/qapi-commands-migration.h"
 #include "qapi/qmp/qerror.h"
 #include "qapi/qmp/qerror.h"
 #include "qemu/error-report.h"
 #include "qemu/error-report.h"
 #include "trace.h"
 #include "trace.h"

+ 1 - 1
migration/colo.c

@@ -13,6 +13,7 @@
 #include "qemu/osdep.h"
 #include "qemu/osdep.h"
 #include "sysemu/sysemu.h"
 #include "sysemu/sysemu.h"
 #include "qapi/error.h"
 #include "qapi/error.h"
+#include "qapi/qapi-commands-migration.h"
 #include "qemu-file-channel.h"
 #include "qemu-file-channel.h"
 #include "migration.h"
 #include "migration.h"
 #include "qemu-file.h"
 #include "qemu-file.h"
@@ -24,7 +25,6 @@
 #include "qemu/error-report.h"
 #include "qemu/error-report.h"
 #include "migration/failover.h"
 #include "migration/failover.h"
 #include "replication.h"
 #include "replication.h"
-#include "qmp-commands.h"
 
 
 static bool vmstate_loading;
 static bool vmstate_loading;
 
 

+ 2 - 2
migration/migration.c

@@ -31,15 +31,15 @@
 #include "migration/vmstate.h"
 #include "migration/vmstate.h"
 #include "block/block.h"
 #include "block/block.h"
 #include "qapi/error.h"
 #include "qapi/error.h"
+#include "qapi/qapi-commands-migration.h"
+#include "qapi/qapi-events-migration.h"
 #include "qapi/qmp/qerror.h"
 #include "qapi/qmp/qerror.h"
 #include "qapi/qmp/qnull.h"
 #include "qapi/qmp/qnull.h"
 #include "qemu/rcu.h"
 #include "qemu/rcu.h"
 #include "block.h"
 #include "block.h"
 #include "postcopy-ram.h"
 #include "postcopy-ram.h"
 #include "qemu/thread.h"
 #include "qemu/thread.h"
-#include "qmp-commands.h"
 #include "trace.h"
 #include "trace.h"
-#include "qapi-event.h"
 #include "exec/target_page.h"
 #include "exec/target_page.h"
 #include "io/channel-buffer.h"
 #include "io/channel-buffer.h"
 #include "migration/colo.h"
 #include "migration/colo.h"

+ 1 - 0
migration/migration.h

@@ -15,6 +15,7 @@
 #define QEMU_MIGRATION_H
 #define QEMU_MIGRATION_H
 
 
 #include "qemu-common.h"
 #include "qemu-common.h"
+#include "qapi/qapi-types-migration.h"
 #include "qemu/thread.h"
 #include "qemu/thread.h"
 #include "exec/cpu-common.h"
 #include "exec/cpu-common.h"
 #include "qemu/coroutine_int.h"
 #include "qemu/coroutine_int.h"

+ 1 - 1
migration/ram.c

@@ -29,7 +29,6 @@
 #include "qemu/osdep.h"
 #include "qemu/osdep.h"
 #include "cpu.h"
 #include "cpu.h"
 #include <zlib.h>
 #include <zlib.h>
-#include "qapi-event.h"
 #include "qemu/cutils.h"
 #include "qemu/cutils.h"
 #include "qemu/bitops.h"
 #include "qemu/bitops.h"
 #include "qemu/bitmap.h"
 #include "qemu/bitmap.h"
@@ -44,6 +43,7 @@
 #include "migration/page_cache.h"
 #include "migration/page_cache.h"
 #include "qemu/error-report.h"
 #include "qemu/error-report.h"
 #include "qapi/error.h"
 #include "qapi/error.h"
+#include "qapi/qapi-events-migration.h"
 #include "qapi/qmp/qerror.h"
 #include "qapi/qmp/qerror.h"
 #include "trace.h"
 #include "trace.h"
 #include "exec/ram_addr.h"
 #include "exec/ram_addr.h"

+ 1 - 1
migration/ram.h

@@ -30,7 +30,7 @@
 #define QEMU_MIGRATION_RAM_H
 #define QEMU_MIGRATION_RAM_H
 
 
 #include "qemu-common.h"
 #include "qemu-common.h"
-#include "qapi-types.h"
+#include "qapi/qapi-types-migration.h"
 #include "exec/cpu-common.h"
 #include "exec/cpu-common.h"
 
 
 extern MigrationStats ram_counters;
 extern MigrationStats ram_counters;

+ 0 - 1
net/colo-compare.c

@@ -25,7 +25,6 @@
 #include "net/queue.h"
 #include "net/queue.h"
 #include "chardev/char-fe.h"
 #include "chardev/char-fe.h"
 #include "qemu/sockets.h"
 #include "qemu/sockets.h"
-#include "qapi-visit.h"
 #include "net/colo.h"
 #include "net/colo.h"
 #include "sysemu/iothread.h"
 #include "sysemu/iothread.h"
 
 

+ 1 - 1
net/filter-buffer.c

@@ -13,8 +13,8 @@
 #include "qemu-common.h"
 #include "qemu-common.h"
 #include "qemu/timer.h"
 #include "qemu/timer.h"
 #include "qemu/iov.h"
 #include "qemu/iov.h"
+#include "qapi-builtin-visit.h"
 #include "qapi/qmp/qerror.h"
 #include "qapi/qmp/qerror.h"
-#include "qapi-visit.h"
 #include "qom/object.h"
 #include "qom/object.h"
 
 
 #define TYPE_FILTER_BUFFER "filter-buffer"
 #define TYPE_FILTER_BUFFER "filter-buffer"

+ 0 - 1
net/filter-mirror.c

@@ -14,7 +14,6 @@
 #include "net/net.h"
 #include "net/net.h"
 #include "qemu-common.h"
 #include "qemu-common.h"
 #include "qapi/error.h"
 #include "qapi/error.h"
-#include "qapi-visit.h"
 #include "qom/object.h"
 #include "qom/object.h"
 #include "qemu/main-loop.h"
 #include "qemu/main-loop.h"
 #include "qemu/error-report.h"
 #include "qemu/error-report.h"

+ 0 - 1
net/filter-rewriter.c

@@ -16,7 +16,6 @@
 #include "net/net.h"
 #include "net/net.h"
 #include "qemu-common.h"
 #include "qemu-common.h"
 #include "qemu/error-report.h"
 #include "qemu/error-report.h"
-#include "qapi-visit.h"
 #include "qom/object.h"
 #include "qom/object.h"
 #include "qemu/main-loop.h"
 #include "qemu/main-loop.h"
 #include "qemu/iov.h"
 #include "qemu/iov.h"

+ 2 - 2
net/net.c

@@ -33,18 +33,18 @@
 
 
 #include "monitor/monitor.h"
 #include "monitor/monitor.h"
 #include "qemu/help_option.h"
 #include "qemu/help_option.h"
+#include "qapi/qapi-commands-net.h"
+#include "qapi/qapi-visit-net.h"
 #include "qapi/qmp/qdict.h"
 #include "qapi/qmp/qdict.h"
 #include "qapi/qmp/qerror.h"
 #include "qapi/qmp/qerror.h"
 #include "qemu/error-report.h"
 #include "qemu/error-report.h"
 #include "qemu/sockets.h"
 #include "qemu/sockets.h"
 #include "qemu/cutils.h"
 #include "qemu/cutils.h"
 #include "qemu/config-file.h"
 #include "qemu/config-file.h"
-#include "qmp-commands.h"
 #include "hw/qdev.h"
 #include "hw/qdev.h"
 #include "qemu/iov.h"
 #include "qemu/iov.h"
 #include "qemu/main-loop.h"
 #include "qemu/main-loop.h"
 #include "qemu/option.h"
 #include "qemu/option.h"
-#include "qapi-visit.h"
 #include "qapi/error.h"
 #include "qapi/error.h"
 #include "qapi/opts-visitor.h"
 #include "qapi/opts-visitor.h"
 #include "sysemu/sysemu.h"
 #include "sysemu/sysemu.h"

+ 1 - 1
net/tap_int.h

@@ -27,7 +27,7 @@
 #define NET_TAP_INT_H
 #define NET_TAP_INT_H
 
 
 #include "qemu-common.h"
 #include "qemu-common.h"
-#include "qapi-types.h"
+#include "qapi/qapi-types-net.h"
 
 
 int tap_open(char *ifname, int ifname_size, int *vnet_hdr,
 int tap_open(char *ifname, int ifname_size, int *vnet_hdr,
              int vnet_hdr_required, int mq_required, Error **errp);
              int vnet_hdr_required, int mq_required, Error **errp);

+ 1 - 1
net/vhost-user.c

@@ -14,10 +14,10 @@
 #include "net/vhost-user.h"
 #include "net/vhost-user.h"
 #include "chardev/char-fe.h"
 #include "chardev/char-fe.h"
 #include "qapi/error.h"
 #include "qapi/error.h"
+#include "qapi/qapi-commands-net.h"
 #include "qemu/config-file.h"
 #include "qemu/config-file.h"
 #include "qemu/error-report.h"
 #include "qemu/error-report.h"
 #include "qemu/option.h"
 #include "qemu/option.h"
-#include "qmp-commands.h"
 #include "trace.h"
 #include "trace.h"
 
 
 typedef struct VhostUserState {
 typedef struct VhostUserState {

+ 1 - 1
qemu-img.c

@@ -27,7 +27,7 @@
 
 
 #include "qemu-version.h"
 #include "qemu-version.h"
 #include "qapi/error.h"
 #include "qapi/error.h"
-#include "qapi-visit.h"
+#include "qapi/qapi-visit-block-core.h"
 #include "qapi/qobject-output-visitor.h"
 #include "qapi/qobject-output-visitor.h"
 #include "qapi/qmp/qjson.h"
 #include "qapi/qmp/qjson.h"
 #include "qapi/qmp/qdict.h"
 #include "qapi/qmp/qdict.h"

+ 1 - 1
qom/object.c

@@ -16,9 +16,9 @@
 #include "qom/object_interfaces.h"
 #include "qom/object_interfaces.h"
 #include "qemu/cutils.h"
 #include "qemu/cutils.h"
 #include "qapi/visitor.h"
 #include "qapi/visitor.h"
-#include "qapi-visit.h"
 #include "qapi/string-input-visitor.h"
 #include "qapi/string-input-visitor.h"
 #include "qapi/string-output-visitor.h"
 #include "qapi/string-output-visitor.h"
+#include "qapi-builtin-visit.h"
 #include "qapi/qmp/qerror.h"
 #include "qapi/qmp/qerror.h"
 #include "trace.h"
 #include "trace.h"
 
 

+ 0 - 1
qom/object_interfaces.c

@@ -5,7 +5,6 @@
 #include "qom/object_interfaces.h"
 #include "qom/object_interfaces.h"
 #include "qemu/module.h"
 #include "qemu/module.h"
 #include "qemu/option.h"
 #include "qemu/option.h"
-#include "qapi-visit.h"
 #include "qapi/opts-visitor.h"
 #include "qapi/opts-visitor.h"
 #include "qemu/config-file.h"
 #include "qemu/config-file.h"
 
 

+ 1 - 0
replay/replay-input.c

@@ -16,6 +16,7 @@
 #include "qemu/notify.h"
 #include "qemu/notify.h"
 #include "ui/input.h"
 #include "ui/input.h"
 #include "qapi/clone-visitor.h"
 #include "qapi/clone-visitor.h"
+#include "qapi/qapi-visit-ui.h"
 
 
 void replay_save_input_event(InputEvent *evt)
 void replay_save_input_event(InputEvent *evt)
 {
 {

+ 1 - 0
replication.h

@@ -15,6 +15,7 @@
 #ifndef REPLICATION_H
 #ifndef REPLICATION_H
 #define REPLICATION_H
 #define REPLICATION_H
 
 
+#include "qapi/qapi-types-block-core.h"
 #include "qemu/queue.h"
 #include "qemu/queue.h"
 
 
 typedef struct ReplicationOps ReplicationOps;
 typedef struct ReplicationOps ReplicationOps;

+ 8 - 6
scripts/qapi/commands.py

@@ -241,6 +241,9 @@ def _module_basename(self, what, name):
 
 
     def _begin_module(self, name):
     def _begin_module(self, name):
         self._visited_ret_types[self._genc] = set()
         self._visited_ret_types[self._genc] = set()
+        commands = self._module_basename('qapi-commands', name)
+        types = self._module_basename('qapi-types', name)
+        visit = self._module_basename('qapi-visit', name)
         self._genc.add(mcgen('''
         self._genc.add(mcgen('''
 #include "qemu/osdep.h"
 #include "qemu/osdep.h"
 #include "qemu-common.h"
 #include "qemu-common.h"
@@ -251,18 +254,17 @@ def _begin_module(self, name):
 #include "qapi/qobject-input-visitor.h"
 #include "qapi/qobject-input-visitor.h"
 #include "qapi/dealloc-visitor.h"
 #include "qapi/dealloc-visitor.h"
 #include "qapi/error.h"
 #include "qapi/error.h"
-#include "%(prefix)sqapi-types.h"
-#include "%(prefix)sqapi-visit.h"
-#include "%(prefix)sqmp-commands.h"
+#include "%(visit)s.h"
+#include "%(commands)s.h"
 
 
 ''',
 ''',
-                             prefix=self._prefix))
+                             commands=commands, visit=visit))
         self._genh.add(mcgen('''
         self._genh.add(mcgen('''
-#include "%(prefix)sqapi-types.h"
+#include "%(types)s.h"
 #include "qapi/qmp/dispatch.h"
 #include "qapi/qmp/dispatch.h"
 
 
 ''',
 ''',
-                             prefix=self._prefix))
+                             types=types))
 
 
     def visit_end(self):
     def visit_end(self):
         (genc, genh) = self._module[self._main_module]
         (genc, genh) = self._module[self._main_module]

+ 6 - 4
scripts/qapi/events.py

@@ -165,24 +165,26 @@ def _module_basename(self, what, name):
         return basename
         return basename
 
 
     def _begin_module(self, name):
     def _begin_module(self, name):
+        types = self._module_basename('qapi-types', name)
+        visit = self._module_basename('qapi-visit', name)
         self._genc.add(mcgen('''
         self._genc.add(mcgen('''
 #include "qemu/osdep.h"
 #include "qemu/osdep.h"
 #include "qemu-common.h"
 #include "qemu-common.h"
 #include "%(prefix)sqapi-event.h"
 #include "%(prefix)sqapi-event.h"
-#include "%(prefix)sqapi-visit.h"
+#include "%(visit)s.h"
 #include "qapi/error.h"
 #include "qapi/error.h"
 #include "qapi/qmp/qdict.h"
 #include "qapi/qmp/qdict.h"
 #include "qapi/qobject-output-visitor.h"
 #include "qapi/qobject-output-visitor.h"
 #include "qapi/qmp-event.h"
 #include "qapi/qmp-event.h"
 
 
 ''',
 ''',
-                             prefix=self._prefix))
+                             visit=visit, prefix=self._prefix))
         self._genh.add(mcgen('''
         self._genh.add(mcgen('''
 #include "qapi/util.h"
 #include "qapi/util.h"
-#include "%(prefix)sqapi-types.h"
+#include "%(types)s.h"
 
 
 ''',
 ''',
-                             prefix=self._prefix))
+                             types=types))
 
 
     def visit_end(self):
     def visit_end(self):
         self._genh.add(gen_enum(self._enum_name, self._event_names))
         self._genh.add(gen_enum(self._enum_name, self._event_names))

+ 5 - 3
scripts/qapi/types.py

@@ -185,13 +185,15 @@ def __init__(self, prefix):
 '''))
 '''))
 
 
     def _begin_module(self, name):
     def _begin_module(self, name):
+        types = self._module_basename('qapi-types', name)
+        visit = self._module_basename('qapi-visit', name)
         self._genc.preamble_add(mcgen('''
         self._genc.preamble_add(mcgen('''
 #include "qemu/osdep.h"
 #include "qemu/osdep.h"
 #include "qapi/dealloc-visitor.h"
 #include "qapi/dealloc-visitor.h"
-#include "%(prefix)sqapi-types.h"
-#include "%(prefix)sqapi-visit.h"
+#include "%(types)s.h"
+#include "%(visit)s.h"
 ''',
 ''',
-                                      prefix=self._prefix))
+                                      types=types, visit=visit))
         self._genh.preamble_add(mcgen('''
         self._genh.preamble_add(mcgen('''
 #include "qapi-builtin-types.h"
 #include "qapi-builtin-types.h"
 '''))
 '''))

+ 6 - 4
scripts/qapi/visit.py

@@ -284,20 +284,22 @@ def __init__(self, prefix):
                                       prefix=prefix))
                                       prefix=prefix))
 
 
     def _begin_module(self, name):
     def _begin_module(self, name):
+        types = self._module_basename('qapi-types', name)
+        visit = self._module_basename('qapi-visit', name)
         self._genc.preamble_add(mcgen('''
         self._genc.preamble_add(mcgen('''
 #include "qemu/osdep.h"
 #include "qemu/osdep.h"
 #include "qemu-common.h"
 #include "qemu-common.h"
 #include "qapi/error.h"
 #include "qapi/error.h"
 #include "qapi/qmp/qerror.h"
 #include "qapi/qmp/qerror.h"
-#include "%(prefix)sqapi-visit.h"
+#include "%(visit)s.h"
 ''',
 ''',
-                                      prefix=self._prefix))
+                                      visit=visit, prefix=self._prefix))
         self._genh.preamble_add(mcgen('''
         self._genh.preamble_add(mcgen('''
 #include "qapi-builtin-visit.h"
 #include "qapi-builtin-visit.h"
-#include "%(prefix)sqapi-types.h"
+#include "%(types)s.h"
 
 
 ''',
 ''',
-                                      prefix=self._prefix))
+                                      types=types))
 
 
     def visit_enum_type(self, name, info, values, prefix):
     def visit_enum_type(self, name, info, values, prefix):
         self._genh.add(gen_visit_decl(name, scalar=True))
         self._genh.add(gen_visit_decl(name, scalar=True))

Some files were not shown because too many files changed in this diff