aboutsummaryrefslogtreecommitdiff
path: root/include/sysemu
diff options
context:
space:
mode:
Diffstat (limited to 'include/sysemu')
-rw-r--r--include/sysemu/accel.h1
-rw-r--r--include/sysemu/arch_init.h1
-rw-r--r--include/sysemu/balloon.h1
-rw-r--r--include/sysemu/cryptodev-vhost-user.h3
-rw-r--r--include/sysemu/cryptodev.h1
-rw-r--r--include/sysemu/dma.h1
-rw-r--r--include/sysemu/hax.h1
-rw-r--r--include/sysemu/hostmem.h3
-rw-r--r--include/sysemu/hvf.h2
-rw-r--r--include/sysemu/iothread.h1
-rw-r--r--include/sysemu/kvm.h1
-rw-r--r--include/sysemu/kvm_int.h2
-rw-r--r--include/sysemu/memory_mapping.h1
-rw-r--r--include/sysemu/numa.h18
-rw-r--r--include/sysemu/replay.h2
-rw-r--r--include/sysemu/rng.h1
-rw-r--r--include/sysemu/runstate.h68
-rw-r--r--include/sysemu/sysemu.h68
-rw-r--r--include/sysemu/xen-mapcache.h2
19 files changed, 96 insertions, 82 deletions
diff --git a/include/sysemu/accel.h b/include/sysemu/accel.h
index 89ce57e404..8eb60b870b 100644
--- a/include/sysemu/accel.h
+++ b/include/sysemu/accel.h
@@ -24,7 +24,6 @@
#define HW_ACCEL_H
#include "qom/object.h"
-#include "hw/qdev-properties.h"
#include "exec/hwaddr.h"
typedef struct AccelState {
diff --git a/include/sysemu/arch_init.h b/include/sysemu/arch_init.h
index 10cbafe970..62c6fe4cf1 100644
--- a/include/sysemu/arch_init.h
+++ b/include/sysemu/arch_init.h
@@ -1,7 +1,6 @@
#ifndef QEMU_ARCH_INIT_H
#define QEMU_ARCH_INIT_H
-#include "qapi/qapi-types-misc.h"
enum {
QEMU_ARCH_ALL = -1,
diff --git a/include/sysemu/balloon.h b/include/sysemu/balloon.h
index c8f6145257..aea0c44985 100644
--- a/include/sysemu/balloon.h
+++ b/include/sysemu/balloon.h
@@ -14,6 +14,7 @@
#ifndef QEMU_BALLOON_H
#define QEMU_BALLOON_H
+#include "exec/cpu-common.h"
#include "qapi/qapi-types-misc.h"
typedef void (QEMUBalloonEvent)(void *opaque, ram_addr_t target);
diff --git a/include/sysemu/cryptodev-vhost-user.h b/include/sysemu/cryptodev-vhost-user.h
index 6debf53fc5..0d3421e7e8 100644
--- a/include/sysemu/cryptodev-vhost-user.h
+++ b/include/sysemu/cryptodev-vhost-user.h
@@ -20,9 +20,12 @@
* License along with this library; if not, see <http://www.gnu.org/licenses/>.
*
*/
+
#ifndef CRYPTODEV_VHOST_USER_H
#define CRYPTODEV_VHOST_USER_H
+#include "sysemu/cryptodev-vhost.h"
+
#define VHOST_USER_MAX_AUTH_KEY_LEN 512
#define VHOST_USER_MAX_CIPHER_KEY_LEN 64
diff --git a/include/sysemu/cryptodev.h b/include/sysemu/cryptodev.h
index 92bbb79131..a9afb7e5b5 100644
--- a/include/sysemu/cryptodev.h
+++ b/include/sysemu/cryptodev.h
@@ -23,6 +23,7 @@
#ifndef CRYPTODEV_H
#define CRYPTODEV_H
+#include "qemu/queue.h"
#include "qom/object.h"
/**
diff --git a/include/sysemu/dma.h b/include/sysemu/dma.h
index 5da3c4e3c5..80c5bc3e02 100644
--- a/include/sysemu/dma.h
+++ b/include/sysemu/dma.h
@@ -12,7 +12,6 @@
#include "exec/memory.h"
#include "exec/address-spaces.h"
-#include "hw/hw.h"
#include "block/block.h"
#include "block/accounting.h"
diff --git a/include/sysemu/hax.h b/include/sysemu/hax.h
index f005995c50..9b27e65cc7 100644
--- a/include/sysemu/hax.h
+++ b/include/sysemu/hax.h
@@ -37,7 +37,6 @@ void hax_cpu_synchronize_pre_loadvm(CPUState *cpu);
int hax_enabled(void);
-#include "hw/hw.h"
#include "qemu/bitops.h"
#include "exec/memory.h"
int hax_vcpu_destroy(CPUState *cpu);
diff --git a/include/sysemu/hostmem.h b/include/sysemu/hostmem.h
index 92fa0e458c..4dbdadd39e 100644
--- a/include/sysemu/hostmem.h
+++ b/include/sysemu/hostmem.h
@@ -13,7 +13,7 @@
#ifndef SYSEMU_HOSTMEM_H
#define SYSEMU_HOSTMEM_H
-#include "sysemu/sysemu.h" /* for MAX_NODES */
+#include "sysemu/numa.h"
#include "qapi/qapi-types-machine.h"
#include "qom/object.h"
#include "exec/memory.h"
@@ -27,7 +27,6 @@
#define MEMORY_BACKEND_CLASS(klass) \
OBJECT_CLASS_CHECK(HostMemoryBackendClass, (klass), TYPE_MEMORY_BACKEND)
-typedef struct HostMemoryBackend HostMemoryBackend;
typedef struct HostMemoryBackendClass HostMemoryBackendClass;
/**
diff --git a/include/sysemu/hvf.h b/include/sysemu/hvf.h
index d275b5a843..d211e808e9 100644
--- a/include/sysemu/hvf.h
+++ b/include/sysemu/hvf.h
@@ -13,6 +13,7 @@
#ifndef HVF_H
#define HVF_H
+#include "cpu.h"
#include "qemu/bitops.h"
#include "exec/memory.h"
#include "sysemu/accel.h"
@@ -23,7 +24,6 @@ extern bool hvf_allowed;
#include <Hypervisor/hv_vmx.h>
#include <Hypervisor/hv_error.h>
#include "target/i386/cpu.h"
-#include "hw/hw.h"
uint32_t hvf_get_supported_cpuid(uint32_t func, uint32_t idx,
int reg);
#define hvf_enabled() (hvf_allowed)
diff --git a/include/sysemu/iothread.h b/include/sysemu/iothread.h
index 5f6240d5cb..6181486401 100644
--- a/include/sysemu/iothread.h
+++ b/include/sysemu/iothread.h
@@ -16,6 +16,7 @@
#include "block/aio.h"
#include "qemu/thread.h"
+#include "qom/object.h"
#define TYPE_IOTHREAD "iothread"
diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h
index acd90aebb6..c8ea412f62 100644
--- a/include/sysemu/kvm.h
+++ b/include/sysemu/kvm.h
@@ -17,7 +17,6 @@
#include "qemu/queue.h"
#include "qom/cpu.h"
#include "exec/memattrs.h"
-#include "hw/irq.h"
#ifdef NEED_CPU_H
# ifdef CONFIG_KVM
diff --git a/include/sysemu/kvm_int.h b/include/sysemu/kvm_int.h
index 31df465fdc..72b2d1b3ae 100644
--- a/include/sysemu/kvm_int.h
+++ b/include/sysemu/kvm_int.h
@@ -9,7 +9,7 @@
#ifndef QEMU_KVM_INT_H
#define QEMU_KVM_INT_H
-#include "sysemu/sysemu.h"
+#include "exec/memory.h"
#include "sysemu/accel.h"
#include "sysemu/kvm.h"
diff --git a/include/sysemu/memory_mapping.h b/include/sysemu/memory_mapping.h
index 58452457ce..4b20f1a639 100644
--- a/include/sysemu/memory_mapping.h
+++ b/include/sysemu/memory_mapping.h
@@ -15,6 +15,7 @@
#define MEMORY_MAPPING_H
#include "qemu/queue.h"
+#include "exec/cpu-defs.h"
#include "exec/memory.h"
typedef struct GuestPhysBlock {
diff --git a/include/sysemu/numa.h b/include/sysemu/numa.h
index 01a263eba2..7a4ce89765 100644
--- a/include/sysemu/numa.h
+++ b/include/sysemu/numa.h
@@ -2,9 +2,17 @@
#define SYSEMU_NUMA_H
#include "qemu/bitmap.h"
-#include "sysemu/sysemu.h"
-#include "sysemu/hostmem.h"
-#include "hw/boards.h"
+#include "qapi/qapi-types-machine.h"
+#include "exec/cpu-common.h"
+
+struct CPUArchId;
+
+#define MAX_NODES 128
+#define NUMA_NODE_UNASSIGNED MAX_NODES
+#define NUMA_DISTANCE_MIN 10
+#define NUMA_DISTANCE_DEFAULT 20
+#define NUMA_DISTANCE_MAX 254
+#define NUMA_DISTANCE_UNREACHABLE 255
extern int nb_numa_nodes; /* Number of NUMA nodes */
extern bool have_numa_distance;
@@ -32,5 +40,7 @@ void numa_legacy_auto_assign_ram(MachineClass *mc, NodeInfo *nodes,
int nb_nodes, ram_addr_t size);
void numa_default_auto_assign_ram(MachineClass *mc, NodeInfo *nodes,
int nb_nodes, ram_addr_t size);
-void numa_cpu_pre_plug(const CPUArchId *slot, DeviceState *dev, Error **errp);
+void numa_cpu_pre_plug(const struct CPUArchId *slot, DeviceState *dev,
+ Error **errp);
+
#endif
diff --git a/include/sysemu/replay.h b/include/sysemu/replay.h
index 3a7c58e423..2f2ccdbc98 100644
--- a/include/sysemu/replay.h
+++ b/include/sysemu/replay.h
@@ -12,8 +12,8 @@
*
*/
-#include "sysemu.h"
#include "qapi/qapi-types-misc.h"
+#include "qapi/qapi-types-run-state.h"
#include "qapi/qapi-types-ui.h"
/* replay clock kinds */
diff --git a/include/sysemu/rng.h b/include/sysemu/rng.h
index 2a02f47771..9b22c156f8 100644
--- a/include/sysemu/rng.h
+++ b/include/sysemu/rng.h
@@ -13,6 +13,7 @@
#ifndef QEMU_RNG_H
#define QEMU_RNG_H
+#include "qemu/queue.h"
#include "qom/object.h"
#define TYPE_RNG_BACKEND "rng-backend"
diff --git a/include/sysemu/runstate.h b/include/sysemu/runstate.h
new file mode 100644
index 0000000000..0b41555609
--- /dev/null
+++ b/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
+
diff --git a/include/sysemu/sysemu.h b/include/sysemu/sysemu.h
index 984c439ac9..d2c38f611a 100644
--- a/include/sysemu/sysemu.h
+++ b/include/sysemu/sysemu.h
@@ -2,12 +2,8 @@
#define SYSEMU_H
/* Misc. things related to the system emulator. */
-#include "qapi/qapi-types-run-state.h"
-#include "qemu/queue.h"
#include "qemu/timer.h"
#include "qemu/notify.h"
-#include "qemu/main-loop.h"
-#include "qemu/bitmap.h"
#include "qemu/uuid.h"
#include "qom/object.h"
@@ -19,63 +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 struct vm_change_state_entry VMChangeStateEntry;
-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);
-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);
@@ -119,13 +58,6 @@ extern QEMUClockType rtc_clock;
extern const char *mem_path;
extern int mem_prealloc;
-#define MAX_NODES 128
-#define NUMA_NODE_UNASSIGNED MAX_NODES
-#define NUMA_DISTANCE_MIN 10
-#define NUMA_DISTANCE_DEFAULT 20
-#define NUMA_DISTANCE_MAX 254
-#define NUMA_DISTANCE_UNREACHABLE 255
-
#define MAX_OPTION_ROMS 16
typedef struct QEMUOptionRom {
const char *name;
diff --git a/include/sysemu/xen-mapcache.h b/include/sysemu/xen-mapcache.h
index a03e2f1878..c8e7c2f6cf 100644
--- a/include/sysemu/xen-mapcache.h
+++ b/include/sysemu/xen-mapcache.h
@@ -9,6 +9,8 @@
#ifndef XEN_MAPCACHE_H
#define XEN_MAPCACHE_H
+#include "exec/cpu-common.h"
+
typedef hwaddr (*phys_offset_to_gaddr_t)(hwaddr phys_offset,
ram_addr_t size);
#ifdef CONFIG_XEN