[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 08/11] exec: Restrict ioport.h to sysemu/
From: |
Philippe Mathieu-Daudé |
Subject: |
[PATCH 08/11] exec: Restrict ioport.h to sysemu/ |
Date: |
Mon, 17 May 2021 13:11:08 +0200 |
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%)
diff --git a/hw/display/vga_int.h b/hw/display/vga_int.h
index b923633cc4f..8db43e898a3 100644
--- a/hw/display/vga_int.h
+++ b/hw/display/vga_int.h
@@ -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"
diff --git a/include/hw/dma/i8257.h b/include/hw/dma/i8257.h
index f652345d65a..e987a22fdd8 100644
--- a/include/hw/dma/i8257.h
+++ b/include/hw/dma/i8257.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"
diff --git a/include/hw/isa/isa.h b/include/hw/isa/isa.h
index 9c9aabfc3b0..a63f1841111 100644
--- a/include/hw/isa/isa.h
+++ b/include/hw/isa/isa.h
@@ -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"
diff --git a/include/exec/ioport.h b/include/sysemu/ioport.h
similarity index 93%
rename from include/exec/ioport.h
rename to include/sysemu/ioport.h
index f94f71b19f0..b37c54ce4e5 100644
--- a/include/exec/ioport.h
+++ b/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;
diff --git a/softmmu/ioport.c b/softmmu/ioport.c
index 6f297027cfe..5fabbb1832a 100644
--- a/softmmu/ioport.c
+++ b/softmmu/ioport.c
@@ -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"
diff --git a/softmmu/physmem.c b/softmmu/physmem.c
index 31e490185f3..51f05eb989c 100644
--- a/softmmu/physmem.c
+++ b/softmmu/physmem.c
@@ -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"
diff --git a/softmmu/qtest.c b/softmmu/qtest.c
index 2551296c727..5faf99fca13 100644
--- a/softmmu/qtest.c
+++ b/softmmu/qtest.c
@@ -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"
diff --git a/target/i386/nvmm/nvmm-all.c b/target/i386/nvmm/nvmm-all.c
index 8adbfcb82d9..181e7378b41 100644
--- a/target/i386/nvmm/nvmm-all.c
+++ b/target/i386/nvmm/nvmm-all.c
@@ -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"
diff --git a/target/i386/whpx/whpx-all.c b/target/i386/whpx/whpx-all.c
index 7abc77d1c1f..c7aafa4140b 100644
--- a/target/i386/whpx/whpx-all.c
+++ b/target/i386/whpx/whpx-all.c
@@ -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"
diff --git a/MAINTAINERS b/MAINTAINERS
index 48ae2145513..ca8d0feb2bd 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -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
--
2.26.3
- [PATCH 00/11] exec: Restrict various system emulation specific headers (to sysemu), Philippe Mathieu-Daudé, 2021/05/17
- [PATCH 01/11] NOTFORMERGE target/arm: Restrict KVM files to softmmu, Philippe Mathieu-Daudé, 2021/05/17
- [PATCH 02/11] exec: Restrict hwaddr.h to sysemu/, Philippe Mathieu-Daudé, 2021/05/17
- [PATCH 03/11] exec: Restrict cputlb.h to sysemu/, Philippe Mathieu-Daudé, 2021/05/17
- [PATCH 04/11] exec: Restrict memory.h to sysemu/, Philippe Mathieu-Daudé, 2021/05/17
- [PATCH 05/11] exec: Restrict memory-internal.h to sysemu/, Philippe Mathieu-Daudé, 2021/05/17
- [PATCH 07/11] exec: Extract CPU I/O instructions to "cpu-io.h", Philippe Mathieu-Daudé, 2021/05/17
- [PATCH 06/11] exec: Restrict address-spaces.h to sysemu/, Philippe Mathieu-Daudé, 2021/05/17
- [PATCH 08/11] exec: Restrict ioport.h to sysemu/,
Philippe Mathieu-Daudé <=
- [PATCH 09/11] exec: Restrict ram_addr.h to sysemu/, Philippe Mathieu-Daudé, 2021/05/17
- [PATCH 10/11] exec: Restrict ramblock.h to sysemu/, Philippe Mathieu-Daudé, 2021/05/17
- [PATCH 11/11] exec: Restrict confidential-guest-support.h to sysemu/, Philippe Mathieu-Daudé, 2021/05/17
- Re: [PATCH 00/11] exec: Restrict various system emulation specific headers (to sysemu), Philippe Mathieu-Daudé, 2021/05/25