@@ -946,6 +946,7 @@ static void amdvi_page_walk(AMDVIAddressSpace *as, uint64_t *dte,
ret->translated_addr = (pte & AMDVI_DEV_PT_ROOT_MASK) & page_mask;
ret->addr_mask = ~page_mask;
ret->perm = amdvi_get_perms(pte);
+ ret->type = IOMMU_IOTLB_NONE;
return;
}
no_remap:
@@ -953,6 +954,7 @@ no_remap:
ret->translated_addr = addr & AMDVI_PAGE_MASK_4K;
ret->addr_mask = ~AMDVI_PAGE_MASK_4K;
ret->perm = amdvi_get_perms(pte);
+ ret->type = IOMMU_IOTLB_NONE;
}
static void amdvi_do_translate(AMDVIAddressSpace *as, hwaddr addr,
@@ -970,6 +972,7 @@ static void amdvi_do_translate(AMDVIAddressSpace *as, hwaddr addr,
ret->translated_addr = iotlb_entry->translated_addr;
ret->addr_mask = iotlb_entry->page_mask;
ret->perm = iotlb_entry->perms;
+ ret->type = IOMMU_IOTLB_NONE;
return;
}
@@ -994,6 +997,7 @@ out:
ret->translated_addr = addr & AMDVI_PAGE_MASK_4K;
ret->addr_mask = ~AMDVI_PAGE_MASK_4K;
ret->perm = IOMMU_RW;
+ ret->type = IOMMU_IOTLB_NONE;
}
static inline bool amdvi_is_interrupt_addr(hwaddr addr)
@@ -1011,7 +1015,8 @@ static IOMMUTLBEntry amdvi_translate(IOMMUMemoryRegion *iommu, hwaddr addr,
.iova = addr,
.translated_addr = 0,
.addr_mask = ~(hwaddr)0,
- .perm = IOMMU_NONE
+ .perm = IOMMU_NONE,
+ .type = IOMMU_IOTLB_NONE
};
if (!s->enabled) {
Signed-off-by: Eugenio PĂ©rez <eperezma@redhat.com> --- hw/i386/amd_iommu.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)