On 2016-05-16 07:59, David Kiarie wrote: > On Sun, May 15, 2016 at 10:29 PM, Jan Kiszka <jan.kis...@web.de> wrote: >> On 2016-05-09 14:15, David Kiarie wrote: >>> + ret->iova = addr & AMDVI_PAGE_MASK_4K; >>> + ret->translated_addr = (pte & AMDVI_DEV_PT_ROOT_MASK) & >>> + AMDVI_PAGE_MASK_4K; >>> + ret->addr_mask = ~AMDVI_PAGE_MASK_4K; >> >> This does not take huge pages (2M, 1G, ...) into account. Jailhouse >> creates them, and its Linux guest goes mad. You need to use the correct >> page size here, analogously to intel_iommu.c. > > Yes, this was meant to work with normal pages only. Until recently > intel iommu supported 4k pages only so I figured I could as well work > with 4k pages. Anyway, will fix this.
Huge pages are optional on Intel. Not AMD. Jan