[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bbb6bd0f-b508-f8b6-1342-c394c18995ac@amd.com>
Date: Thu, 16 Feb 2023 09:53:14 -0500
From: Felix Kuehling <felix.kuehling@....com>
To: Jason Gunthorpe <jgg@...dia.com>,
"Suthikulpanit, Suravee" <Suravee.Suthikulpanit@....com>
Cc: Bjorn Helgaas <helgaas@...nel.org>,
Baolu Lu <baolu.lu@...ux.intel.com>,
"Huang, Shimmer" <Shimmer.Huang@....com>,
"Liu, Aaron" <Aaron.Liu@....com>, Joerg Roedel <jroedel@...e.de>,
"regressions@...ts.linux.dev" <regressions@...ts.linux.dev>,
Thorsten Leemhuis <regressions@...mhuis.info>,
Linux PCI <linux-pci@...r.kernel.org>,
"Pan, Xinhui" <Xinhui.Pan@....com>,
"Hegde, Vasant" <Vasant.Hegde@....com>,
amd-gfx@...ts.freedesktop.org, LKML <linux-kernel@...r.kernel.org>,
Bjorn Helgaas <bhelgaas@...gle.com>,
"iommu@...ts.linux.dev" <iommu@...ts.linux.dev>,
Matt Fagnani <matt.fagnani@...l.net>,
"Deucher, Alexander" <Alexander.Deucher@....com>,
Christian König <christian.koenig@....com>
Subject: Re: [regression, bisected, pci/iommu] Bug 216865 - Black screen when amdgpu started during 6.2-rc1 boot with AMD IOMMU enabled
[+Suravee]
Am 2023-02-15 um 19:44 schrieb Jason Gunthorpe:
> On Wed, Feb 15, 2023 at 07:35:45PM -0500, Felix Kuehling wrote:
>> If I understand this correctly, the HW or the BIOS is doing something wrong
>> about reporting ACS. I don't know what the GPU driver can do other than add
>> some quirk to stop using AMD IOMMUv2 on this HW/BIOS.
> How about this:
>
> diff --git a/drivers/iommu/amd/iommu_v2.c b/drivers/iommu/amd/iommu_v2.c
> index 864e4ffb6aa94e..cc027ce9a6e86f 100644
> --- a/drivers/iommu/amd/iommu_v2.c
> +++ b/drivers/iommu/amd/iommu_v2.c
> @@ -732,6 +732,7 @@ EXPORT_SYMBOL(amd_iommu_unbind_pasid);
>
> int amd_iommu_init_device(struct pci_dev *pdev, int pasids)
> {
> + struct iommu_dev_data *dev_data = dev_iommu_priv_get(&pdev->dev);
> struct device_state *dev_state;
> struct iommu_group *group;
> unsigned long flags;
> @@ -740,6 +741,9 @@ int amd_iommu_init_device(struct pci_dev *pdev, int pasids)
>
> might_sleep();
>
> + if (!dev_data->ats.enabled)
> + return -EINVAL;
> +
> /*
> * When memory encryption is active the device is likely not in a
> * direct-mapped domain. Forbid using IOMMUv2 functionality for now.
Hi Suravee,
What to you think about this proposed change?
Regards,
Felix
Powered by blists - more mailing lists