Browse Source

sysemu: Split sysemu/runstate.h off sysemu/sysemu.h

sysemu/sysemu.h is a rather unfocused dumping ground for stuff related
to the system-emulator.  Evidence:

* It's included widely: in my "build everything" tree, changing
  sysemu/sysemu.h still triggers a recompile of some 1100 out of 6600
  objects (not counting tests and objects that don't depend on
  qemu/osdep.h, down from 5400 due to the previous two commits).

* It pulls in more than a dozen additional headers.

Split stuff related to run state management into its own header
sysemu/runstate.h.

Touching sysemu/sysemu.h now recompiles some 850 objects.  qemu/uuid.h
also drops from 1100 to 850, and qapi/qapi-types-run-state.h from 4400
to 4200.  Touching new sysemu/runstate.h recompiles some 500 objects.

Since I'm touching MAINTAINERS to add sysemu/runstate.h anyway, also
add qemu/main-loop.h.

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20190812052359.30071-30-armbru@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
[Unbreak OS-X build]
pull/106/head
Markus Armbruster 7 years ago
parent
commit
54d31236b9
  1. 2
      MAINTAINERS
  2. 1
      accel/kvm/kvm-all.c
  3. 2
      audio/audio.c
  4. 2
      block/block-backend.c
  5. 1
      blockdev.c
  6. 2
      cpus.c
  7. 2
      dump/dump.c
  8. 1
      gdbstub.c
  9. 2
      hw/acpi/core.c
  10. 2
      hw/acpi/ich9.c
  11. 1
      hw/acpi/piix4.c
  12. 1
      hw/arm/highbank.c
  13. 1
      hw/arm/integratorcp.c
  14. 1
      hw/arm/msf2-soc.c
  15. 1
      hw/arm/musicpal.c
  16. 1
      hw/arm/nseries.c
  17. 1
      hw/arm/omap1.c
  18. 1
      hw/arm/omap2.c
  19. 1
      hw/arm/sbsa-ref.c
  20. 1
      hw/arm/spitz.c
  21. 1
      hw/arm/stellaris.c
  22. 2
      hw/arm/tosa.c
  23. 1
      hw/arm/virt.c
  24. 2
      hw/block/pflash_cfi01.c
  25. 1
      hw/block/vhost-user-blk.c
  26. 1
      hw/block/virtio-blk.c
  27. 2
      hw/char/serial.c
  28. 1
      hw/core/machine-qmp-cmds.c
  29. 2
      hw/core/vm-change-state-handler.c
  30. 2
      hw/display/qxl-render.c
  31. 2
      hw/display/qxl.c
  32. 2
      hw/dma/etraxfs_dma.c
  33. 2
      hw/i386/kvm/clock.c
  34. 2
      hw/i386/kvm/i8254.c
  35. 1
      hw/i386/kvmvapic.c
  36. 1
      hw/i386/pc.c
  37. 1
      hw/i386/xen/xen-hvm.c
  38. 2
      hw/i386/xen/xen-mapcache.c
  39. 2
      hw/ide/core.c
  40. 1
      hw/ide/qdev.c
  41. 2
      hw/input/pckbd.c
  42. 2
      hw/input/ps2.c
  43. 2
      hw/intc/arm_gicv3_its_kvm.c
  44. 2
      hw/intc/arm_gicv3_kvm.c
  45. 1
      hw/intc/spapr_xive_kvm.c
  46. 2
      hw/ipmi/ipmi.c
  47. 1
      hw/isa/lpc_ich9.c
  48. 1
      hw/mips/boston.c
  49. 1
      hw/mips/mips_malta.c
  50. 1
      hw/mips/mips_r4k.c
  51. 2
      hw/misc/arm_sysctl.c
  52. 2
      hw/misc/cbus.c
  53. 2
      hw/misc/exynos4210_pmu.c
  54. 2
      hw/misc/imx7_snvs.c
  55. 2
      hw/misc/iotkit-sysctl.c
  56. 2
      hw/misc/macio/cuda.c
  57. 2
      hw/misc/macio/pmu.c
  58. 2
      hw/misc/pvpanic.c
  59. 2
      hw/misc/slavio_misc.c
  60. 2
      hw/misc/zynq_slcr.c
  61. 2
      hw/net/e1000e_core.c
  62. 2
      hw/nvram/spapr_nvram.c
  63. 2
      hw/pci-host/bonito.c
  64. 2
      hw/pci-host/piix.c
  65. 2
      hw/pci-host/sabre.c
  66. 1
      hw/ppc/e500.c
  67. 2
      hw/ppc/mpc8544_guts.c
  68. 1
      hw/ppc/pnv.c
  69. 2
      hw/ppc/ppc.c
  70. 2
      hw/ppc/ppc_booke.c
  71. 2
      hw/ppc/prep_systemio.c
  72. 1
      hw/ppc/spapr.c
  73. 2
      hw/ppc/spapr_events.c
  74. 2
      hw/ppc/spapr_hcall.c
  75. 2
      hw/ppc/spapr_rtas.c
  76. 2
      hw/rdma/vmw/pvrdma_main.c
  77. 1
      hw/s390x/ipl.c
  78. 2
      hw/s390x/sclpquiesce.c
  79. 2
      hw/s390x/tod-kvm.c
  80. 1
      hw/scsi/scsi-bus.c
  81. 1
      hw/sh4/r2d.c
  82. 1
      hw/sparc/sun4m.c
  83. 1
      hw/sparc64/sun4u.c
  84. 2
      hw/timer/etraxfs_timer.c
  85. 1
      hw/timer/m48t59.c
  86. 1
      hw/timer/mc146818rtc.c
  87. 2
      hw/timer/milkymist-sysctl.c
  88. 2
      hw/timer/pxa2xx_timer.c
  89. 2
      hw/usb/hcd-ehci.c
  90. 1
      hw/usb/host-libusb.c
  91. 1
      hw/usb/redirect.c
  92. 1
      hw/vfio/pci.c
  93. 3
      hw/virtio/virtio-rng.c
  94. 2
      hw/virtio/virtio.c
  95. 2
      hw/watchdog/watchdog.c
  96. 2
      hw/xen/xen-common.c
  97. 1
      hw/xtensa/xtfpga.c
  98. 2
      include/hw/ppc/spapr_drc.h
  99. 68
      include/sysemu/runstate.h
  100. 61
      include/sysemu/sysemu.h

2
MAINTAINERS

@ -1924,6 +1924,8 @@ Main loop
M: Paolo Bonzini <pbonzini@redhat.com>
S: Maintained
F: cpus.c
F: include/qemu/main-loop.h
F: include/sysemu/runstate.h
F: util/main-loop.c
F: util/qemu-timer.c
F: vl.c

1
accel/kvm/kvm-all.c

@ -28,6 +28,7 @@
#include "hw/s390x/adapter.h"
#include "exec/gdbstub.h"
#include "sysemu/kvm_int.h"
#include "sysemu/runstate.h"
#include "sysemu/cpus.h"
#include "sysemu/sysemu.h"
#include "qemu/bswap.h"

2
audio/audio.c

@ -30,10 +30,10 @@
#include "qapi/error.h"
#include "qapi/qobject-input-visitor.h"
#include "qapi/qapi-visit-audio.h"
#include "sysemu/sysemu.h"
#include "qemu/cutils.h"
#include "qemu/module.h"
#include "sysemu/replay.h"
#include "sysemu/runstate.h"
#include "trace.h"
#define AUDIO_CAP "audio"

2
block/block-backend.c

@ -17,7 +17,7 @@
#include "block/throttle-groups.h"
#include "hw/qdev-core.h"
#include "sysemu/blockdev.h"
#include "sysemu/sysemu.h"
#include "sysemu/runstate.h"
#include "qapi/error.h"
#include "qapi/qapi-events-block.h"
#include "qemu/id.h"

1
blockdev.c

@ -58,6 +58,7 @@
#include "block/trace.h"
#include "sysemu/arch_init.h"
#include "sysemu/qtest.h"
#include "sysemu/runstate.h"
#include "qemu/cutils.h"
#include "qemu/help_option.h"
#include "qemu/main-loop.h"

2
cpus.c

@ -41,7 +41,6 @@
#include "sysemu/kvm.h"
#include "sysemu/hax.h"
#include "sysemu/hvf.h"
#include "sysemu/sysemu.h"
#include "sysemu/whpx.h"
#include "exec/exec-all.h"
@ -56,6 +55,7 @@
#include "tcg.h"
#include "hw/nmi.h"
#include "sysemu/replay.h"
#include "sysemu/runstate.h"
#include "hw/boards.h"
#include "hw/hw.h"

2
dump/dump.c

@ -20,8 +20,8 @@
#include "monitor/monitor.h"
#include "sysemu/kvm.h"
#include "sysemu/dump.h"
#include "sysemu/sysemu.h"
#include "sysemu/memory_mapping.h"
#include "sysemu/runstate.h"
#include "sysemu/cpus.h"
#include "qapi/error.h"
#include "qapi/qapi-commands-dump.h"

1
gdbstub.c

@ -48,6 +48,7 @@
#include "qemu/sockets.h"
#include "sysemu/hw_accel.h"
#include "sysemu/kvm.h"
#include "sysemu/runstate.h"
#include "hw/semihosting/semihost.h"
#include "exec/exec-all.h"

2
hw/acpi/core.c

@ -20,7 +20,6 @@
*/
#include "qemu/osdep.h"
#include "sysemu/sysemu.h"
#include "hw/irq.h"
#include "hw/acpi/acpi.h"
#include "hw/nvram/fw_cfg.h"
@ -32,6 +31,7 @@
#include "qemu/error-report.h"
#include "qemu/module.h"
#include "qemu/option.h"
#include "sysemu/runstate.h"
struct acpi_table_header {
uint16_t _length; /* our length, not actual part of the hdr */

2
hw/acpi/ich9.c

@ -33,7 +33,7 @@
#include "qemu/timer.h"
#include "qom/cpu.h"
#include "sysemu/reset.h"
#include "sysemu/sysemu.h"
#include "sysemu/runstate.h"
#include "hw/acpi/acpi.h"
#include "hw/acpi/tco.h"
#include "exec/address-spaces.h"

1
hw/acpi/piix4.c

@ -28,6 +28,7 @@
#include "hw/qdev-properties.h"
#include "hw/acpi/acpi.h"
#include "sysemu/reset.h"
#include "sysemu/runstate.h"
#include "sysemu/sysemu.h"
#include "qapi/error.h"
#include "qemu/range.h"

1
hw/arm/highbank.c

@ -26,6 +26,7 @@
#include "hw/loader.h"
#include "net/net.h"
#include "sysemu/kvm.h"
#include "sysemu/runstate.h"
#include "sysemu/sysemu.h"
#include "hw/boards.h"
#include "exec/address-spaces.h"

1
hw/arm/integratorcp.c

@ -18,6 +18,7 @@
#include "hw/net/smc91c111.h"
#include "net/net.h"
#include "exec/address-spaces.h"
#include "sysemu/runstate.h"
#include "sysemu/sysemu.h"
#include "qemu/error-report.h"
#include "hw/char/pl011.h"

1
hw/arm/msf2-soc.c

@ -30,6 +30,7 @@
#include "hw/irq.h"
#include "hw/arm/msf2-soc.h"
#include "hw/misc/unimp.h"
#include "sysemu/runstate.h"
#include "sysemu/sysemu.h"
#define MSF2_TIMER_BASE 0x40004000

1
hw/arm/musicpal.c

@ -29,6 +29,7 @@
#include "hw/irq.h"
#include "hw/audio/wm8750.h"
#include "sysemu/block-backend.h"
#include "sysemu/runstate.h"
#include "exec/address-spaces.h"
#include "ui/pixel_ops.h"

1
hw/arm/nseries.c

@ -24,6 +24,7 @@
#include "qemu/cutils.h"
#include "qemu/bswap.h"
#include "sysemu/reset.h"
#include "sysemu/runstate.h"
#include "sysemu/sysemu.h"
#include "hw/arm/omap.h"
#include "hw/arm/boot.h"

1
hw/arm/omap1.c

@ -34,6 +34,7 @@
#include "hw/arm/soc_dma.h"
#include "sysemu/qtest.h"
#include "sysemu/reset.h"
#include "sysemu/runstate.h"
#include "qemu/range.h"
#include "hw/sysbus.h"
#include "qemu/cutils.h"

1
hw/arm/omap2.c

@ -25,6 +25,7 @@
#include "sysemu/blockdev.h"
#include "sysemu/qtest.h"
#include "sysemu/reset.h"
#include "sysemu/runstate.h"
#include "hw/boards.h"
#include "hw/irq.h"
#include "hw/qdev-properties.h"

1
hw/arm/sbsa-ref.c

@ -24,6 +24,7 @@
#include "qemu/units.h"
#include "sysemu/device_tree.h"
#include "sysemu/numa.h"
#include "sysemu/runstate.h"
#include "sysemu/sysemu.h"
#include "exec/address-spaces.h"
#include "exec/hwaddr.h"

1
hw/arm/spitz.c

@ -14,6 +14,7 @@
#include "qapi/error.h"
#include "hw/arm/pxa.h"
#include "hw/arm/boot.h"
#include "sysemu/runstate.h"
#include "sysemu/sysemu.h"
#include "hw/pcmcia.h"
#include "hw/qdev-properties.h"

1
hw/arm/stellaris.c

@ -18,6 +18,7 @@
#include "hw/boards.h"
#include "qemu/log.h"
#include "exec/address-spaces.h"
#include "sysemu/runstate.h"
#include "sysemu/sysemu.h"
#include "hw/arm/armv7m.h"
#include "hw/char/pl011.h"

2
hw/arm/tosa.c

@ -13,6 +13,7 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "sysemu/runstate.h"
#include "hw/arm/pxa.h"
#include "hw/arm/boot.h"
#include "hw/arm/sharpsl.h"
@ -24,7 +25,6 @@
#include "hw/ssi/ssi.h"
#include "hw/sysbus.h"
#include "exec/address-spaces.h"
#include "sysemu/sysemu.h"
#define TOSA_RAM 0x04000000
#define TOSA_ROM 0x00800000

1
hw/arm/virt.c

@ -45,6 +45,7 @@
#include "net/net.h"
#include "sysemu/device_tree.h"
#include "sysemu/numa.h"
#include "sysemu/runstate.h"
#include "sysemu/sysemu.h"
#include "sysemu/kvm.h"
#include "hw/loader.h"

2
hw/block/pflash_cfi01.c

@ -52,7 +52,7 @@
#include "hw/sysbus.h"
#include "migration/vmstate.h"
#include "sysemu/blockdev.h"
#include "sysemu/sysemu.h"
#include "sysemu/runstate.h"
#include "trace.h"
/* #define PFLASH_DEBUG */

1
hw/block/vhost-user-blk.c

@ -29,6 +29,7 @@
#include "hw/virtio/virtio-bus.h"
#include "hw/virtio/virtio-access.h"
#include "sysemu/sysemu.h"
#include "sysemu/runstate.h"
static const int user_feature_bits[] = {
VIRTIO_BLK_F_SIZE_MAX,

1
hw/block/virtio-blk.c

@ -21,6 +21,7 @@
#include "hw/qdev-properties.h"
#include "sysemu/blockdev.h"
#include "sysemu/sysemu.h"
#include "sysemu/runstate.h"
#include "hw/virtio/virtio-blk.h"
#include "dataplane/virtio-blk.h"
#include "scsi/constants.h"

2
hw/char/serial.c

@ -31,7 +31,7 @@
#include "qapi/error.h"
#include "qemu/timer.h"
#include "sysemu/reset.h"
#include "sysemu/sysemu.h"
#include "sysemu/runstate.h"
#include "qemu/error-report.h"
#include "trace.h"

1
hw/core/machine-qmp-cmds.c

@ -17,6 +17,7 @@
#include "sysemu/hostmem.h"
#include "sysemu/hw_accel.h"
#include "sysemu/numa.h"
#include "sysemu/runstate.h"
#include "sysemu/sysemu.h"
CpuInfoList *qmp_query_cpus(Error **errp)

2
hw/core/vm-change-state-handler.c

@ -17,7 +17,7 @@
#include "qemu/osdep.h"
#include "hw/qdev-core.h"
#include "sysemu/sysemu.h"
#include "sysemu/runstate.h"
static int qdev_get_dev_tree_depth(DeviceState *dev)
{

2
hw/display/qxl-render.c

@ -21,7 +21,7 @@
#include "qemu/osdep.h"
#include "qxl.h"
#include "sysemu/sysemu.h"
#include "sysemu/runstate.h"
#include "trace.h"
static void qxl_blit(PCIQXLDevice *qxl, QXLRect *rect)

2
hw/display/qxl.c

@ -28,8 +28,8 @@
#include "qemu/atomic.h"
#include "qemu/main-loop.h"
#include "qemu/module.h"
#include "sysemu/sysemu.h"
#include "hw/qdev-properties.h"
#include "sysemu/runstate.h"
#include "migration/blocker.h"
#include "migration/vmstate.h"
#include "trace.h"

2
hw/dma/etraxfs_dma.c

@ -26,8 +26,8 @@
#include "hw/hw.h"
#include "hw/irq.h"
#include "qemu/main-loop.h"
#include "sysemu/runstate.h"
#include "exec/address-spaces.h"
#include "sysemu/sysemu.h"
#include "hw/cris/etraxfs_dma.h"

2
hw/i386/kvm/clock.c

@ -17,8 +17,8 @@
#include "cpu.h"
#include "qemu/host-utils.h"
#include "qemu/module.h"
#include "sysemu/sysemu.h"
#include "sysemu/kvm.h"
#include "sysemu/runstate.h"
#include "sysemu/hw_accel.h"
#include "kvm_i386.h"
#include "migration/vmstate.h"

2
hw/i386/kvm/i8254.c

@ -29,7 +29,7 @@
#include "qapi/error.h"
#include "qemu/module.h"
#include "qemu/timer.h"
#include "sysemu/sysemu.h"
#include "sysemu/runstate.h"
#include "hw/timer/i8254.h"
#include "hw/timer/i8254_internal.h"
#include "sysemu/kvm.h"

1
hw/i386/kvmvapic.c

@ -16,6 +16,7 @@
#include "sysemu/cpus.h"
#include "sysemu/hw_accel.h"
#include "sysemu/kvm.h"
#include "sysemu/runstate.h"
#include "hw/i386/apic_internal.h"
#include "hw/sysbus.h"
#include "hw/boards.h"

1
hw/i386/pc.c

@ -56,6 +56,7 @@
#include "sysemu/kvm.h"
#include "sysemu/qtest.h"
#include "sysemu/reset.h"
#include "sysemu/runstate.h"
#include "kvm_i386.h"
#include "hw/xen/xen.h"
#include "hw/xen/start_info.h"

1
hw/i386/xen/xen-hvm.c

@ -25,6 +25,7 @@
#include "qemu/error-report.h"
#include "qemu/main-loop.h"
#include "qemu/range.h"
#include "sysemu/runstate.h"
#include "sysemu/sysemu.h"
#include "sysemu/xen-mapcache.h"
#include "trace.h"

2
hw/i386/xen/xen-mapcache.c

@ -17,7 +17,7 @@
#include "hw/xen/xen-legacy-backend.h"
#include "qemu/bitmap.h"
#include "sysemu/sysemu.h"
#include "sysemu/runstate.h"
#include "sysemu/xen-mapcache.h"
#include "trace.h"

2
hw/ide/core.c

@ -37,7 +37,7 @@
#include "qapi/error.h"
#include "qemu/cutils.h"
#include "sysemu/replay.h"
#include "sysemu/runstate.h"
#include "hw/ide/internal.h"
#include "trace.h"

1
hw/ide/qdev.c

@ -30,6 +30,7 @@
#include "sysemu/blockdev.h"
#include "hw/block/block.h"
#include "sysemu/sysemu.h"
#include "sysemu/runstate.h"
#include "qapi/visitor.h"
/* --------------------------------- */

2
hw/input/pckbd.c

@ -31,7 +31,7 @@
#include "hw/irq.h"
#include "hw/input/i8042.h"
#include "sysemu/reset.h"
#include "sysemu/sysemu.h"
#include "sysemu/runstate.h"
#include "trace.h"

2
hw/input/ps2.c

@ -29,7 +29,7 @@
#include "ui/console.h"
#include "ui/input.h"
#include "sysemu/reset.h"
#include "sysemu/sysemu.h"
#include "sysemu/runstate.h"
#include "trace.h"

2
hw/intc/arm_gicv3_its_kvm.c

@ -23,7 +23,7 @@
#include "qemu/module.h"
#include "hw/intc/arm_gicv3_its_common.h"
#include "hw/qdev-properties.h"
#include "sysemu/sysemu.h"
#include "sysemu/runstate.h"
#include "sysemu/kvm.h"
#include "kvm_arm.h"
#include "migration/blocker.h"

2
hw/intc/arm_gicv3_kvm.c

@ -26,7 +26,7 @@
#include "qemu/error-report.h"
#include "qemu/module.h"
#include "sysemu/kvm.h"
#include "sysemu/sysemu.h"
#include "sysemu/runstate.h"
#include "kvm_arm.h"
#include "gicv3_internal.h"
#include "vgic_common.h"

1
hw/intc/spapr_xive_kvm.c

@ -14,6 +14,7 @@
#include "target/ppc/cpu.h"
#include "sysemu/cpus.h"
#include "sysemu/kvm.h"
#include "sysemu/runstate.h"
#include "hw/ppc/spapr.h"
#include "hw/ppc/spapr_cpu_core.h"
#include "hw/ppc/spapr_xive.h"

2
hw/ipmi/ipmi.c

@ -25,8 +25,8 @@
#include "qemu/osdep.h"
#include "hw/ipmi/ipmi.h"
#include "hw/qdev-properties.h"
#include "sysemu/sysemu.h"
#include "qom/object_interfaces.h"
#include "sysemu/runstate.h"
#include "qapi/error.h"
#include "qapi/qapi-commands-misc.h"
#include "qapi/visitor.h"

1
hw/isa/lpc_ich9.c

@ -47,6 +47,7 @@
#include "hw/pci/pci_bus.h"
#include "hw/qdev-properties.h"
#include "exec/address-spaces.h"
#include "sysemu/runstate.h"
#include "sysemu/sysemu.h"
#include "qom/cpu.h"
#include "hw/nvram/fw_cfg.h"

1
hw/mips/boston.c

@ -38,6 +38,7 @@
#include "sysemu/device_tree.h"
#include "sysemu/sysemu.h"
#include "sysemu/qtest.h"
#include "sysemu/runstate.h"
#include <libfdt.h>

1
hw/mips/mips_malta.c

@ -52,6 +52,7 @@
#include "qemu/host-utils.h"
#include "sysemu/qtest.h"
#include "sysemu/reset.h"
#include "sysemu/runstate.h"
#include "qapi/error.h"
#include "qemu/error-report.h"
#include "hw/empty_slot.h"

1
hw/mips/mips_r4k.c

@ -34,6 +34,7 @@
#include "exec/address-spaces.h"
#include "sysemu/qtest.h"
#include "sysemu/reset.h"
#include "sysemu/runstate.h"
#include "qemu/error-report.h"
#define MAX_IDE_BUS 2

2
hw/misc/arm_sysctl.c

@ -11,11 +11,11 @@
#include "hw/irq.h"
#include "hw/qdev-properties.h"
#include "qemu/timer.h"
#include "sysemu/runstate.h"
#include "qemu/bitops.h"
#include "hw/sysbus.h"
#include "migration/vmstate.h"
#include "hw/arm/primecell.h"
#include "sysemu/sysemu.h"
#include "qemu/log.h"
#include "qemu/module.h"

2
hw/misc/cbus.c

@ -24,7 +24,7 @@
#include "hw/hw.h"
#include "hw/irq.h"
#include "hw/misc/cbus.h"
#include "sysemu/sysemu.h"
#include "sysemu/runstate.h"
//#define DEBUG

2
hw/misc/exynos4210_pmu.c

@ -28,7 +28,7 @@
#include "hw/sysbus.h"
#include "migration/vmstate.h"
#include "qemu/module.h"
#include "sysemu/sysemu.h"
#include "sysemu/runstate.h"
#ifndef DEBUG_PMU
#define DEBUG_PMU 0

2
hw/misc/imx7_snvs.c

@ -16,7 +16,7 @@
#include "hw/misc/imx7_snvs.h"
#include "qemu/log.h"
#include "qemu/module.h"
#include "sysemu/sysemu.h"
#include "sysemu/runstate.h"
static uint64_t imx7_snvs_read(void *opaque, hwaddr offset, unsigned size)
{

2
hw/misc/iotkit-sysctl.c

@ -20,9 +20,9 @@
#include "qemu/bitops.h"
#include "qemu/log.h"
#include "qemu/module.h"
#include "sysemu/runstate.h"
#include "trace.h"
#include "qapi/error.h"
#include "sysemu/sysemu.h"
#include "hw/sysbus.h"
#include "migration/vmstate.h"
#include "hw/registerfields.h"

2
hw/misc/macio/cuda.c

@ -32,7 +32,7 @@
#include "hw/misc/mos6522.h"
#include "hw/misc/macio/cuda.h"
#include "qemu/timer.h"
#include "sysemu/sysemu.h"
#include "sysemu/runstate.h"
#include "qemu/cutils.h"
#include "qemu/log.h"
#include "qemu/module.h"

2
hw/misc/macio/pmu.c

@ -39,7 +39,7 @@
#include "hw/misc/macio/gpio.h"
#include "hw/misc/macio/pmu.h"
#include "qemu/timer.h"
#include "sysemu/sysemu.h"
#include "sysemu/runstate.h"
#include "qemu/cutils.h"
#include "qemu/log.h"
#include "qemu/module.h"

2
hw/misc/pvpanic.c

@ -13,9 +13,9 @@
*/
#include "qemu/osdep.h"
#include "sysemu/sysemu.h"
#include "qemu/log.h"
#include "qemu/module.h"
#include "sysemu/runstate.h"
#include "hw/nvram/fw_cfg.h"
#include "hw/qdev-properties.h"

2
hw/misc/slavio_misc.c

@ -23,11 +23,11 @@
*/
#include "qemu/osdep.h"
#include "sysemu/sysemu.h"
#include "hw/irq.h"
#include "hw/sysbus.h"
#include "migration/vmstate.h"
#include "qemu/module.h"
#include "sysemu/runstate.h"
#include "trace.h"
/*

2
hw/misc/zynq_slcr.c

@ -16,9 +16,9 @@
#include "qemu/osdep.h"
#include "qemu/timer.h"
#include "sysemu/runstate.h"
#include "hw/sysbus.h"
#include "migration/vmstate.h"
#include "sysemu/sysemu.h"
#include "qemu/log.h"
#include "qemu/module.h"

2
hw/net/e1000e_core.c

@ -34,12 +34,12 @@
*/
#include "qemu/osdep.h"
#include "sysemu/sysemu.h"
#include "net/net.h"
#include "net/tap.h"
#include "hw/hw.h"
#include "hw/pci/msi.h"
#include "hw/pci/msix.h"
#include "sysemu/runstate.h"
#include "net_tx_pkt.h"
#include "net_rx_pkt.h"

2
hw/nvram/spapr_nvram.c

@ -31,6 +31,8 @@
#include "sysemu/block-backend.h"
#include "sysemu/device_tree.h"
#include "sysemu/sysemu.h"
#include "sysemu/runstate.h"
#include "hw/sysbus.h"
#include "migration/vmstate.h"
#include "hw/nvram/chrp_nvram.h"

2
hw/pci-host/bonito.c

@ -46,7 +46,7 @@
#include "hw/pci/pci_host.h"
#include "migration/vmstate.h"
#include "sysemu/reset.h"
#include "sysemu/sysemu.h"
#include "sysemu/runstate.h"
#include "exec/address-spaces.h"
//#define DEBUG_BONITO

2
hw/pci-host/piix.c

@ -37,7 +37,7 @@
#include "migration/vmstate.h"
#include "hw/pci-host/pam.h"
#include "sysemu/reset.h"
#include "sysemu/sysemu.h"
#include "sysemu/runstate.h"
#include "hw/i386/ioapic.h"
#include "qapi/visitor.h"
#include "qemu/error-report.h"

2
hw/pci-host/sabre.c

@ -34,10 +34,10 @@
#include "hw/irq.h"
#include "hw/pci-bridge/simba.h"
#include "hw/pci-host/sabre.h"
#include "sysemu/sysemu.h"
#include "exec/address-spaces.h"
#include "qemu/log.h"
#include "qemu/module.h"
#include "sysemu/runstate.h"
#include "trace.h"
/*

1
hw/ppc/e500.c

@ -28,6 +28,7 @@
#include "sysemu/sysemu.h"
#include "sysemu/kvm.h"
#include "sysemu/reset.h"
#include "sysemu/runstate.h"
#include "kvm_ppc.h"
#include "sysemu/device_tree.h"
#include "hw/ppc/openpic.h"

2
hw/ppc/mpc8544_guts.c

@ -19,8 +19,8 @@
#include "qemu/osdep.h"
#include "qemu/module.h"
#include "sysemu/runstate.h"
#include "cpu.h"
#include "sysemu/sysemu.h"
#include "hw/sysbus.h"
#define MPC8544_GUTS_MMIO_SIZE 0x1000

1
hw/ppc/pnv.c

@ -24,6 +24,7 @@
#include "sysemu/sysemu.h"
#include "sysemu/numa.h"
#include "sysemu/reset.h"
#include "sysemu/runstate.h"
#include "sysemu/cpus.h"
#include "sysemu/device_tree.h"
#include "target/ppc/cpu.h"

2
hw/ppc/ppc.c

@ -28,12 +28,12 @@
#include "hw/ppc/ppc.h"
#include "hw/ppc/ppc_e500.h"
#include "qemu/timer.h"
#include "sysemu/sysemu.h"
#include "sysemu/cpus.h"
#include "qemu/log.h"
#include "qemu/main-loop.h"
#include "qemu/error-report.h"
#include "sysemu/kvm.h"
#include "sysemu/runstate.h"
#include "kvm_ppc.h"
#include "migration/vmstate.h"
#include "trace.h"

2
hw/ppc/ppc_booke.c

@ -27,7 +27,7 @@
#include "hw/ppc/ppc.h"
#include "qemu/timer.h"
#include "sysemu/reset.h"
#include "sysemu/sysemu.h"
#include "sysemu/runstate.h"
#include "qemu/log.h"
#include "hw/loader.h"
#include "kvm_ppc.h"

2
hw/ppc/prep_systemio.c

@ -30,7 +30,7 @@
#include "exec/address-spaces.h"
#include "qemu/error-report.h" /* for error_report() */
#include "qemu/module.h"
#include "sysemu/sysemu.h" /* for vm_stop() */
#include "sysemu/runstate.h"
#include "cpu.h"
#include "trace.h"

1
hw/ppc/spapr.c

@ -33,6 +33,7 @@
#include "sysemu/numa.h"
#include "sysemu/qtest.h"
#include "sysemu/reset.h"
#include "sysemu/runstate.h"
#include "qemu/log.h"
#include "hw/fw-path-provider.h"
#include "elf.h"

2
hw/ppc/spapr_events.c

@ -28,8 +28,8 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "cpu.h"
#include "sysemu/sysemu.h"
#include "sysemu/device_tree.h"
#include "sysemu/runstate.h"
#include "hw/ppc/fdt.h"
#include "hw/ppc/spapr.h"

2
hw/ppc/spapr_hcall.c

@ -1,7 +1,7 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "sysemu/hw_accel.h"
#include "sysemu/sysemu.h"
#include "sysemu/runstate.h"
#include "qemu/log.h"
#include "qemu/main-loop.h"
#include "qemu/module.h"

2
hw/ppc/spapr_rtas.c

@ -24,6 +24,7 @@
* THE SOFTWARE.
*
*/
#include "qemu/osdep.h"
#include "cpu.h"
#include "qemu/log.h"
@ -32,6 +33,7 @@
#include "sysemu/device_tree.h"
#include "sysemu/cpus.h"
#include "sysemu/hw_accel.h"
#include "sysemu/runstate.h"
#include "kvm_ppc.h"
#include "hw/ppc/spapr.h"

2
hw/rdma/vmw/pvrdma_main.c

@ -23,7 +23,6 @@
#include "hw/qdev-properties.h"
#include "cpu.h"
#include "trace.h"
#include "sysemu/sysemu.h"
#include "monitor/monitor.h"
#include "hw/rdma/rdma.h"
@ -34,6 +33,7 @@
#include <infiniband/verbs.h>
#include "pvrdma.h"
#include "standard-headers/rdma/vmw_pvrdma-abi.h"
#include "sysemu/runstate.h"
#include "standard-headers/drivers/infiniband/hw/vmw_pvrdma/pvrdma_dev_api.h"
#include "pvrdma_qp_ops.h"

1
hw/s390x/ipl.c

@ -15,6 +15,7 @@
#include "qemu-common.h"
#include "qapi/error.h"
#include "sysemu/reset.h"
#include "sysemu/runstate.h"
#include "sysemu/sysemu.h"
#include "sysemu/tcg.h"
#include "cpu.h"

2
hw/s390x/sclpquiesce.c

@ -13,10 +13,10 @@
*/
#include "qemu/osdep.h"
#include "sysemu/sysemu.h"
#include "hw/s390x/sclp.h"
#include "migration/vmstate.h"
#include "qemu/module.h"
#include "sysemu/runstate.h"
#include "hw/s390x/event-facility.h"
typedef struct SignalQuiesce {

2
hw/s390x/tod-kvm.c

@ -11,7 +11,7 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qemu/module.h"
#include "sysemu/sysemu.h"
#include "sysemu/runstate.h"
#include "hw/s390x/tod.h"
#include "kvm_s390x.h"

1
hw/scsi/scsi-bus.c

@ -11,6 +11,7 @@
#include "sysemu/block-backend.h"
#include "sysemu/blockdev.h"
#include "sysemu/sysemu.h"
#include "sysemu/runstate.h"
#include "trace.h"
#include "sysemu/dma.h"
#include "qemu/cutils.h"

1
hw/sh4/r2d.c

@ -30,6 +30,7 @@
#include "hw/sysbus.h"
#include "hw/sh4/sh.h"
#include "sysemu/reset.h"
#include "sysemu/runstate.h"
#include "sysemu/sysemu.h"
#include "hw/boards.h"
#include "hw/pci/pci.h"

1
hw/sparc/sun4m.c

@ -36,6 +36,7 @@
#include "hw/sparc/sparc32_dma.h"
#include "hw/block/fdc.h"
#include "sysemu/reset.h"
#include "sysemu/runstate.h"
#include "sysemu/sysemu.h"
#include "net/net.h"
#include "hw/boards.h"

1
hw/sparc64/sun4u.c

@ -42,6 +42,7 @@
#include "hw/block/fdc.h"
#include "net/net.h"
#include "qemu/timer.h"
#include "sysemu/runstate.h"
#include "sysemu/sysemu.h"
#include "hw/boards.h"
#include "hw/nvram/sun_nvram.h"

2
hw/timer/etraxfs_timer.c

@ -25,7 +25,7 @@
#include "qemu/osdep.h"
#include "hw/sysbus.h"
#include "sysemu/reset.h"
#include "sysemu/sysemu.h"
#include "sysemu/runstate.h"
#include "qemu/main-loop.h"
#include "qemu/module.h"
#include "qemu/timer.h"

1
hw/timer/m48t59.c

@ -29,6 +29,7 @@
#include "hw/qdev-properties.h"
#include "hw/timer/m48t59.h"
#include "qemu/timer.h"
#include "sysemu/runstate.h"
#include "sysemu/sysemu.h"
#include "hw/sysbus.h"
#include "exec/address-spaces.h"

1
hw/timer/mc146818rtc.c

@ -33,6 +33,7 @@
#include "sysemu/sysemu.h"
#include "sysemu/replay.h"
#include "sysemu/reset.h"
#include "sysemu/runstate.h"
#include "hw/timer/mc146818rtc.h"
#include "migration/vmstate.h"
#include "qapi/error.h"

2
hw/timer/milkymist-sysctl.c

@ -25,9 +25,9 @@
#include "hw/irq.h"
#include "hw/sysbus.h"
#include "migration/vmstate.h"
#include "sysemu/sysemu.h"
#include "trace.h"
#include "qemu/timer.h"
#include "sysemu/runstate.h"
#include "hw/ptimer.h"
#include "hw/qdev-properties.h"
#include "qemu/error-report.h"

2
hw/timer/pxa2xx_timer.c

@ -11,7 +11,7 @@
#include "hw/irq.h"
#include "hw/qdev-properties.h"
#include "qemu/timer.h"
#include "sysemu/sysemu.h"
#include "sysemu/runstate.h"
#include "hw/arm/pxa.h"
#include "hw/sysbus.h"
#include "migration/vmstate.h"

2
hw/usb/hcd-ehci.c

@ -35,7 +35,7 @@
#include "trace.h"
#include "qemu/error-report.h"
#include "qemu/main-loop.h"
#include "sysemu/sysemu.h"
#include "sysemu/runstate.h"
#define FRAME_TIMER_FREQ 1000
#define FRAME_TIMER_NS (NANOSECONDS_PER_SECOND / FRAME_TIMER_FREQ)

1
hw/usb/host-libusb.c

@ -45,6 +45,7 @@
#include "qemu/error-report.h"
#include "qemu/main-loop.h"
#include "qemu/module.h"
#include "sysemu/runstate.h"
#include "sysemu/sysemu.h"
#include "trace.h"

1
hw/usb/redirect.c

@ -30,6 +30,7 @@
#include "qemu/units.h"
#include "qapi/error.h"
#include "qemu/timer.h"
#include "sysemu/runstate.h"
#include "sysemu/sysemu.h"
#include "qapi/qmp/qerror.h"
#include "qemu/error-report.h"

1
hw/vfio/pci.c

@ -35,6 +35,7 @@
#include "qemu/range.h"
#include "qemu/units.h"
#include "sysemu/kvm.h"
#include "sysemu/runstate.h"
#include "sysemu/sysemu.h"
#include "pci.h"
#include "trace.h"

3
hw/virtio/virtio-rng.c

@ -13,11 +13,12 @@
#include "qapi/error.h"
#include "qemu/iov.h"
#include "qemu/module.h"
#include "qemu/timer.h"
#include "hw/virtio/virtio.h"
#include "hw/qdev-properties.h"
#include "hw/virtio/virtio-rng.h"
#include "sysemu/rng.h"
#include "sysemu/sysemu.h"
#include "sysemu/runstate.h"
#include "qom/object_interfaces.h"
#include "trace.h"

2
hw/virtio/virtio.c

@ -26,7 +26,7 @@
#include "hw/qdev-properties.h"
#include "hw/virtio/virtio-access.h"
#include "sysemu/dma.h"
#include "sysemu/sysemu.h"
#include "sysemu/runstate.h"
/*
* The alignment to use between consumer and producer parts of vring.

2
hw/watchdog/watchdog.c

@ -26,7 +26,7 @@
#include "qapi/error.h"
#include "qapi/qapi-commands-run-state.h"
#include "qapi/qapi-events-run-state.h"
#include "sysemu/sysemu.h"
#include "sysemu/runstate.h"
#include "sysemu/watchdog.h"
#include "hw/nmi.h"
#include "qemu/help_option.h"

2
hw/xen/xen-common.c

@ -14,7 +14,7 @@
#include "hw/xen/xen-legacy-backend.h"
#include "chardev/char.h"
#include "sysemu/accel.h"
#include "sysemu/sysemu.h"
#include "sysemu/runstate.h"
#include "migration/misc.h"
#include "migration/global_state.h"

1
hw/xtensa/xtfpga.c

@ -43,6 +43,7 @@
#include "chardev/char.h"
#include "sysemu/device_tree.h"
#include "sysemu/reset.h"
#include "sysemu/runstate.h"
#include "qemu/error-report.h"
#include "qemu/option.h"
#include "bootparam.h"

2
include/hw/ppc/spapr_drc.h

@ -15,7 +15,7 @@
#include <libfdt.h>
#include "qom/object.h"
#include "sysemu/sysemu.h"
#include "sysemu/runstate.h"
#include "hw/qdev-core.h"
#include "qapi/error.h"

68
include/sysemu/runstate.h

@ -0,0 +1,68 @@
#ifndef SYSEMU_RUNSTATE_H
#define SYSEMU_RUNSTATE_H
#include "qapi/qapi-types-run-state.h"
#include "qemu/notify.h"
bool runstate_check(RunState state);
void runstate_set(RunState new_state);
int runstate_is_running(void);
bool runstate_needs_reset(void);
bool runstate_store(char *str, size_t size);
typedef void VMChangeStateHandler(void *opaque, int running, RunState state);
VMChangeStateEntry *qemu_add_vm_change_state_handler(VMChangeStateHandler *cb,
void *opaque);
VMChangeStateEntry *qemu_add_vm_change_state_handler_prio(
VMChangeStateHandler *cb, void *opaque, int priority);
VMChangeStateEntry *qdev_add_vm_change_state_handler(DeviceState *dev,
VMChangeStateHandler *cb,
void *opaque);
void qemu_del_vm_change_state_handler(VMChangeStateEntry *e);
void vm_state_notify(int running, RunState state);
static inline bool shutdown_caused_by_guest(ShutdownCause cause)
{
return cause >= SHUTDOWN_CAUSE_GUEST_SHUTDOWN;
}
void vm_start(void);
int vm_prepare_start(void);
int vm_stop(RunState state);
int vm_stop_force_state(RunState state);
int vm_shutdown(void);
typedef enum WakeupReason {
/* Always keep QEMU_WAKEUP_REASON_NONE = 0 */
QEMU_WAKEUP_REASON_NONE = 0,
QEMU_WAKEUP_REASON_RTC,
QEMU_WAKEUP_REASON_PMTIMER,
QEMU_WAKEUP_REASON_OTHER,
} WakeupReason;
void qemu_exit_preconfig_request(void);
void qemu_system_reset_request(ShutdownCause reason);
void qemu_system_suspend_request(void);
void qemu_register_suspend_notifier(Notifier *notifier);
bool qemu_wakeup_suspend_enabled(void);
void qemu_system_wakeup_request(WakeupReason reason, Error **errp);
void qemu_system_wakeup_enable(WakeupReason reason, bool enabled);
void qemu_register_wakeup_notifier(Notifier *notifier);
void qemu_register_wakeup_support(void);
void qemu_system_shutdown_request(ShutdownCause reason);
void qemu_system_powerdown_request(void);
void qemu_register_powerdown_notifier(Notifier *notifier);
void qemu_register_shutdown_notifier(Notifier *notifier);
void qemu_system_debug_request(void);
void qemu_system_vmstop_request(RunState reason);
void qemu_system_vmstop_request_prepare(void);
bool qemu_vmstop_requested(RunState *r);
ShutdownCause qemu_shutdown_requested_get(void);
ShutdownCause qemu_reset_requested_get(void);
void qemu_system_killed(int signal, pid_t pid);
void qemu_system_reset(ShutdownCause reason);
void qemu_system_guest_panicked(GuestPanicInformation *info);
#endif

61
include/sysemu/sysemu.h

@ -2,10 +2,8 @@
#define SYSEMU_H
/* Misc. things related to the system emulator. */
#include "qapi/qapi-types-run-state.h"
#include "qemu/timer.h"
#include "qemu/notify.h"
#include "qemu/bitmap.h"
#include "qemu/uuid.h"
#include "qom/object.h"
@ -17,65 +15,6 @@ extern const char *qemu_name;
extern QemuUUID qemu_uuid;
extern bool qemu_uuid_set;
bool runstate_check(RunState state);
void runstate_set(RunState new_state);
int runstate_is_running(void);
bool runstate_needs_reset(void);
bool runstate_store(char *str, size_t size);
typedef void VMChangeStateHandler(void *opaque, int running, RunState state);
VMChangeStateEntry *qemu_add_vm_change_state_handler(VMChangeStateHandler *cb,
void *opaque);
VMChangeStateEntry *qemu_add_vm_change_state_handler_prio(
VMChangeStateHandler *cb, void *opaque, int priority);
VMChangeStateEntry *qdev_add_vm_change_state_handler(DeviceState *dev,
VMChangeStateHandler *cb,
void *opaque);
void qemu_del_vm_change_state_handler(VMChangeStateEntry *e);
void vm_state_notify(int running, RunState state);
static inline bool shutdown_caused_by_guest(ShutdownCause cause)
{
return cause >= SHUTDOWN_CAUSE_GUEST_SHUTDOWN;
}
void vm_start(void);
int vm_prepare_start(void);
int vm_stop(RunState state);
int vm_stop_force_state(RunState state);
int vm_shutdown(void);
typedef enum WakeupReason {
/* Always keep QEMU_WAKEUP_REASON_NONE = 0 */
QEMU_WAKEUP_REASON_NONE = 0,
QEMU_WAKEUP_REASON_RTC,
QEMU_WAKEUP_REASON_PMTIMER,
QEMU_WAKEUP_REASON_OTHER,
} WakeupReason;
void qemu_exit_preconfig_request(void);
void qemu_system_reset_request(ShutdownCause reason);
void qemu_system_suspend_request(void);
void qemu_register_suspend_notifier(Notifier *notifier);
bool qemu_wakeup_suspend_enabled(void);
void qemu_system_wakeup_request(WakeupReason reason, Error **errp);
void qemu_system_wakeup_enable(WakeupReason reason, bool enabled);
void qemu_register_wakeup_notifier(Notifier *notifier);
void qemu_register_wakeup_support(void);
void qemu_system_shutdown_request(ShutdownCause reason);
void qemu_system_powerdown_request(void);
void qemu_register_powerdown_notifier(Notifier *notifier);
void qemu_register_shutdown_notifier(Notifier *notifier);
void qemu_system_debug_request(void);
void qemu_system_vmstop_request(RunState reason);
void qemu_system_vmstop_request_prepare(void);
bool qemu_vmstop_requested(RunState *r);
ShutdownCause qemu_shutdown_requested_get(void);
ShutdownCause qemu_reset_requested_get(void);
void qemu_system_killed(int signal, pid_t pid);
void qemu_system_reset(ShutdownCause reason);
void qemu_system_guest_panicked(GuestPanicInformation *info);
void qemu_add_exit_notifier(Notifier *notify);
void qemu_remove_exit_notifier(Notifier *notify);

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

Loading…
Cancel
Save