Skip to contentSkip to conversation

AMD/IOMMU: Fix passthrough following c/s d7cfeb7c13e

PATCH In review Andrew Cooper 4 participants 4 messages Nov 11, 2019 – Nov 14, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 AMD/IOMMU: Fix passthrough following c/s d7cfeb7c13e

"AMD/IOMMU: don't blindly allocate interrupt remapping tables" introduces a call at runtime from amd_iommu_add_device() to amd_iommu_set_intremap_table() which is still marked as __init.

On one AMD Rome machine we have, this results in a crash the moment we try to use an SR-IOV VF in a VM.

---
CC: Jan Beulich <[email protected]>
CC: Juergen Gross <[email protected]>

For 4.13. This is a regression vs 4.12

---
 xen/drivers/passthrough/amd/iommu_map.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
xen/drivers/passthrough/amd/iommu_map.c +1 -1
index 2859d8257e..f3fcfb9e0f 100644
@@ -112,7 +112,7 @@ void amd_iommu_set_root_page_table(struct amd_iommu_dte *dte,
     dte->v = valid;
 }
 
-void __init amd_iommu_set_intremap_table(
+void amd_iommu_set_intremap_table(
     struct amd_iommu_dte *dte, const void *ptr,
     const struct amd_iommu *iommu, bool valid)
 {
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Andrew Cooper

"AMD/IOMMU: don't blindly allocate interrupt remapping tables" introduces a call at runtime from amd_iommu_add_device() to amd_iommu_set_intremap_table() which is still marked as __init.

On one AMD Rome machine we have, this results in a crash the moment we try to use an SR-IOV VF in a VM.

I'm sorry for the breakage - I recall having made the change, so I must have lost it at some point.

Jan

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#2 lore raw
In reply to Andrew Cooper
Quoted 9 lines · Andrew Cooper

"AMD/IOMMU: don't blindly allocate interrupt remapping tables" introduces a call at runtime from amd_iommu_add_device() to amd_iommu_set_intremap_table() which is still marked as __init.

On one AMD Rome machine we have, this results in a crash the moment we try to use an SR-IOV VF in a VM.

Juergen

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

Tested-by on v1 1/1
#3 lore raw
In reply to Andrew Cooper
Quoted 9 lines · Andrew Cooper

"AMD/IOMMU: don't blindly allocate interrupt remapping tables" introduces a call at runtime from amd_iommu_add_device() to amd_iommu_set_intremap_table() which is still marked as __init.

On one AMD Rome machine we have, this results in a crash the moment we try to use an SR-IOV VF in a VM.

This fixes the fatal page fault I found, which wasn't seen on 4.11.

Cheers,

-Jenny

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel