@@ -27,7 +27,7 @@
#include "sysemu/xen.h"
#include "sysemu/tcg.h"
#include "exec/ramlist.h"
-#include "exec/ramblock.h"
+#include "sysemu/ramblock.h"
/**
* clear_bmap_size: calculate clear bitmap size
similarity index 92%
rename from include/exec/ramblock.h
rename to include/sysemu/ramblock.h
@@ -16,11 +16,14 @@
* The functions declared here will be removed soon.
*/
-#ifndef QEMU_EXEC_RAMBLOCK_H
-#define QEMU_EXEC_RAMBLOCK_H
+#ifndef QEMU_SYSEMU_RAMBLOCK_H
+#define QEMU_SYSEMU_RAMBLOCK_H
-#ifndef CONFIG_USER_ONLY
-#include "cpu-common.h"
+#ifdef CONFIG_USER_ONLY
+#error Cannot include sysemu specific header from user emulation
+#endif
+
+#include "exec/cpu-common.h"
struct RAMBlock {
struct rcu_head rcu;
@@ -70,5 +73,5 @@ struct RAMBlock {
*/
ram_addr_t postcopy_length;
};
-#endif
+
#endif
@@ -14,7 +14,7 @@
#include <zlib.h>
#include "qapi/error.h"
#include "cpu.h"
-#include "exec/ramblock.h"
+#include "sysemu/ramblock.h"
#include "qemu/rcu_queue.h"
#include "qapi/qapi-commands-migration.h"
#include "ram.h"
@@ -14,7 +14,7 @@
#include "qemu/rcu.h"
#include "exec/target_page.h"
#include "sysemu/sysemu.h"
-#include "exec/ramblock.h"
+#include "sysemu/ramblock.h"
#include "qemu/error-report.h"
#include "qapi/error.h"
#include "ram.h"
@@ -31,7 +31,7 @@
#include "qemu/error-report.h"
#include "trace.h"
#include "hw/boards.h"
-#include "exec/ramblock.h"
+#include "sysemu/ramblock.h"
/* Arbitrary limit on size of each discard command,
* keeps them around ~200 bytes
@@ -21,7 +21,7 @@
#include "fork_fuzz.h"
#include "string.h"
#include "exec/sysemu/memory.h"
-#include "exec/ramblock.h"
+#include "sysemu/ramblock.h"
#include "hw/qdev-core.h"
#include "hw/pci/pci.h"
#include "hw/boards.h"
@@ -2402,7 +2402,7 @@ F: include/sysemu/ioport.h
F: include/exec/memop.h
F: include/exec/sysemu/memory.h
F: include/sysemu/ram_addr.h
-F: include/exec/ramblock.h
+F: include/sysemu/ramblock.h
F: softmmu/dma-helpers.c
F: softmmu/ioport.c
F: softmmu/memory.c
To make it clearer the ramblock.h header is sysemu specific, move it to the sysemu/ directory. Patch created mechanically using: $ sed -i s,exec/ramblock.h,sysemu/ramblock.h, $(git grep -l exec/ramblock.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/sysemu/ram_addr.h | 2 +- include/{exec => sysemu}/ramblock.h | 13 ++++++++----- migration/dirtyrate.c | 2 +- migration/multifd.c | 2 +- migration/postcopy-ram.c | 2 +- tests/qtest/fuzz/generic_fuzz.c | 2 +- MAINTAINERS | 2 +- 7 files changed, 14 insertions(+), 11 deletions(-) rename include/{exec => sysemu}/ramblock.h (92%)