Linux PCI subsystem development
 help / color / mirror / Atom feed
From: Baolu Lu <baolu.lu@linux.intel.com>
To: "Christian König" <christian.koenig@amd.com>,
	"Jason Gunthorpe" <jgg@nvidia.com>
Cc: baolu.lu@linux.intel.com,
	"Christian König" <ckoenig.leichtzumerken@gmail.com>,
	linux-pci@vger.kernel.org, "Kevin Tian" <kevin.tian@intel.com>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Tony Zhu" <tony.zhu@intel.com>, "Joerg Roedel" <jroedel@suse.de>
Subject: Re: [PATCH] PCI: revert "Enable PASID only when ACS RR & UF enabled on upstream path"
Date: Thu, 12 Jan 2023 16:59:36 +0800	[thread overview]
Message-ID: <0bd23c6b-c182-89ef-497b-40a7bd665812@linux.intel.com> (raw)
In-Reply-To: <8c33f83b-3b8c-4714-b812-1e0627fd5537@amd.com>

On 2023/1/11 22:17, Christian König wrote:
> Am 11.01.23 um 15:14 schrieb Jason Gunthorpe:
>> On Wed, Jan 11, 2023 at 09:54:03PM +0800, Baolu Lu wrote:
>>> On 2023/1/11 21:44, Jason Gunthorpe wrote:
>>>>> iommu_enable_pci_caps() in the Intel IOMMU driver. This also does some
>>>>> handling for ATS, so here we could check the info->ats_supported 
>>>>> flag if ACS
>>>>> needs to be checked or not.
>>>> *groan*  this is seems wrong 🙁 Lu why are we doing this inside iommu
>>>> drivers instead of in the device drivers to declare they want to use
>>>> PASID?
>>> Currently it's common to enable pasid in the IOMMU drivers, but device
>>> driver has more knowledge of the device, hence it makes more sense to
>>> move pci_enable_pasid() to the device driver.
>> So, lets fix it that way.
>>
>> Add the flag to the pci_enable_pasid(), set the flag in the AMD
>> IOMMU's special AMD GPU only path assuming the device will always use
>> ATS
> 
> That will fix at least this the AMD use case.

I've post a patch for discussion.

https://lore.kernel.org/linux-iommu/20230112084629.737653-1-baolu.lu@linux.intel.com/

--
Best regards,
baolu

  parent reply	other threads:[~2023-01-12  9:04 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-11  8:57 [PATCH] PCI: revert "Enable PASID only when ACS RR & UF enabled on upstream path" Christian König
2023-01-11  9:15 ` Christian König
2023-01-11 10:04 ` Linux kernel regression tracking (Thorsten Leemhuis)
2023-01-11 13:07 ` Jason Gunthorpe
2023-01-11 13:38   ` Christian König
2023-01-11 13:44     ` Jason Gunthorpe
2023-01-11 13:54       ` Baolu Lu
2023-01-11 14:14         ` Jason Gunthorpe
2023-01-11 14:17           ` Christian König
2023-01-11 14:20             ` Jason Gunthorpe
2023-01-11 14:24               ` Christian König
2023-01-12  8:59             ` Baolu Lu [this message]
     [not found]       ` <41e25f9f-b106-de77-97ab-d50196de7514@amd.com>
2023-01-11 14:36         ` Jason Gunthorpe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0bd23c6b-c182-89ef-497b-40a7bd665812@linux.intel.com \
    --to=baolu.lu@linux.intel.com \
    --cc=bhelgaas@google.com \
    --cc=christian.koenig@amd.com \
    --cc=ckoenig.leichtzumerken@gmail.com \
    --cc=jgg@nvidia.com \
    --cc=jroedel@suse.de \
    --cc=kevin.tian@intel.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=tony.zhu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox