similarity index 94%
rename from include/exec/memory-internal.h
rename to include/exec/sysemu/memory-internal.h
@@ -20,9 +20,12 @@
#ifndef MEMORY_INTERNAL_H
#define MEMORY_INTERNAL_H
+#ifdef CONFIG_USER_ONLY
+#error Cannot include sysemu specific header from user emulation
+#endif
+
#include "cpu.h"
-#ifndef CONFIG_USER_ONLY
static inline AddressSpaceDispatch *flatview_to_dispatch(FlatView *fv)
{
return fv->dispatch;
@@ -49,5 +52,5 @@ void address_space_dispatch_free(AddressSpaceDispatch *d);
void mtree_print_dispatch(struct AddressSpaceDispatch *d,
MemoryRegion *root);
-#endif
+
#endif
@@ -25,7 +25,7 @@
#include "exec/cpu_ldst.h"
#include "exec/sysemu/cputlb.h"
#include "exec/tb-hash.h"
-#include "exec/memory-internal.h"
+#include "exec/sysemu/memory-internal.h"
#include "exec/ram_addr.h"
#include "tcg/tcg.h"
#include "qemu/error-report.h"
@@ -13,7 +13,7 @@
#include "qemu/osdep.h"
#include "exec/memop.h"
-#include "exec/memory-internal.h"
+#include "exec/sysemu/memory-internal.h"
#include "qemu/error-report.h"
#include "sysemu/hw_accel.h"
#include "hw/s390x/s390-pci-inst.h"
@@ -25,7 +25,7 @@
#include "qom/object.h"
#include "trace.h"
-#include "exec/memory-internal.h"
+#include "exec/sysemu/memory-internal.h"
#include "exec/ram_addr.h"
#include "sysemu/kvm.h"
#include "sysemu/runstate.h"
@@ -58,7 +58,7 @@
#include "exec/translate-all.h"
#include "sysemu/replay.h"
-#include "exec/memory-internal.h"
+#include "exec/sysemu/memory-internal.h"
#include "exec/ram_addr.h"
#include "exec/log.h"
@@ -2407,7 +2407,7 @@ F: softmmu/dma-helpers.c
F: softmmu/ioport.c
F: softmmu/memory.c
F: softmmu/physmem.c
-F: include/exec/memory-internal.h
+F: include/exec/sysemu/memory-internal.h
F: scripts/coccinelle/memory-region-housekeeping.cocci
SPICE
To make it clearer the memory-internal.h header is sysemu specific, move it to the sysemu/ directory. Patch created mechanically using: $ sed -i s,exec/memory-internal.h,exec/sysemu/memory-internal.h, $(git grep -l exec/memory-internal.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}/memory-internal.h | 7 +++++-- accel/tcg/cputlb.c | 2 +- hw/s390x/s390-pci-inst.c | 2 +- softmmu/memory.c | 2 +- softmmu/physmem.c | 2 +- MAINTAINERS | 2 +- 6 files changed, 10 insertions(+), 7 deletions(-) rename include/exec/{ => sysemu}/memory-internal.h (94%)