x86/tboot: Don't disable swiotlb when iommu is forced on
Subsystems (2)
PATCH 1/1 x86/tboot: Don't disable swiotlb when iommu is forced on
After commit 327d5b2fee91c ("iommu/vt-d: Allow 32bit devices to uses DMA domain"), swiotbl could also be used for direct memory access if IOMMU is enabled but a device is configured to pass through the DMA translation. Keep swiotlb when IOMMU is forced on, otherwise, some devices won't work if "iommu=pt" kernel parameter is used.
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=210237
--- arch/x86/kernel/tboot.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
arch/x86/kernel/tboot.c +1 -4
@@ -514,13 +514,10 @@ int tboot_force_iommu(void)if (!tboot_enabled ())return 0 ; -if (no_iommu || swiotlb || dmar_disabled) +if (no_iommu || dmar_disabled)pr_warn ("Forcing Intel-IOMMU to enabled\n" ); dmar_disabled =0 ; -#ifdef CONFIG_SWIOTLB - swiotlb =0 ; -#endif no_iommu =0 ;return 1 ;
Signature · 1 line
2.25.1
Will Deacon
AppliedQuoted 5 lines · Lu Baolu
After commit
327d5b2fee91c("iommu/vt-d: Allow 32bit devices to uses DMA domain"), swiotbl could also be used for direct memory access if IOMMU is enabled but a device is configured to pass through the DMA translation. Keep swiotlb when IOMMU is forced on, otherwise, some devices won't work if "iommu=pt" kernel parameter is used.
Applied to arm64 (for-next/iommu/fixes), thanks!
[1/1] x86/tboot: Don't disable swiotlb when iommu is forced on
https://git.kernel.org/arm64/c/e2be2a833ab5
Cheers,
Signature · 9 lines
Will https://fixes.arm64.dev https://next.arm64.dev https://will.arm64.dev _______________________________________________ iommu mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/iommu
Quoted 11 lines · Will Deacon
Quoted 5 lines · Lu Baolu
After commit
327d5b2fee91c("iommu/vt-d: Allow 32bit devices to uses DMA domain"), swiotbl could also be used for direct memory access if IOMMU is enabled but a device is configured to pass through the DMA translation. Keep swiotlb when IOMMU is forced on, otherwise, some devices won't work if "iommu=pt" kernel parameter is used.Applied to arm64 (for-next/iommu/fixes), thanks!
[1/1] x86/tboot: Don't disable swiotlb when iommu is forced on
https://git.kernel.org/arm64/c/e2be2a833ab5
But tboot never ran on ARM. It is a Intel specifc.
I think either me or Thomas should take this patch.
_______________________________________________
iommu mailing list [email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu
Hi Konrad,
Quoted 8 lines · Konrad Rzeszutek Wilk
Quoted 7 lines · Will Deacon
Quoted 5 lines · Lu Baolu
After commit
327d5b2fee91c("iommu/vt-d: Allow 32bit devices to uses DMA domain"), swiotbl could also be used for direct memory access if IOMMU is enabled but a device is configured to pass through the DMA translation. Keep swiotlb when IOMMU is forced on, otherwise, some devices won't work if "iommu=pt" kernel parameter is used.
Quoted 8 lines
Quoted 4 lines
Applied to arm64 (for-next/iommu/fixes), thanks!
[1/1] x86/tboot: Don't disable swiotlb when iommu is forced on
https://git.kernel.org/arm64/c/e2be2a833ab5But tboot never ran on ARM. It is a Intel specifc.
I think either me or Thomas should take this patch.
FWIW, I did check with Thomas before I picked it up. I know it looks weird going via arm64, but that's only because I'm temporarily handling the IOMMU tree there (including vt-d changes) while Joerg is away. Since this fixes a vt-d regression, I thought I'd pick it up along with the other IOMMU fixes I have queued for -rc6.
That said, if you insist, then I can revert it. I'm really only trying to help here.
Will
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu
Quoted 18 lines · Will Deacon
Hi Konrad,
Quoted 15 lines · Konrad Rzeszutek Wilk
Quoted 11 lines · Will Deacon
Quoted 5 lines · Lu Baolu
After commit
327d5b2fee91c("iommu/vt-d: Allow 32bit devices to uses DMA domain"), swiotbl could also be used for direct memory access if IOMMU is enabled but a device is configured to pass through the DMA translation. Keep swiotlb when IOMMU is forced on, otherwise, some devices won't work if "iommu=pt" kernel parameter is used.Applied to arm64 (for-next/iommu/fixes), thanks!
[1/1] x86/tboot: Don't disable swiotlb when iommu is forced on
https://git.kernel.org/arm64/c/e2be2a833ab5But tboot never ran on ARM. It is a Intel specifc.
Quoted 8 lines
Quoted 1 line
I think either me or Thomas should take this patch.
FWIW, I did check with Thomas before I picked it up. I know it looks weird going via arm64, but that's only because I'm temporarily handling the IOMMU tree there (including vt-d changes) while Joerg is away. Since this fixes a vt-d regression, I thought I'd pick it up along with the other IOMMU fixes I have queued for -rc6.
Aah, I missed the memo :-)
Quoted 2 lines
That said, if you insist, then I can revert it. I'm really only trying to help here.
Nah. Enjoy picking up patches!
Thanks!
Quoted 2 lines
Will
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu