[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [RFC PATCH 4/9] xen/arm: p2m: Update IOMMU mapping whenever possible if page table is not shared
On Mon, Apr 24, 2017 at 2:41 PM, Julien Grall <julien.grall@xxxxxxx> wrote: > Hi Oleksandr, Hi, Julien > > On 21/04/17 19:44, Oleksandr Tyshchenko wrote: >> >> On Fri, Apr 21, 2017 at 7:27 PM, Julien Grall <julien.grall@xxxxxxx> >> wrote: >>> >>> On 21/04/17 15:18, Oleksandr Tyshchenko wrote: >>>> >>>> >>>> On Wed, Apr 19, 2017 at 8:46 PM, Julien Grall <julien.grall@xxxxxxx> >>>> wrote: >> >> >> Aha. Seems, I understand what you meant. I already have a check in IPMMU >> driver: >> >> /* >> * both the virtual address and the physical one, as well as >> * the size of the mapping, must be aligned (at least) to the >> * size of the smallest page supported by the hardware >> */ >> if (!IS_ALIGNED(iova | paddr | size, min_pagesz)) { >> printk("unaligned: iova 0x%lx pa 0x%"PRIx64" size 0x%zx min_pagesz >> 0x%x\n", >> iova, paddr, size, min_pagesz); >> return -EINVAL; >> } >> >> where min_pagesz - is a minimum page size supported by hardware. >> Hope, that this check can catch such case. > > > I think will cover what I meant. Although, can't we do this check when the > IOMMU is initialized at boot time rather than for every mapping? I think, yes. > > For instance you know that if the mimimum page granularity supported by the > IOMMU is bigger than PAGE_SIZE, than you will likely get into trouble later > on. > > So rather than randomly crashing at runtime, you can disable the IOMMU/panic > at boot time. Agree. > > Cheers, > > -- > Julien Grall -- Regards, Oleksandr Tyshchenko _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |