On 03/01/2019 00:28, Stefano Stabellini wrote: > Fix device assignment on ARM after 91d4eca7 "mm / iommu: split > need_iommu() into has_iommu_pt() and need_iommu_pt_sync()". > > arch_iommu_populate_page_table returns -ENOSYS which causes > iommu_construct to return early, although it is not an error. > > Interestingly, the if ( rc ) was present even before 91d4eca7, but it was > still working before. Now, with the new hd->status field it won't > complete the initialization successfully. > > Signed-off-by: Stefano Stabellini <stefa...@xilinx.com> > > diff --git a/xen/drivers/passthrough/iommu.c b/xen/drivers/passthrough/iommu.c > index ac62d7f..a63329b 100644 > --- a/xen/drivers/passthrough/iommu.c > +++ b/xen/drivers/passthrough/iommu.c > @@ -269,7 +269,7 @@ int iommu_construct(struct domain *d) > hd->need_sync = true; > > rc = arch_iommu_populate_page_table(d);
The comment in ARM's arch_iommu_populate_page_table() says /* The IOMMU shares the p2m with the CPU */ Which means that iommu_use_hap_pt() (just out of context above this hunk) is wrong. It should return true, which will prevent us entering this path during initialisation. ~Andrew _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel