@@ -25,7 +25,7 @@
#ifndef HW_VGA_INT_H
#define HW_VGA_INT_H
-#include "exec/ioport.h"
+#include "sysemu/ioport.h"
#include "exec/sysemu/memory.h"
#include "ui/console.h"
@@ -2,7 +2,7 @@
#define HW_I8257_H
#include "hw/isa/isa.h"
-#include "exec/ioport.h"
+#include "sysemu/ioport.h"
#include "qom/object.h"
#define TYPE_I8257 "i8257"
@@ -4,7 +4,7 @@
/* ISA bus */
#include "exec/sysemu/memory.h"
-#include "exec/ioport.h"
+#include "sysemu/ioport.h"
#include "hw/qdev-core.h"
#include "qom/object.h"
similarity index 93%
rename from include/exec/ioport.h
rename to include/sysemu/ioport.h
@@ -21,8 +21,12 @@
* IO ports API
*/
-#ifndef IOPORT_H
-#define IOPORT_H
+#ifndef SYSEMU_IOPORT_H
+#define SYSEMU_IOPORT_H
+
+#ifdef CONFIG_USER_ONLY
+#error Cannot include sysemu specific header from user emulation
+#endif
#include "exec/sysemu/memory.h"
@@ -40,9 +44,7 @@ typedef struct MemoryRegionPortio {
#define PORTIO_END_OF_LIST() { }
-#ifndef CONFIG_USER_ONLY
extern const MemoryRegionOps unassigned_io_ops;
-#endif
typedef struct PortioList {
const struct MemoryRegionPortio *ports;
@@ -26,7 +26,7 @@
*/
#include "qemu/osdep.h"
-#include "exec/ioport.h"
+#include "sysemu/ioport.h"
#include "exec/sysemu/memory.h"
#include "exec/sysemu/address-spaces.h"
#include "trace.h"
@@ -42,7 +42,7 @@
#include "qemu/error-report.h"
#include "qemu/qemu-print.h"
#include "exec/sysemu/memory.h"
-#include "exec/ioport.h"
+#include "sysemu/ioport.h"
#include "sysemu/dma.h"
#include "sysemu/hostmem.h"
#include "sysemu/hw_accel.h"
@@ -17,7 +17,7 @@
#include "sysemu/qtest.h"
#include "sysemu/runstate.h"
#include "chardev/char-fe.h"
-#include "exec/ioport.h"
+#include "sysemu/ioport.h"
#include "exec/sysemu/memory.h"
#include "hw/irq.h"
#include "qemu/accel.h"
@@ -10,7 +10,7 @@
#include "qemu/osdep.h"
#include "cpu.h"
#include "exec/sysemu/address-spaces.h"
-#include "exec/ioport.h"
+#include "sysemu/ioport.h"
#include "qemu-common.h"
#include "qemu/accel.h"
#include "sysemu/nvmm.h"
@@ -11,7 +11,7 @@
#include "qemu/osdep.h"
#include "cpu.h"
#include "exec/sysemu/address-spaces.h"
-#include "exec/ioport.h"
+#include "sysemu/ioport.h"
#include "qemu-common.h"
#include "qemu/accel.h"
#include "sysemu/whpx.h"
@@ -2398,7 +2398,7 @@ F: tests/tcg/multiarch/gdbstub/
Memory API
M: Paolo Bonzini <pbonzini@redhat.com>
S: Supported
-F: include/exec/ioport.h
+F: include/sysemu/ioport.h
F: include/exec/memop.h
F: include/exec/sysemu/memory.h
F: include/exec/ram_addr.h
To make it clearer the ioport.h header is sysemu specific, move it to the sysemu/ directory. Patch created mechanically using: $ sed -i s,exec/ioport.h,sysemu/ioport.h, $(git grep -l exec/ioport.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> --- hw/display/vga_int.h | 2 +- include/hw/dma/i8257.h | 2 +- include/hw/isa/isa.h | 2 +- include/{exec => sysemu}/ioport.h | 10 ++++++---- softmmu/ioport.c | 2 +- softmmu/physmem.c | 2 +- softmmu/qtest.c | 2 +- target/i386/nvmm/nvmm-all.c | 2 +- target/i386/whpx/whpx-all.c | 2 +- MAINTAINERS | 2 +- 10 files changed, 15 insertions(+), 13 deletions(-) rename include/{exec => sysemu}/ioport.h (93%)