| 1 | /* |
| 2 | * TCG IOMMU translations. |
| 3 | * |
| 4 | * Copyright (c) 2003 Fabrice Bellard |
| 5 | * SPDX-License-Identifier: LGPL-2.1-or-later |
| 6 | */ |
| 7 | #ifndef ACCEL_TCG_IOMMU_H |
| 8 | #define ACCEL_TCG_IOMMU_H |
| 9 | |
| 10 | #ifndef CONFIG_TCG |
| 11 | #error Can only include this header with TCG |
| 12 | #endif |
| 13 | |
| 14 | #ifdef CONFIG_USER_ONLY |
| 15 | #error Cannot include accel/tcg/iommu.h from user emulation |
| 16 | #endif |
| 17 | |
| 18 | #include "exec/hwaddr.h" |
| 19 | #include "exec/memattrs.h" |
| 20 | |
| 21 | void tcg_iommu_init_notifier_list(CPUState *cpu); |
| 22 | void tcg_iommu_free_notifier_list(CPUState *cpu); |
| 23 | |
| 24 | MemoryRegionSection *address_space_translate_for_iotlb(CPUState *cpu, |
| 25 | int asidx, |
| 26 | hwaddr addr, |
| 27 | hwaddr *xlat, |
| 28 | hwaddr *plen, |
| 29 | MemTxAttrs attrs, |
| 30 | int *prot); |
| 31 | |
| 32 | #endif |
| 33 |