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é <f4...@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%) diff --git a/include/exec/memory-internal.h b/include/exec/sysemu/memory-internal.h similarity index 94% rename from include/exec/memory-internal.h rename to include/exec/sysemu/memory-internal.h index 9fcc2af25c8..f3459d687ad 100644 --- a/include/exec/memory-internal.h +++ b/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 diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index 9ecc45180a5..14a4ee4ed63 100644 --- a/accel/tcg/cputlb.c +++ b/accel/tcg/cputlb.c @@ -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" diff --git a/hw/s390x/s390-pci-inst.c b/hw/s390x/s390-pci-inst.c index 9ec277d50e7..0c88787d134 100644 --- a/hw/s390x/s390-pci-inst.c +++ b/hw/s390x/s390-pci-inst.c @@ -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" diff --git a/softmmu/memory.c b/softmmu/memory.c index d5ab46d76a9..cdc935cdd27 100644 --- a/softmmu/memory.c +++ b/softmmu/memory.c @@ -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" diff --git a/softmmu/physmem.c b/softmmu/physmem.c index 20e69b09d68..31e490185f3 100644 --- a/softmmu/physmem.c +++ b/softmmu/physmem.c @@ -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" diff --git a/MAINTAINERS b/MAINTAINERS index d515a954b2b..48ae2145513 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -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 -- 2.26.3