mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 01:03:55 -06:00
physmem: Restrict TCG IOTLB code to TCG accel
Restrict iotlb_to_section(), address_space_translate_for_iotlb() and memory_region_section_get_iotlb() to TCG. Declare them in the new "accel/tcg/iommu.h" header. Declare iotlb_to_section() using the MemoryRegionSection typedef. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-ID: <20250424202412.91612-12-philmd@linaro.org>
This commit is contained in:
parent
1381ea53a8
commit
f12b717717
5 changed files with 48 additions and 27 deletions
|
@ -29,6 +29,7 @@
|
|||
|
||||
#ifdef CONFIG_TCG
|
||||
#include "accel/tcg/cpu-ops.h"
|
||||
#include "accel/tcg/iommu.h"
|
||||
#endif /* CONFIG_TCG */
|
||||
|
||||
#include "exec/exec-all.h"
|
||||
|
@ -587,6 +588,8 @@ MemoryRegion *flatview_translate(FlatView *fv, hwaddr addr, hwaddr *xlat,
|
|||
return mr;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_TCG
|
||||
|
||||
typedef struct TCGIOMMUNotifier {
|
||||
IOMMUNotifier n;
|
||||
MemoryRegion *mr;
|
||||
|
@ -771,6 +774,8 @@ hwaddr memory_region_section_get_iotlb(CPUState *cpu,
|
|||
return section - d->map.sections;
|
||||
}
|
||||
|
||||
#endif /* CONFIG_TCG */
|
||||
|
||||
void cpu_address_space_init(CPUState *cpu, int asidx,
|
||||
const char *prefix, MemoryRegion *mr)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue