aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2019-08-22 10:31:21 +0100
committerPeter Maydell <peter.maydell@linaro.org>2019-08-22 10:31:21 +0100
commitf3b8f18ebf344ab359e8f79f6ed777e740dae77c (patch)
tree3d85ef8664cbca8be4026ed953ddfd59b8d50687
parentfe066b4848bab4f9365a419f3c8ba59ccecf67c0 (diff)
parenteb707eac58dfc2d17281f67dde40cab3b8b26cc0 (diff)
downloadqemu-f3b8f18ebf344ab359e8f79f6ed777e740dae77c.zip
qemu-f3b8f18ebf344ab359e8f79f6ed777e740dae77c.tar.gz
qemu-f3b8f18ebf344ab359e8f79f6ed777e740dae77c.tar.bz2
Merge remote-tracking branch 'remotes/armbru/tags/pull-monitor-2019-08-21' into staging
Monitor patches for 2019-08-21 # gpg: Signature made Wed 21 Aug 2019 16:35:07 BST # gpg: using RSA key 354BC8B3D7EB2A6B68674E5F3870B400EB918653 # gpg: issuer "armbru@redhat.com" # gpg: Good signature from "Markus Armbruster <armbru@redhat.com>" [full] # gpg: aka "Markus Armbruster <armbru@pond.sub.org>" [full] # Primary key fingerprint: 354B C8B3 D7EB 2A6B 6867 4E5F 3870 B400 EB91 8653 * remotes/armbru/tags/pull-monitor-2019-08-21: monitor/qmp: Update comment for commit 4eaca8de268 qdev: Collect HMP handlers command handlers in qdev-monitor.c qapi: Move query-target from misc.json to machine.json hw/core: Move cpu.c, cpu.h from qom/ to hw/core/ Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r--MAINTAINERS6
-rw-r--r--accel/tcg/user-exec-stub.c2
-rw-r--r--arch_init.c11
-rw-r--r--cpus-common.c2
-rw-r--r--docs/interop/firmware.json2
-rw-r--r--exec.c2
-rw-r--r--hw/acpi/cpu_hotplug.c2
-rw-r--r--hw/acpi/ich9.c2
-rw-r--r--hw/acpi/piix4.c2
-rw-r--r--hw/arm/smmu-common.c2
-rw-r--r--hw/arm/virt-acpi-build.c2
-rw-r--r--hw/core/Makefile.objs1
-rw-r--r--hw/core/cpu.c (renamed from qom/cpu.c)2
-rw-r--r--hw/core/generic-loader.c2
-rw-r--r--hw/core/machine-qmp-cmds.c10
-rw-r--r--hw/core/null-machine.c2
-rw-r--r--hw/core/numa.c2
-rw-r--r--hw/cpu/a9mpcore.c2
-rw-r--r--hw/cpu/cluster.c2
-rw-r--r--hw/i386/acpi-build.c2
-rw-r--r--hw/i386/pc.c2
-rw-r--r--hw/intc/arm_gic.c2
-rw-r--r--hw/intc/arm_gicv3_common.c2
-rw-r--r--hw/isa/lpc_ich9.c2
-rw-r--r--hw/misc/imx6_src.c2
-rw-r--r--hw/ppc/spapr.c2
-rw-r--r--hw/timer/a9gtimer.c2
-rw-r--r--hw/timer/arm_mptimer.c2
-rw-r--r--include/exec/cpu-all.h2
-rw-r--r--include/exec/cpu-defs.h2
-rw-r--r--include/exec/log.h2
-rw-r--r--include/hw/boards.h2
-rw-r--r--include/hw/core/cpu.h (renamed from include/qom/cpu.h)0
-rw-r--r--include/hw/ppc/openpic.h2
-rw-r--r--include/sysemu/hw_accel.h2
-rw-r--r--include/sysemu/kvm.h2
-rw-r--r--monitor/hmp-cmds.c19
-rw-r--r--monitor/qmp.c2
-rw-r--r--qapi/common.json25
-rw-r--r--qapi/machine.json48
-rw-r--r--qapi/misc.json23
-rw-r--r--qdev-monitor.c18
-rw-r--r--qom/Makefile.objs1
-rw-r--r--target/alpha/cpu-qom.h2
-rw-r--r--target/arm/cpu-qom.h2
-rw-r--r--target/cris/cpu-qom.h2
-rw-r--r--target/hppa/cpu-qom.h2
-rw-r--r--target/hppa/int_helper.c2
-rw-r--r--target/hppa/mem_helper.c2
-rw-r--r--target/i386/cpu-qom.h2
-rw-r--r--target/lm32/cpu-qom.h2
-rw-r--r--target/m68k/cpu-qom.h2
-rw-r--r--target/microblaze/cpu-qom.h2
-rw-r--r--target/mips/cpu-qom.h2
-rw-r--r--target/moxie/cpu.h2
-rw-r--r--target/nios2/cpu.h2
-rw-r--r--target/openrisc/cpu.h2
-rw-r--r--target/ppc/cpu-qom.h2
-rw-r--r--target/riscv/cpu.h2
-rw-r--r--target/s390x/cpu-qom.h2
-rw-r--r--target/s390x/cpu_models.h2
-rw-r--r--target/sh4/cpu-qom.h2
-rw-r--r--target/sparc/cpu-qom.h2
-rw-r--r--target/tilegx/cpu.h2
-rw-r--r--target/tricore/cpu-qom.h2
-rw-r--r--target/unicore32/cpu-qom.h2
-rw-r--r--target/xtensa/cpu-qom.h2
-rw-r--r--trace-events2
-rw-r--r--trace/control-vcpu.h2
-rw-r--r--ui/cocoa.m2
70 files changed, 137 insertions, 143 deletions
diff --git a/MAINTAINERS b/MAINTAINERS
index 743a926..ef6c010 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1274,6 +1274,7 @@ Machine core
M: Eduardo Habkost <ehabkost@redhat.com>
M: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
S: Supported
+F: hw/core/cpu.c
F: hw/core/machine-qmp-cmds.c
F: hw/core/machine.c
F: hw/core/null-machine.c
@@ -1281,10 +1282,9 @@ F: hw/core/numa.c
F: hw/cpu/cluster.c
F: qapi/machine.json
F: qapi/machine-target.json
-F: qom/cpu.c
F: include/hw/boards.h
+F: include/hw/core/cpu.h
F: include/hw/cpu/cluster.h
-F: include/qom/cpu.h
F: include/sysemu/numa.h
T: git https://github.com/ehabkost/qemu.git machine-next
@@ -2048,12 +2048,10 @@ F: hw/core/qdev*
F: include/hw/qdev*
F: include/monitor/qdev.h
F: include/qom/
-X: include/qom/cpu.h
F: qapi/qom.json
F: qapi/qdev.json
F: qdev-monitor.c
F: qom/
-X: qom/cpu.c
F: tests/check-qom-interface.c
F: tests/check-qom-proplist.c
F: tests/test-qdev-global-props.c
diff --git a/accel/tcg/user-exec-stub.c b/accel/tcg/user-exec-stub.c
index 4bf00b8..f6d8c8f 100644
--- a/accel/tcg/user-exec-stub.c
+++ b/accel/tcg/user-exec-stub.c
@@ -1,5 +1,5 @@
#include "qemu/osdep.h"
-#include "qom/cpu.h"
+#include "hw/core/cpu.h"
#include "sysemu/replay.h"
#include "sysemu/sysemu.h"
diff --git a/arch_init.c b/arch_init.c
index 74b0708..0a15311 100644
--- a/arch_init.c
+++ b/arch_init.c
@@ -106,14 +106,3 @@ int xen_available(void)
return 0;
#endif
}
-
-
-TargetInfo *qmp_query_target(Error **errp)
-{
- TargetInfo *info = g_malloc0(sizeof(*info));
-
- info->arch = qapi_enum_parse(&SysEmuTarget_lookup, TARGET_NAME, -1,
- &error_abort);
-
- return info;
-}
diff --git a/cpus-common.c b/cpus-common.c
index 023cfeb..af3385a 100644
--- a/cpus-common.c
+++ b/cpus-common.c
@@ -20,7 +20,7 @@
#include "qemu/osdep.h"
#include "qemu/main-loop.h"
#include "exec/cpu-common.h"
-#include "qom/cpu.h"
+#include "hw/core/cpu.h"
#include "sysemu/cpus.h"
static QemuMutex qemu_cpu_list_lock;
diff --git a/docs/interop/firmware.json b/docs/interop/firmware.json
index ff8c2ce..8ffb785 100644
--- a/docs/interop/firmware.json
+++ b/docs/interop/firmware.json
@@ -13,7 +13,7 @@
# = Firmware
##
-{ 'include' : 'common.json' }
+{ 'include' : 'machine.json' }
{ 'include' : 'block-core.json' }
##
diff --git a/exec.c b/exec.c
index 731b79d..1df966d 100644
--- a/exec.c
+++ b/exec.c
@@ -939,7 +939,7 @@ void cpu_exec_unrealizefn(CPUState *cpu)
Property cpu_common_props[] = {
#ifndef CONFIG_USER_ONLY
/* Create a memory property for softmmu CPU object,
- * so users can wire up its memory. (This can't go in qom/cpu.c
+ * so users can wire up its memory. (This can't go in hw/core/cpu.c
* because that file is compiled only once for both user-mode
* and system builds.) The default if no link is set up is to use
* the system address space.
diff --git a/hw/acpi/cpu_hotplug.c b/hw/acpi/cpu_hotplug.c
index a83567e..6e8293a 100644
--- a/hw/acpi/cpu_hotplug.c
+++ b/hw/acpi/cpu_hotplug.c
@@ -12,7 +12,7 @@
#include "qemu/osdep.h"
#include "hw/acpi/cpu_hotplug.h"
#include "qapi/error.h"
-#include "qom/cpu.h"
+#include "hw/core/cpu.h"
#include "hw/i386/pc.h"
#include "qemu/error-report.h"
diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c
index 2ca52bf..2034dd7 100644
--- a/hw/acpi/ich9.c
+++ b/hw/acpi/ich9.c
@@ -31,7 +31,7 @@
#include "hw/pci/pci.h"
#include "migration/vmstate.h"
#include "qemu/timer.h"
-#include "qom/cpu.h"
+#include "hw/core/cpu.h"
#include "sysemu/reset.h"
#include "sysemu/runstate.h"
#include "hw/acpi/acpi.h"
diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c
index 1c907d2..5742c3d 100644
--- a/hw/acpi/piix4.c
+++ b/hw/acpi/piix4.c
@@ -44,7 +44,7 @@
#include "hw/xen/xen.h"
#include "migration/qemu-file-types.h"
#include "migration/vmstate.h"
-#include "qom/cpu.h"
+#include "hw/core/cpu.h"
#include "trace.h"
#define GPE_BASE 0xafe0
diff --git a/hw/arm/smmu-common.c b/hw/arm/smmu-common.c
index 956ebe3..245817d 100644
--- a/hw/arm/smmu-common.c
+++ b/hw/arm/smmu-common.c
@@ -20,7 +20,7 @@
#include "exec/address-spaces.h"
#include "trace.h"
#include "exec/target_page.h"
-#include "qom/cpu.h"
+#include "hw/core/cpu.h"
#include "hw/qdev-properties.h"
#include "qapi/error.h"
#include "qemu/jhash.h"
diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acpi-build.c
index fa9afd2..a8b2d97 100644
--- a/hw/arm/virt-acpi-build.c
+++ b/hw/arm/virt-acpi-build.c
@@ -30,7 +30,7 @@
#include "qapi/error.h"
#include "qemu/bitmap.h"
#include "trace.h"
-#include "qom/cpu.h"
+#include "hw/core/cpu.h"
#include "target/arm/cpu.h"
#include "hw/acpi/acpi-defs.h"
#include "hw/acpi/acpi.h"
diff --git a/hw/core/Makefile.objs b/hw/core/Makefile.objs
index b49f880..fd0550d 100644
--- a/hw/core/Makefile.objs
+++ b/hw/core/Makefile.objs
@@ -8,6 +8,7 @@ common-obj-y += irq.o
common-obj-y += hotplug.o
common-obj-$(CONFIG_SOFTMMU) += nmi.o
common-obj-$(CONFIG_SOFTMMU) += vm-change-state-handler.o
+common-obj-y += cpu.o
common-obj-$(CONFIG_EMPTY_SLOT) += empty_slot.o
common-obj-$(CONFIG_XILINX_AXI) += stream.o
diff --git a/qom/cpu.c b/hw/core/cpu.c
index aeb34f8..0035845 100644
--- a/qom/cpu.c
+++ b/hw/core/cpu.c
@@ -20,7 +20,7 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
-#include "qom/cpu.h"
+#include "hw/core/cpu.h"
#include "sysemu/hw_accel.h"
#include "qemu/notify.h"
#include "qemu/log.h"
diff --git a/hw/core/generic-loader.c b/hw/core/generic-loader.c
index 06d8d64..4b1fc86 100644
--- a/hw/core/generic-loader.c
+++ b/hw/core/generic-loader.c
@@ -31,7 +31,7 @@
*/
#include "qemu/osdep.h"
-#include "qom/cpu.h"
+#include "hw/core/cpu.h"
#include "hw/sysbus.h"
#include "sysemu/dma.h"
#include "sysemu/reset.h"
diff --git a/hw/core/machine-qmp-cmds.c b/hw/core/machine-qmp-cmds.c
index 526fbd5..15cf7c6 100644
--- a/hw/core/machine-qmp-cmds.c
+++ b/hw/core/machine-qmp-cmds.c
@@ -249,6 +249,16 @@ CurrentMachineParams *qmp_query_current_machine(Error **errp)
return params;
}
+TargetInfo *qmp_query_target(Error **errp)
+{
+ TargetInfo *info = g_malloc0(sizeof(*info));
+
+ info->arch = qapi_enum_parse(&SysEmuTarget_lookup, TARGET_NAME, -1,
+ &error_abort);
+
+ return info;
+}
+
HotpluggableCPUList *qmp_query_hotpluggable_cpus(Error **errp)
{
MachineState *ms = MACHINE(qdev_get_machine());
diff --git a/hw/core/null-machine.c b/hw/core/null-machine.c
index 30b1991..1aa0a9a 100644
--- a/hw/core/null-machine.c
+++ b/hw/core/null-machine.c
@@ -16,7 +16,7 @@
#include "hw/boards.h"
#include "sysemu/sysemu.h"
#include "exec/address-spaces.h"
-#include "qom/cpu.h"
+#include "hw/core/cpu.h"
static void machine_none_init(MachineState *mch)
{
diff --git a/hw/core/numa.c b/hw/core/numa.c
index 7a63ddc..4f7e462 100644
--- a/hw/core/numa.c
+++ b/hw/core/numa.c
@@ -34,7 +34,7 @@
#include "qapi/opts-visitor.h"
#include "qapi/qapi-visit-machine.h"
#include "sysemu/qtest.h"
-#include "qom/cpu.h"
+#include "hw/core/cpu.h"
#include "hw/mem/pc-dimm.h"
#include "migration/vmstate.h"
#include "hw/boards.h"
diff --git a/hw/cpu/a9mpcore.c b/hw/cpu/a9mpcore.c
index cd1e165..6872a3a 100644
--- a/hw/cpu/a9mpcore.c
+++ b/hw/cpu/a9mpcore.c
@@ -14,7 +14,7 @@
#include "hw/cpu/a9mpcore.h"
#include "hw/irq.h"
#include "hw/qdev-properties.h"
-#include "qom/cpu.h"
+#include "hw/core/cpu.h"
static void a9mp_priv_set_irq(void *opaque, int irq, int level)
{
diff --git a/hw/cpu/cluster.c b/hw/cpu/cluster.c
index 74d8d43..349a883 100644
--- a/hw/cpu/cluster.c
+++ b/hw/cpu/cluster.c
@@ -21,7 +21,7 @@
#include "qemu/osdep.h"
#include "hw/cpu/cluster.h"
#include "hw/qdev-properties.h"
-#include "qom/cpu.h"
+#include "hw/core/cpu.h"
#include "qapi/error.h"
#include "qemu/module.h"
#include "qemu/cutils.h"
diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 5b0ec1b..034e413 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -27,7 +27,7 @@
#include "qemu/bitmap.h"
#include "qemu/error-report.h"
#include "hw/pci/pci.h"
-#include "qom/cpu.h"
+#include "hw/core/cpu.h"
#include "target/i386/cpu.h"
#include "hw/misc/pvpanic.h"
#include "hw/timer/hpet.h"
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 697c336..c14ed86 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -76,7 +76,7 @@
#include "qapi/error.h"
#include "qapi/qapi-visit-common.h"
#include "qapi/visitor.h"
-#include "qom/cpu.h"
+#include "hw/core/cpu.h"
#include "hw/nmi.h"
#include "hw/usb.h"
#include "hw/i386/intel_iommu.h"
diff --git a/hw/intc/arm_gic.c b/hw/intc/arm_gic.c
index 7af591d..1d7da7b 100644
--- a/hw/intc/arm_gic.c
+++ b/hw/intc/arm_gic.c
@@ -23,7 +23,7 @@
#include "hw/sysbus.h"
#include "gic_internal.h"
#include "qapi/error.h"
-#include "qom/cpu.h"
+#include "hw/core/cpu.h"
#include "qemu/log.h"
#include "qemu/module.h"
#include "trace.h"
diff --git a/hw/intc/arm_gicv3_common.c b/hw/intc/arm_gicv3_common.c
index 8f5f4c8..f0c551d 100644
--- a/hw/intc/arm_gicv3_common.c
+++ b/hw/intc/arm_gicv3_common.c
@@ -24,7 +24,7 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qemu/module.h"
-#include "qom/cpu.h"
+#include "hw/core/cpu.h"
#include "hw/intc/arm_gicv3_common.h"
#include "hw/qdev-properties.h"
#include "migration/vmstate.h"
diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c
index eec9eb3..17c292e 100644
--- a/hw/isa/lpc_ich9.c
+++ b/hw/isa/lpc_ich9.c
@@ -49,7 +49,7 @@
#include "exec/address-spaces.h"
#include "sysemu/runstate.h"
#include "sysemu/sysemu.h"
-#include "qom/cpu.h"
+#include "hw/core/cpu.h"
#include "hw/nvram/fw_cfg.h"
#include "qemu/cutils.h"
diff --git a/hw/misc/imx6_src.c b/hw/misc/imx6_src.c
index 8ab1896..dd99cc7 100644
--- a/hw/misc/imx6_src.c
+++ b/hw/misc/imx6_src.c
@@ -16,7 +16,7 @@
#include "qemu/main-loop.h"
#include "qemu/module.h"
#include "arm-powerctl.h"
-#include "qom/cpu.h"
+#include "hw/core/cpu.h"
#ifndef DEBUG_IMX6_SRC
#define DEBUG_IMX6_SRC 0
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 64fc225..baedadf 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -49,7 +49,7 @@
#include "mmu-hash64.h"
#include "mmu-book3s-v3.h"
#include "cpu-models.h"
-#include "qom/cpu.h"
+#include "hw/core/cpu.h"
#include "hw/boards.h"
#include "hw/ppc/ppc.h"
diff --git a/hw/timer/a9gtimer.c b/hw/timer/a9gtimer.c
index 75f1867..4c634c8 100644
--- a/hw/timer/a9gtimer.c
+++ b/hw/timer/a9gtimer.c
@@ -31,7 +31,7 @@
#include "qemu/bitops.h"
#include "qemu/log.h"
#include "qemu/module.h"
-#include "qom/cpu.h"
+#include "hw/core/cpu.h"
#ifndef A9_GTIMER_ERR_DEBUG
#define A9_GTIMER_ERR_DEBUG 0
diff --git a/hw/timer/arm_mptimer.c b/hw/timer/arm_mptimer.c
index 983e618..9f63abe 100644
--- a/hw/timer/arm_mptimer.c
+++ b/hw/timer/arm_mptimer.c
@@ -29,7 +29,7 @@
#include "qapi/error.h"
#include "qemu/main-loop.h"
#include "qemu/module.h"
-#include "qom/cpu.h"
+#include "hw/core/cpu.h"
#define PTIMER_POLICY \
(PTIMER_POLICY_WRAP_AFTER_ONE_PERIOD | \
diff --git a/include/exec/cpu-all.h b/include/exec/cpu-all.h
index 536ea58..8323094 100644
--- a/include/exec/cpu-all.h
+++ b/include/exec/cpu-all.h
@@ -22,7 +22,7 @@
#include "exec/cpu-common.h"
#include "exec/memory.h"
#include "qemu/thread.h"
-#include "qom/cpu.h"
+#include "hw/core/cpu.h"
#include "qemu/rcu.h"
#define EXCP_INTERRUPT 0x10000 /* async interruption */
diff --git a/include/exec/cpu-defs.h b/include/exec/cpu-defs.h
index 57a9a4f..189709b 100644
--- a/include/exec/cpu-defs.h
+++ b/include/exec/cpu-defs.h
@@ -32,7 +32,7 @@
#include "exec/hwaddr.h"
#endif
#include "exec/memattrs.h"
-#include "qom/cpu.h"
+#include "hw/core/cpu.h"
#include "cpu-param.h"
diff --git a/include/exec/log.h b/include/exec/log.h
index de067f1..e2cfd43 100644
--- a/include/exec/log.h
+++ b/include/exec/log.h
@@ -2,7 +2,7 @@
#define QEMU_EXEC_LOG_H
#include "qemu/log.h"
-#include "qom/cpu.h"
+#include "hw/core/cpu.h"
#include "disas/disas.h"
/* cpu_dump_state() logging functions: */
diff --git a/include/hw/boards.h b/include/hw/boards.h
index 60d6921..ced8610 100644
--- a/include/hw/boards.h
+++ b/include/hw/boards.h
@@ -9,7 +9,7 @@
#include "qapi/qapi-types-machine.h"
#include "qemu/module.h"
#include "qom/object.h"
-#include "qom/cpu.h"
+#include "hw/core/cpu.h"
/**
* memory_region_allocate_system_memory - Allocate a board's main memory
diff --git a/include/qom/cpu.h b/include/hw/core/cpu.h
index 77fca95..77fca95 100644
--- a/include/qom/cpu.h
+++ b/include/hw/core/cpu.h
diff --git a/include/hw/ppc/openpic.h b/include/hw/ppc/openpic.h
index ec16897..db0d29e 100644
--- a/include/hw/ppc/openpic.h
+++ b/include/hw/ppc/openpic.h
@@ -2,7 +2,7 @@
#define OPENPIC_H
#include "hw/sysbus.h"
-#include "qom/cpu.h"
+#include "hw/core/cpu.h"
#define MAX_CPU 32
#define MAX_MSI 8
diff --git a/include/sysemu/hw_accel.h b/include/sysemu/hw_accel.h
index d2ddfb5..0ec2372 100644
--- a/include/sysemu/hw_accel.h
+++ b/include/sysemu/hw_accel.h
@@ -11,7 +11,7 @@
#ifndef QEMU_HW_ACCEL_H
#define QEMU_HW_ACCEL_H
-#include "qom/cpu.h"
+#include "hw/core/cpu.h"
#include "sysemu/hax.h"
#include "sysemu/kvm.h"
#include "sysemu/whpx.h"
diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h
index c8ea412..909bcd7 100644
--- a/include/sysemu/kvm.h
+++ b/include/sysemu/kvm.h
@@ -15,7 +15,7 @@
#define QEMU_KVM_H
#include "qemu/queue.h"
-#include "qom/cpu.h"
+#include "hw/core/cpu.h"
#include "exec/memattrs.h"
#ifdef NEED_CPU_H
diff --git a/monitor/hmp-cmds.c b/monitor/hmp-cmds.c
index e4d4043..b2551c1 100644
--- a/monitor/hmp-cmds.c
+++ b/monitor/hmp-cmds.c
@@ -25,7 +25,6 @@
#include "qemu/timer.h"
#include "qemu/sockets.h"
#include "monitor/monitor-internal.h"
-#include "monitor/qdev.h"
#include "qapi/error.h"
#include "qapi/clone-visitor.h"
#include "qapi/opts-visitor.h"
@@ -35,7 +34,6 @@
#include "qapi/qapi-commands-migration.h"
#include "qapi/qapi-commands-misc.h"
#include "qapi/qapi-commands-net.h"
-#include "qapi/qapi-commands-qdev.h"
#include "qapi/qapi-commands-rocker.h"
#include "qapi/qapi-commands-run-state.h"
#include "qapi/qapi-commands-tpm.h"
@@ -2167,23 +2165,6 @@ void hmp_migrate(Monitor *mon, const QDict *qdict)
}
}
-void hmp_device_add(Monitor *mon, const QDict *qdict)
-{
- Error *err = NULL;
-
- qmp_device_add((QDict *)qdict, NULL, &err);
- hmp_handle_error(mon, &err);
-}
-
-void hmp_device_del(Monitor *mon, const QDict *qdict)
-{
- const char *id = qdict_get_str(qdict, "id");
- Error *err = NULL;
-
- qmp_device_del(id, &err);
- hmp_handle_error(mon, &err);
-}
-
void hmp_netdev_add(Monitor *mon, const QDict *qdict)
{
Error *err = NULL;
diff --git a/monitor/qmp.c b/monitor/qmp.c
index e1b1962..9d9e5d8 100644
--- a/monitor/qmp.c
+++ b/monitor/qmp.c
@@ -97,7 +97,7 @@ void qmp_send_response(MonitorQMP *mon, const QDict *rsp)
}
/*
- * Emit QMP response @rsp with ID @id to @mon.
+ * Emit QMP response @rsp to @mon.
* Null @rsp can only happen for commands with QCO_NO_SUCCESS_RESP.
* Nothing is emitted then.
*/
diff --git a/qapi/common.json b/qapi/common.json
index 3d4e8de..7b9cbcd 100644
--- a/qapi/common.json
+++ b/qapi/common.json
@@ -144,28 +144,3 @@
##
{ 'enum': 'PCIELinkWidth',
'data': [ '1', '2', '4', '8', '12', '16', '32' ] }
-
-##
-# @SysEmuTarget:
-#
-# The comprehensive enumeration of QEMU system emulation ("softmmu")
-# targets. Run "./configure --help" in the project root directory, and
-# look for the *-softmmu targets near the "--target-list" option. The
-# individual target constants are not documented here, for the time
-# being.
-#
-# Notes: The resulting QMP strings can be appended to the "qemu-system-"
-# prefix to produce the corresponding QEMU executable name. This
-# is true even for "qemu-system-x86_64".
-#
-# ppcemb: dropped in 3.1
-#
-# Since: 3.0
-##
-{ 'enum' : 'SysEmuTarget',
- 'data' : [ 'aarch64', 'alpha', 'arm', 'cris', 'hppa', 'i386', 'lm32',
- 'm68k', 'microblaze', 'microblazeel', 'mips', 'mips64',
- 'mips64el', 'mipsel', 'moxie', 'nios2', 'or1k', 'ppc',
- 'ppc64', 'riscv32', 'riscv64', 's390x', 'sh4',
- 'sh4eb', 'sparc', 'sparc64', 'tricore', 'unicore32',
- 'x86_64', 'xtensa', 'xtensaeb' ] }
diff --git a/qapi/machine.json b/qapi/machine.json
index 6db8a7e..de5c742 100644
--- a/qapi/machine.json
+++ b/qapi/machine.json
@@ -7,7 +7,30 @@
# = Machines
##
-{ 'include': 'common.json' }
+##
+# @SysEmuTarget:
+#
+# The comprehensive enumeration of QEMU system emulation ("softmmu")
+# targets. Run "./configure --help" in the project root directory, and
+# look for the *-softmmu targets near the "--target-list" option. The
+# individual target constants are not documented here, for the time
+# being.
+#
+# Notes: The resulting QMP strings can be appended to the "qemu-system-"
+# prefix to produce the corresponding QEMU executable name. This
+# is true even for "qemu-system-x86_64".
+#
+# ppcemb: dropped in 3.1
+#
+# Since: 3.0
+##
+{ 'enum' : 'SysEmuTarget',
+ 'data' : [ 'aarch64', 'alpha', 'arm', 'cris', 'hppa', 'i386', 'lm32',
+ 'm68k', 'microblaze', 'microblazeel', 'mips', 'mips64',
+ 'mips64el', 'mipsel', 'moxie', 'nios2', 'or1k', 'ppc',
+ 'ppc64', 'riscv32', 'riscv64', 's390x', 'sh4',
+ 'sh4eb', 'sparc', 'sparc64', 'tricore', 'unicore32',
+ 'x86_64', 'xtensa', 'xtensaeb' ] }
##
# @CpuInfoArch:
@@ -369,6 +392,29 @@
{ 'command': 'query-current-machine', 'returns': 'CurrentMachineParams' }
##
+# @TargetInfo:
+#
+# Information describing the QEMU target.
+#
+# @arch: the target architecture
+#
+# Since: 1.2.0
+##
+{ 'struct': 'TargetInfo',
+ 'data': { 'arch': 'SysEmuTarget' } }
+
+##
+# @query-target:
+#
+# Return information about the target for this QEMU
+#
+# Returns: TargetInfo
+#
+# Since: 1.2.0
+##
+{ 'command': 'query-target', 'returns': 'TargetInfo' }
+
+##
# @NumaOptionsType:
#
# @node: NUMA nodes configuration
diff --git a/qapi/misc.json b/qapi/misc.json
index a7fba72..6bd11f5 100644
--- a/qapi/misc.json
+++ b/qapi/misc.json
@@ -1342,29 +1342,6 @@
{ 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
##
-# @TargetInfo:
-#
-# Information describing the QEMU target.
-#
-# @arch: the target architecture
-#
-# Since: 1.2.0
-##
-{ 'struct': 'TargetInfo',
- 'data': { 'arch': 'SysEmuTarget' } }
-
-##
-# @query-target:
-#
-# Return information about the target for this QEMU
-#
-# Returns: TargetInfo
-#
-# Since: 1.2.0
-##
-{ 'command': 'query-target', 'returns': 'TargetInfo' }
-
-##
# @AcpiTableOptions:
#
# Specify an ACPI table on the command line to load.
diff --git a/qdev-monitor.c b/qdev-monitor.c
index a0003bf..8fe5c2c 100644
--- a/qdev-monitor.c
+++ b/qdev-monitor.c
@@ -19,6 +19,7 @@
#include "qemu/osdep.h"
#include "hw/sysbus.h"
+#include "monitor/hmp.h"
#include "monitor/monitor.h"
#include "monitor/qdev.h"
#include "sysemu/arch_init.h"
@@ -844,6 +845,23 @@ void qmp_device_del(const char *id, Error **errp)
}
}
+void hmp_device_add(Monitor *mon, const QDict *qdict)
+{
+ Error *err = NULL;
+
+ qmp_device_add((QDict *)qdict, NULL, &err);
+ hmp_handle_error(mon, &err);
+}
+
+void hmp_device_del(Monitor *mon, const QDict *qdict)
+{
+ const char *id = qdict_get_str(qdict, "id");
+ Error *err = NULL;
+
+ qmp_device_del(id, &err);
+ hmp_handle_error(mon, &err);
+}
+
BlockBackend *blk_by_qdev_id(const char *id, Error **errp)
{
DeviceState *dev;
diff --git a/qom/Makefile.objs b/qom/Makefile.objs
index aae478f..f9d7735 100644
--- a/qom/Makefile.objs
+++ b/qom/Makefile.objs
@@ -1,5 +1,4 @@
qom-obj-y = object.o container.o qom-qobject.o
qom-obj-y += object_interfaces.o
-common-obj-y = cpu.o
common-obj-$(CONFIG_SOFTMMU) += qom-hmp-cmds.o qom-qmp-cmds.o
diff --git a/target/alpha/cpu-qom.h b/target/alpha/cpu-qom.h
index bae4945..6f0a0ad 100644
--- a/target/alpha/cpu-qom.h
+++ b/target/alpha/cpu-qom.h
@@ -20,7 +20,7 @@
#ifndef QEMU_ALPHA_CPU_QOM_H
#define QEMU_ALPHA_CPU_QOM_H
-#include "qom/cpu.h"
+#include "hw/core/cpu.h"
#define TYPE_ALPHA_CPU "alpha-cpu"
diff --git a/target/arm/cpu-qom.h b/target/arm/cpu-qom.h
index 2049fa9..7f5b244 100644
--- a/target/arm/cpu-qom.h
+++ b/target/arm/cpu-qom.h
@@ -20,7 +20,7 @@
#ifndef QEMU_ARM_CPU_QOM_H
#define QEMU_ARM_CPU_QOM_H
-#include "qom/cpu.h"
+#include "hw/core/cpu.h"
struct arm_boot_info;
diff --git a/target/cris/cpu-qom.h b/target/cris/cpu-qom.h
index 7556e9f..308c1f9 100644
--- a/target/cris/cpu-qom.h
+++ b/target/cris/cpu-qom.h
@@ -20,7 +20,7 @@
#ifndef QEMU_CRIS_CPU_QOM_H
#define QEMU_CRIS_CPU_QOM_H
-#include "qom/cpu.h"
+#include "hw/core/cpu.h"
#define TYPE_CRIS_CPU "cris-cpu"
diff --git a/target/hppa/cpu-qom.h b/target/hppa/cpu-qom.h
index 9084e47..6367dc4 100644
--- a/target/hppa/cpu-qom.h
+++ b/target/hppa/cpu-qom.h
@@ -20,7 +20,7 @@
#ifndef QEMU_HPPA_CPU_QOM_H
#define QEMU_HPPA_CPU_QOM_H
-#include "qom/cpu.h"
+#include "hw/core/cpu.h"
#define TYPE_HPPA_CPU "hppa-cpu"
diff --git a/target/hppa/int_helper.c b/target/hppa/int_helper.c
index 89241c3..462747b 100644
--- a/target/hppa/int_helper.c
+++ b/target/hppa/int_helper.c
@@ -22,7 +22,7 @@
#include "qemu/log.h"
#include "cpu.h"
#include "exec/helper-proto.h"
-#include "qom/cpu.h"
+#include "hw/core/cpu.h"
#ifndef CONFIG_USER_ONLY
static void eval_interrupt(HPPACPU *cpu)
diff --git a/target/hppa/mem_helper.c b/target/hppa/mem_helper.c
index b12c5b5..5a465db 100644
--- a/target/hppa/mem_helper.c
+++ b/target/hppa/mem_helper.c
@@ -21,7 +21,7 @@
#include "cpu.h"
#include "exec/exec-all.h"
#include "exec/helper-proto.h"
-#include "qom/cpu.h"
+#include "hw/core/cpu.h"
#include "trace.h"
#ifdef CONFIG_USER_ONLY
diff --git a/target/i386/cpu-qom.h b/target/i386/cpu-qom.h
index 1a52f02..0efab2f 100644
--- a/target/i386/cpu-qom.h
+++ b/target/i386/cpu-qom.h
@@ -20,7 +20,7 @@
#ifndef QEMU_I386_CPU_QOM_H
#define QEMU_I386_CPU_QOM_H
-#include "qom/cpu.h"
+#include "hw/core/cpu.h"
#include "qemu/notify.h"
#ifdef TARGET_X86_64
diff --git a/target/lm32/cpu-qom.h b/target/lm32/cpu-qom.h
index b423d25..dc9ac9a 100644
--- a/target/lm32/cpu-qom.h
+++ b/target/lm32/cpu-qom.h
@@ -20,7 +20,7 @@
#ifndef QEMU_LM32_CPU_QOM_H
#define QEMU_LM32_CPU_QOM_H
-#include "qom/cpu.h"
+#include "hw/core/cpu.h"
#define TYPE_LM32_CPU "lm32-cpu"
diff --git a/target/m68k/cpu-qom.h b/target/m68k/cpu-qom.h
index 0c15725..b56da8a 100644
--- a/target/m68k/cpu-qom.h
+++ b/target/m68k/cpu-qom.h
@@ -20,7 +20,7 @@
#ifndef QEMU_M68K_CPU_QOM_H
#define QEMU_M68K_CPU_QOM_H
-#include "qom/cpu.h"
+#include "hw/core/cpu.h"
#define TYPE_M68K_CPU "m68k-cpu"
diff --git a/target/microblaze/cpu-qom.h b/target/microblaze/cpu-qom.h
index 1a61db7..49b07cc 100644
--- a/target/microblaze/cpu-qom.h
+++ b/target/microblaze/cpu-qom.h
@@ -20,7 +20,7 @@
#ifndef QEMU_MICROBLAZE_CPU_QOM_H
#define QEMU_MICROBLAZE_CPU_QOM_H
-#include "qom/cpu.h"
+#include "hw/core/cpu.h"
#define TYPE_MICROBLAZE_CPU "microblaze-cpu"
diff --git a/target/mips/cpu-qom.h b/target/mips/cpu-qom.h
index ee58606..a430c0f 100644
--- a/target/mips/cpu-qom.h
+++ b/target/mips/cpu-qom.h
@@ -20,7 +20,7 @@
#ifndef QEMU_MIPS_CPU_QOM_H
#define QEMU_MIPS_CPU_QOM_H
-#include "qom/cpu.h"
+#include "hw/core/cpu.h"
#ifdef TARGET_MIPS64
#define TYPE_MIPS_CPU "mips64-cpu"
diff --git a/target/moxie/cpu.h b/target/moxie/cpu.h
index 91ef2dc..01dca54 100644
--- a/target/moxie/cpu.h
+++ b/target/moxie/cpu.h
@@ -46,7 +46,7 @@ typedef struct CPUMoxieState {
struct {} end_reset_fields;
} CPUMoxieState;
-#include "qom/cpu.h"
+#include "hw/core/cpu.h"
#define TYPE_MOXIE_CPU "moxie-cpu"
diff --git a/target/nios2/cpu.h b/target/nios2/cpu.h
index 5d44b76..361b06f 100644
--- a/target/nios2/cpu.h
+++ b/target/nios2/cpu.h
@@ -22,7 +22,7 @@
#define NIOS2_CPU_H
#include "exec/cpu-defs.h"
-#include "qom/cpu.h"
+#include "hw/core/cpu.h"
typedef struct CPUNios2State CPUNios2State;
#if !defined(CONFIG_USER_ONLY)
diff --git a/target/openrisc/cpu.h b/target/openrisc/cpu.h
index 61ade1d..561f0f7 100644
--- a/target/openrisc/cpu.h
+++ b/target/openrisc/cpu.h
@@ -21,7 +21,7 @@
#define OPENRISC_CPU_H
#include "exec/cpu-defs.h"
-#include "qom/cpu.h"
+#include "hw/core/cpu.h"
/* cpu_openrisc_map_address_* in CPUOpenRISCTLBContext need this decl. */
struct OpenRISCCPU;
diff --git a/target/ppc/cpu-qom.h b/target/ppc/cpu-qom.h
index 5769fb7..7ffdb0a 100644
--- a/target/ppc/cpu-qom.h
+++ b/target/ppc/cpu-qom.h
@@ -20,7 +20,7 @@
#ifndef QEMU_PPC_CPU_QOM_H
#define QEMU_PPC_CPU_QOM_H
-#include "qom/cpu.h"
+#include "hw/core/cpu.h"
#ifdef TARGET_PPC64
#define TYPE_POWERPC_CPU "powerpc64-cpu"
diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h
index 240b31e..18d91d0 100644
--- a/target/riscv/cpu.h
+++ b/target/riscv/cpu.h
@@ -20,7 +20,7 @@
#ifndef RISCV_CPU_H
#define RISCV_CPU_H
-#include "qom/cpu.h"
+#include "hw/core/cpu.h"
#include "exec/cpu-defs.h"
#include "fpu/softfloat-types.h"
diff --git a/target/s390x/cpu-qom.h b/target/s390x/cpu-qom.h
index b46217d..b809ec8 100644
--- a/target/s390x/cpu-qom.h
+++ b/target/s390x/cpu-qom.h
@@ -20,7 +20,7 @@
#ifndef QEMU_S390_CPU_QOM_H
#define QEMU_S390_CPU_QOM_H
-#include "qom/cpu.h"
+#include "hw/core/cpu.h"
#define TYPE_S390_CPU "s390x-cpu"
diff --git a/target/s390x/cpu_models.h b/target/s390x/cpu_models.h
index 174a99e..88bd01a6 100644
--- a/target/s390x/cpu_models.h
+++ b/target/s390x/cpu_models.h
@@ -15,7 +15,7 @@
#include "cpu_features.h"
#include "gen-features.h"
-#include "qom/cpu.h"
+#include "hw/core/cpu.h"
/* static CPU definition */
struct S390CPUDef {
diff --git a/target/sh4/cpu-qom.h b/target/sh4/cpu-qom.h
index 0f9fb4d..0c56d05 100644
--- a/target/sh4/cpu-qom.h
+++ b/target/sh4/cpu-qom.h
@@ -20,7 +20,7 @@
#ifndef QEMU_SUPERH_CPU_QOM_H
#define QEMU_SUPERH_CPU_QOM_H
-#include "qom/cpu.h"
+#include "hw/core/cpu.h"
#define TYPE_SUPERH_CPU "superh-cpu"
diff --git a/target/sparc/cpu-qom.h b/target/sparc/cpu-qom.h
index af6d57a..7442e27 100644
--- a/target/sparc/cpu-qom.h
+++ b/target/sparc/cpu-qom.h
@@ -20,7 +20,7 @@
#ifndef QEMU_SPARC_CPU_QOM_H
#define QEMU_SPARC_CPU_QOM_H
-#include "qom/cpu.h"
+#include "hw/core/cpu.h"
#ifdef TARGET_SPARC64
#define TYPE_SPARC_CPU "sparc64-cpu"
diff --git a/target/tilegx/cpu.h b/target/tilegx/cpu.h
index 6fcec06..9cbec24 100644
--- a/target/tilegx/cpu.h
+++ b/target/tilegx/cpu.h
@@ -94,7 +94,7 @@ typedef struct CPUTLGState {
struct {} end_reset_fields;
} CPUTLGState;
-#include "qom/cpu.h"
+#include "hw/core/cpu.h"
#define TYPE_TILEGX_CPU "tilegx-cpu"
diff --git a/target/tricore/cpu-qom.h b/target/tricore/cpu-qom.h
index 93c9d77..7c1e130 100644
--- a/target/tricore/cpu-qom.h
+++ b/target/tricore/cpu-qom.h
@@ -18,7 +18,7 @@
#ifndef QEMU_TRICORE_CPU_QOM_H
#define QEMU_TRICORE_CPU_QOM_H
-#include "qom/cpu.h"
+#include "hw/core/cpu.h"
#define TYPE_TRICORE_CPU "tricore-cpu"
diff --git a/target/unicore32/cpu-qom.h b/target/unicore32/cpu-qom.h
index bc68e78..7dd0451 100644
--- a/target/unicore32/cpu-qom.h
+++ b/target/unicore32/cpu-qom.h
@@ -11,7 +11,7 @@
#ifndef QEMU_UC32_CPU_QOM_H
#define QEMU_UC32_CPU_QOM_H
-#include "qom/cpu.h"
+#include "hw/core/cpu.h"
#define TYPE_UNICORE32_CPU "unicore32-cpu"
diff --git a/target/xtensa/cpu-qom.h b/target/xtensa/cpu-qom.h
index 403bd95..9ac5424 100644
--- a/target/xtensa/cpu-qom.h
+++ b/target/xtensa/cpu-qom.h
@@ -29,7 +29,7 @@
#ifndef QEMU_XTENSA_CPU_QOM_H
#define QEMU_XTENSA_CPU_QOM_H
-#include "qom/cpu.h"
+#include "hw/core/cpu.h"
#define TYPE_XTENSA_CPU "xtensa-cpu"
diff --git a/trace-events b/trace-events
index aeea3c2..823a4ae 100644
--- a/trace-events
+++ b/trace-events
@@ -129,7 +129,7 @@ vcpu guest_cpu_enter(void)
# Targets: all
vcpu guest_cpu_exit(void)
-# qom/cpu.c
+# hw/core/cpu.c
# Reset the state of a virtual (guest) CPU
#
diff --git a/trace/control-vcpu.h b/trace/control-vcpu.h
index a8f1035..0f98ebe 100644
--- a/trace/control-vcpu.h
+++ b/trace/control-vcpu.h
@@ -12,7 +12,7 @@
#include "control.h"
#include "event-internal.h"
-#include "qom/cpu.h"
+#include "hw/core/cpu.h"
/**
* trace_event_get_vcpu_state:
diff --git a/ui/cocoa.m b/ui/cocoa.m
index f023d51..f12e21d 100644
--- a/ui/cocoa.m
+++ b/ui/cocoa.m
@@ -40,7 +40,7 @@
#include "qemu/main-loop.h"
#include "qemu/module.h"
#include <Carbon/Carbon.h>
-#include "qom/cpu.h"
+#include "hw/core/cpu.h"
#ifndef MAC_OS_X_VERSION_10_5
#define MAC_OS_X_VERSION_10_5 1050