Skip to contentSkip to conversation

accel/tcg: Restrict IOMMU declarations

PATCH Superseded Philippe Mathieu-Daudé 1 participant 1 message Jun 13

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 accel/tcg: Restrict IOMMU declarations

Move the two TCG-specific IOMMU method declarations from the generic "exec/cpu-common.h" header to "accel/tcg/iommu.h".

---
 include/accel/tcg/iommu.h | 3 +++
 include/exec/cpu-common.h | 3 ---
 accel/tcg/cpu-exec.c      | 4 +++-
 3 files changed, 6 insertions(+), 4 deletions(-)
include/accel/tcg/iommu.h +3 -0
index 547f8ea0ef0..2b6d0ff7282 100644
@@ -14,6 +14,9 @@
 #include "exec/hwaddr.h"
 #include "exec/memattrs.h"
 
+void tcg_iommu_init_notifier_list(CPUState *cpu);
+void tcg_iommu_free_notifier_list(CPUState *cpu);
+
 MemoryRegionSection *address_space_translate_for_iotlb(CPUState *cpu,
                                                        int asidx,
                                                        hwaddr addr,
include/exec/cpu-common.h +0 -3
index 24e3eb500bb..6fe821b9a1d 100644
@@ -35,9 +35,6 @@ unsigned int cpu_list_generation_id_get(void);
 
 int cpu_get_free_index(void);
 
-void tcg_iommu_init_notifier_list(CPUState *cpu);
-void tcg_iommu_free_notifier_list(CPUState *cpu);
-
 /**
  * cpu_address_space_init:
  * @cpu: CPU to add this address space to
accel/tcg/cpu-exec.c +3 -1
index ad94f96b252..7292ff15060 100644
@@ -26,7 +26,6 @@
 #include "accel/tcg/helper-retaddr.h"
 #include "trace.h"
 #include "disas/disas.h"
-#include "exec/cpu-common.h"
 #include "exec/cpu-interrupt.h"
 #include "exec/page-protection.h"
 #include "exec/mmap-lock.h"
@@ -46,6 +45,9 @@
 #include "tb-context.h"
 #include "tb-internal.h"
 #include "internal-common.h"
+#if !defined(CONFIG_USER_ONLY)
+#include "accel/tcg/iommu.h"
+#endif
 
 /* -icount align implementation. */
 
Signature · 1 line
2.53.0