ACK/Cmnt: [PATCH 0/1 V2][SRU][J/OEM-5.17/OEM-5.14] intel_iommu: Enable intel_iommu, Ubuntu 22.04 installation crashes

Stefan Bader stefan.bader at canonical.com
Fri Aug 5 09:26:24 UTC 2022


On 19.07.22 12:41, Koba Ko wrote:
> BugLink: https://bugs.launchpad.net/bugs/1982104
> 
> [Impact]
> Ubuntu 22.04 installation crashes on our Intel Sapphire Rapids proto server which is targeting Telco workloads.
> Attaching the console logs.
> 
> Currently, it looks like disabling VT-D option in BIOS settings helps mitigate the issue.
> Console logs indicate something is wrong in iommu/dmar subsystem.
> 
> [Fix]
> The IOMMU driver shares the pasid table for PCI alias devices. When the
> RID2PASID entry of the shared pasid table has been filled by the first
> device, the subsequent device will encounter the "DMAR: Setup RID2PASID
> failed" failure as the pasid entry has already been marked as present.
> As the result, the IOMMU probing process will be aborted.
> 
> On the contrary, when any alias device is hot-removed from the system,
> for example, by writing to /sys/bus/pci/devices/.../remove, the shared
> RID2PASID will be cleared without any notifications to other devices.
> As the result, any DMAs from those rest devices are blocked.
> 
> Sharing pasid table among PCI alias devices could save two memory pages
> for devices underneath the PCIe-to-PCI bridges. Anyway, considering that
> those devices are rare on modern platforms that support VT-d in scalable
> mode and the saved memory is negligible, it's reasonable to remove this
> part of immature code to make the driver feasible and stable.
> 
> [Test Case]
> 1. use the target machine(Intel Sapphire Rapids) and install the kernel with the fix.
> 2. boot the target machine
> 3. check dmesg if the error message exists
> [ 8.120527] pci 0000:03:01.0: DMAR: Setup RID2PASID failed
> 
> [Where problems could occur]
> After enable intel_iommu, the errors may be occurred.
> We need to figure out one by one once the related errors are triggered in the future.
> 
> V2:
> 1. re-link with a public bug
> 2. As per V1 comment, this patch has applied on unstable so drop [U] on
> v2.
> 
> Lu Baolu (1):
>    [SRU][J/OEM-5.17/OEM-5.14] iommu/vt-d: Fix RID2PASID setup/teardown
>      failure
> 
>   drivers/iommu/intel/iommu.c | 24 -------------
>   drivers/iommu/intel/pasid.c | 69 ++-----------------------------------
>   drivers/iommu/intel/pasid.h |  1 -
>   include/linux/intel-iommu.h |  3 --
>   4 files changed, 3 insertions(+), 94 deletions(-)
> 

Note that since Ubuntu-5.15.0-40.43 intel_iommu has been disabled by default via
"Revert "UBUNTU: [Config] enable Intel DMA remapping options by default"".

Acked-by: Stefan Bader <stefan.bader at canonical.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20220805/4d27123c/attachment.sig>


More information about the kernel-team mailing list