similarity index 99%
rename from include/exec/ram_addr.h
rename to include/sysemu/ram_addr.h
@@ -16,10 +16,13 @@
* The functions declared here will be removed soon.
*/
-#ifndef RAM_ADDR_H
-#define RAM_ADDR_H
+#ifndef SYSEMU_RAM_ADDR_H
+#define SYSEMU_RAM_ADDR_H
+
+#ifdef CONFIG_USER_ONLY
+#error Cannot include sysemu specific header from user emulation
+#endif
-#ifndef CONFIG_USER_ONLY
#include "cpu.h"
#include "sysemu/xen.h"
#include "sysemu/tcg.h"
@@ -513,5 +516,5 @@ uint64_t cpu_physical_memory_sync_dirty_bitmap(RAMBlock *rb,
return num_dirty;
}
-#endif
+
#endif
@@ -32,7 +32,7 @@
#include "sysemu/cpus.h"
#include "qemu/bswap.h"
#include "exec/sysemu/memory.h"
-#include "exec/ram_addr.h"
+#include "sysemu/ram_addr.h"
#include "qemu/event_notifier.h"
#include "qemu/main-loop.h"
#include "trace.h"
@@ -26,7 +26,7 @@
#include "exec/sysemu/cputlb.h"
#include "exec/tb-hash.h"
#include "exec/sysemu/memory-internal.h"
-#include "exec/ram_addr.h"
+#include "sysemu/ram_addr.h"
#include "tcg/tcg.h"
#include "qemu/error-report.h"
#include "exec/log.h"
@@ -44,7 +44,7 @@
#endif
#else /* !CONFIG_USER_ONLY */
#include "exec/sysemu/cputlb.h"
-#include "exec/ram_addr.h"
+#include "sysemu/ram_addr.h"
#endif /* CONFIG_USER_ONLY */
#include "exec/tb-hash.h"
@@ -69,7 +69,7 @@
#include "hw/virtio/virtio-scsi.h"
#include "hw/virtio/vhost-scsi-common.h"
-#include "exec/ram_addr.h"
+#include "sysemu/ram_addr.h"
#include "hw/usb.h"
#include "qemu/config-file.h"
#include "qemu/error-report.h"
@@ -27,7 +27,7 @@
#include "qapi/error.h"
#include "qapi/visitor.h"
#include "sysemu/hw_accel.h"
-#include "exec/ram_addr.h"
+#include "sysemu/ram_addr.h"
#include "target/ppc/cpu.h"
#include "target/ppc/mmu-hash64.h"
#include "cpu-models.h"
@@ -34,7 +34,7 @@
#include "hw/pci/pci_host.h"
#include "hw/ppc/spapr.h"
#include "hw/pci-host/spapr.h"
-#include "exec/ram_addr.h"
+#include "sysemu/ram_addr.h"
#include <libfdt.h>
#include "trace.h"
#include "qemu/error-report.h"
@@ -12,7 +12,7 @@
#include "qemu-common.h"
#include "hw/remote/memory.h"
-#include "exec/ram_addr.h"
+#include "sysemu/ram_addr.h"
#include "qapi/error.h"
static void remote_sysmem_reset(void)
@@ -14,7 +14,7 @@
#include "qemu/range.h"
#include "exec/sysemu/memory.h"
#include "exec/cpu-common.h"
-#include "exec/ram_addr.h"
+#include "sysemu/ram_addr.h"
#include "qapi/error.h"
#include "hw/remote/mpqemu-link.h"
#include "hw/remote/proxy-memory-listener.h"
@@ -15,7 +15,7 @@
#include "hw/s390x/storage-attributes.h"
#include "qemu/error-report.h"
#include "sysemu/kvm.h"
-#include "exec/ram_addr.h"
+#include "sysemu/ram_addr.h"
#include "kvm_s390x.h"
Object *kvm_s390_stattrib_create(void)
@@ -15,7 +15,7 @@
#include "migration/register.h"
#include "hw/s390x/storage-attributes.h"
#include "qemu/error-report.h"
-#include "exec/ram_addr.h"
+#include "sysemu/ram_addr.h"
#include "qapi/error.h"
#include "qapi/qmp/qdict.h"
@@ -13,7 +13,7 @@
#include "qemu/osdep.h"
#include "qapi/error.h"
-#include "exec/ram_addr.h"
+#include "sysemu/ram_addr.h"
#include "hw/s390x/s390-virtio-hcall.h"
#include "hw/s390x/sclp.h"
#include "hw/s390x/s390_flic.h"
@@ -29,7 +29,7 @@
#include "hw/vfio/vfio.h"
#include "exec/sysemu/address-spaces.h"
#include "exec/sysemu/memory.h"
-#include "exec/ram_addr.h"
+#include "sysemu/ram_addr.h"
#include "hw/hw.h"
#include "qemu/error-report.h"
#include "qemu/main-loop.h"
@@ -23,7 +23,7 @@
#include "migration/misc.h"
#include "qapi/error.h"
#include "exec/ramlist.h"
-#include "exec/ram_addr.h"
+#include "sysemu/ram_addr.h"
#include "pci.h"
#include "trace.h"
#include "hw/hw.h"
@@ -14,7 +14,7 @@
#include "hw/vfio/vfio-common.h"
#include "hw/hw.h"
-#include "exec/ram_addr.h"
+#include "sysemu/ram_addr.h"
#include "qemu/error-report.h"
#include "qapi/error.h"
#include "trace.h"
@@ -25,7 +25,7 @@
#include "hw/virtio/virtio-mem.h"
#include "qapi/error.h"
#include "qapi/visitor.h"
-#include "exec/ram_addr.h"
+#include "sysemu/ram_addr.h"
#include "migration/misc.h"
#include "hw/boards.h"
#include "hw/qdev-properties.h"
@@ -45,7 +45,7 @@
#include "qapi/qapi-events-migration.h"
#include "qapi/qmp/qerror.h"
#include "trace.h"
-#include "exec/ram_addr.h"
+#include "sysemu/ram_addr.h"
#include "exec/target_page.h"
#include "qemu/rcu_queue.h"
#include "migration/colo.h"
@@ -38,7 +38,7 @@
#include "qemu/plugin.h"
#include "tcg/tcg.h"
#include "exec/exec-all.h"
-#include "exec/ram_addr.h"
+#include "sysemu/ram_addr.h"
#include "disas/disas.h"
#include "plugin.h"
#ifndef CONFIG_USER_ONLY
@@ -26,7 +26,7 @@
#include "trace.h"
#include "exec/sysemu/memory-internal.h"
-#include "exec/ram_addr.h"
+#include "sysemu/ram_addr.h"
#include "sysemu/kvm.h"
#include "sysemu/runstate.h"
#include "sysemu/tcg.h"
@@ -59,7 +59,7 @@
#include "sysemu/replay.h"
#include "exec/sysemu/memory-internal.h"
-#include "exec/ram_addr.h"
+#include "sysemu/ram_addr.h"
#include "exec/log.h"
#include "qemu/pmem.h"
@@ -21,7 +21,7 @@
#include "cpu.h"
#include "internals.h"
#include "exec/exec-all.h"
-#include "exec/ram_addr.h"
+#include "sysemu/ram_addr.h"
#include "exec/cpu_ldst.h"
#include "exec/helper-proto.h"
#include "qapi/error.h"
@@ -43,7 +43,7 @@
#include "trace.h"
#include "exec/gdbstub.h"
#include "exec/memattrs.h"
-#include "exec/ram_addr.h"
+#include "sysemu/ram_addr.h"
#include "sysemu/hostmem.h"
#include "qemu/cutils.h"
#include "qemu/main-loop.h"
@@ -42,7 +42,7 @@
#include "sysemu/runstate.h"
#include "sysemu/device_tree.h"
#include "exec/gdbstub.h"
-#include "exec/ram_addr.h"
+#include "sysemu/ram_addr.h"
#include "trace.h"
#include "hw/s390x/s390-pci-inst.h"
#include "hw/s390x/s390-pci-bus.h"
@@ -2401,7 +2401,7 @@ S: Supported
F: include/sysemu/ioport.h
F: include/exec/memop.h
F: include/exec/sysemu/memory.h
-F: include/exec/ram_addr.h
+F: include/sysemu/ram_addr.h
F: include/exec/ramblock.h
F: softmmu/dma-helpers.c
F: softmmu/ioport.c
To make it clearer the ram_addr.h header is sysemu specific, move it to the sysemu/ directory. Patch created mechanically using: $ sed -i s,exec/ram_addr.h,sysemu/ram_addr.h, $(git grep -l exec/ram_addr.h) Then the #ifdef'ry conditional on CONFIG_USER_ONLY has been replaced by an #error. Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org> --- include/{exec => sysemu}/ram_addr.h | 11 +++++++---- accel/kvm/kvm-all.c | 2 +- accel/tcg/cputlb.c | 2 +- accel/tcg/translate-all.c | 2 +- hw/ppc/spapr.c | 2 +- hw/ppc/spapr_caps.c | 2 +- hw/ppc/spapr_pci.c | 2 +- hw/remote/memory.c | 2 +- hw/remote/proxy-memory-listener.c | 2 +- hw/s390x/s390-stattrib-kvm.c | 2 +- hw/s390x/s390-stattrib.c | 2 +- hw/s390x/s390-virtio-ccw.c | 2 +- hw/vfio/common.c | 2 +- hw/vfio/migration.c | 2 +- hw/vfio/spapr.c | 2 +- hw/virtio/virtio-mem.c | 2 +- migration/ram.c | 2 +- plugins/api.c | 2 +- softmmu/memory.c | 2 +- softmmu/physmem.c | 2 +- target/arm/mte_helper.c | 2 +- target/ppc/kvm.c | 2 +- target/s390x/kvm.c | 2 +- MAINTAINERS | 2 +- 24 files changed, 30 insertions(+), 27 deletions(-) rename include/{exec => sysemu}/ram_addr.h (99%)