All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH for-4.12] xen/iommu: fix dev assignment on ARM after 91d4eca7
@ 2019-01-03  0:28 Stefano Stabellini
  2019-01-03  0:50 ` Andrew Cooper
  0 siblings, 1 reply; 10+ messages in thread
From: Stefano Stabellini @ 2019-01-03  0:28 UTC (permalink / raw)
  To: xen-devel; +Cc: julien.grall, sstabellini, jbeulich, paul.durrant

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 <stefanos@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);
-        if ( rc )
+        if ( rc != 0 && rc != -ENOSYS )
         {
             if ( rc != -ERESTART )
             {

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-01-08 18:50 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-03  0:28 [PATCH for-4.12] xen/iommu: fix dev assignment on ARM after 91d4eca7 Stefano Stabellini
2019-01-03  0:50 ` Andrew Cooper
2019-01-03 18:19   ` Stefano Stabellini
2019-01-04  9:03     ` Paul Durrant
2019-01-04 17:46       ` Stefano Stabellini
2019-01-07  8:56         ` Paul Durrant
2019-01-07 18:40           ` Stefano Stabellini
2019-01-08  8:30             ` Paul Durrant
2019-01-08  8:47               ` Jan Beulich
2019-01-08 18:50                 ` Stefano Stabellini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.