linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* does dtb not support pci acs enable?
@ 2024-07-19 15:01 steven
  2024-08-01 23:43 ` Bjorn Helgaas
  0 siblings, 1 reply; 5+ messages in thread
From: steven @ 2024-07-19 15:01 UTC (permalink / raw)
  To: linux-pci

Hello,

I am a new person in PCI, I am trying to do something for iommu group on arm64 platform, I found if I boot the linux (5.10 kernel) kernel using UEFI + ACPI, it will work correctly. But if I boot it using UEFI + DTB, the iommu group not work, only one group present.

I read the code, found that pci_acs_enable is set to 1 during acpi_init, but I can not find any code for dtb booting, so it will return "disable_acs_redir " during call pci_enable_acs. 
static void pci_enable_acs(struct pci_dev *dev)
{
    if (!pci_acs_enable)
        goto disable_acs_redir;

    if (!pci_dev_specific_enable_acs(dev))
        goto disable_acs_redir;

    pci_std_enable_acs(dev);




SO, is it not support in dtb?


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: does dtb not support pci acs enable?
  2024-07-19 15:01 does dtb not support pci acs enable? steven
@ 2024-08-01 23:43 ` Bjorn Helgaas
  2024-08-02  0:00   ` Bjorn Helgaas
  0 siblings, 1 reply; 5+ messages in thread
From: Bjorn Helgaas @ 2024-08-01 23:43 UTC (permalink / raw)
  To: steven
  Cc: linux-pci, Will Deacon, Robin Murphy, Joerg Roedel,
	linux-arm-kernel, iommu

[+cc ARM, IOMMU folks; I don't know the answer, but maybe they do]

On Fri, Jul 19, 2024 at 11:01:11PM +0800, steven wrote:
> Hello,
> 
> I am a new person in PCI, I am trying to do something for iommu
> group on arm64 platform, I found if I boot the linux (5.10 kernel)
> kernel using UEFI + ACPI, it will work correctly. But if I boot it
> using UEFI + DTB, the iommu group not work, only one group present.
> 
> I read the code, found that pci_acs_enable is set to 1 during
> acpi_init, but I can not find any code for dtb booting, so it will
> return "disable_acs_redir " during call pci_enable_acs. 
>
> static void pci_enable_acs(struct pci_dev *dev)
> {
>     if (!pci_acs_enable)
>         goto disable_acs_redir;
> 
>     if (!pci_dev_specific_enable_acs(dev))
>         goto disable_acs_redir;
> 
>     pci_std_enable_acs(dev);
> 
> 
> 
> 
> SO, is it not support in dtb?
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: does dtb not support pci acs enable?
  2024-08-01 23:43 ` Bjorn Helgaas
@ 2024-08-02  0:00   ` Bjorn Helgaas
  2024-08-05 13:40     ` Will Deacon
  2024-08-06 15:56     ` Robin Murphy
  0 siblings, 2 replies; 5+ messages in thread
From: Bjorn Helgaas @ 2024-08-02  0:00 UTC (permalink / raw)
  To: steven
  Cc: linux-pci, Will Deacon, Robin Murphy, Joerg Roedel,
	linux-arm-kernel, iommu, Vidya Sagar, Pavan Kondeti

On Thu, Aug 01, 2024 at 06:43:59PM -0500, Bjorn Helgaas wrote:
> [+cc ARM, IOMMU folks; I don't know the answer, but maybe they do]

[+cc Vidya, Pavan, also see this recent thread:
https://lore.kernel.org/r/PH8PR12MB667446D4A4CAD6E0A2F488B5B83F2@PH8PR12MB6674.namprd12.prod.outlook.com]

> On Fri, Jul 19, 2024 at 11:01:11PM +0800, steven wrote:
> > Hello,
> > 
> > I am a new person in PCI, I am trying to do something for iommu
> > group on arm64 platform, I found if I boot the linux (5.10 kernel)
> > kernel using UEFI + ACPI, it will work correctly. But if I boot it
> > using UEFI + DTB, the iommu group not work, only one group present.
> > 
> > I read the code, found that pci_acs_enable is set to 1 during
> > acpi_init, but I can not find any code for dtb booting, so it will
> > return "disable_acs_redir " during call pci_enable_acs. 
> >
> > static void pci_enable_acs(struct pci_dev *dev)
> > {
> >     if (!pci_acs_enable)
> >         goto disable_acs_redir;
> > 
> >     if (!pci_dev_specific_enable_acs(dev))
> >         goto disable_acs_redir;
> > 
> >     pci_std_enable_acs(dev);
> > 
> > 
> > 
> > 
> > SO, is it not support in dtb?
> > 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: does dtb not support pci acs enable?
  2024-08-02  0:00   ` Bjorn Helgaas
@ 2024-08-05 13:40     ` Will Deacon
  2024-08-06 15:56     ` Robin Murphy
  1 sibling, 0 replies; 5+ messages in thread
From: Will Deacon @ 2024-08-05 13:40 UTC (permalink / raw)
  To: Bjorn Helgaas
  Cc: steven, linux-pci, Robin Murphy, Joerg Roedel, linux-arm-kernel,
	iommu, Vidya Sagar, Pavan Kondeti

On Thu, Aug 01, 2024 at 07:00:42PM -0500, Bjorn Helgaas wrote:
> On Thu, Aug 01, 2024 at 06:43:59PM -0500, Bjorn Helgaas wrote:
> > [+cc ARM, IOMMU folks; I don't know the answer, but maybe they do]
> 
> [+cc Vidya, Pavan, also see this recent thread:
> https://lore.kernel.org/r/PH8PR12MB667446D4A4CAD6E0A2F488B5B83F2@PH8PR12MB6674.namprd12.prod.outlook.com]

Specifically, it would be great to know if the diff from Pavan at the
end of that thread [1] helps you, Steven.

Will

[1] https://lore.kernel.org/r/f551eecc-33fa-4729-b004-64a532493705@quicinc.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: does dtb not support pci acs enable?
  2024-08-02  0:00   ` Bjorn Helgaas
  2024-08-05 13:40     ` Will Deacon
@ 2024-08-06 15:56     ` Robin Murphy
  1 sibling, 0 replies; 5+ messages in thread
From: Robin Murphy @ 2024-08-06 15:56 UTC (permalink / raw)
  To: Bjorn Helgaas, steven
  Cc: linux-pci, Will Deacon, Joerg Roedel, linux-arm-kernel, iommu,
	Vidya Sagar, Pavan Kondeti

On 2024-08-02 1:00 am, Bjorn Helgaas wrote:
> On Thu, Aug 01, 2024 at 06:43:59PM -0500, Bjorn Helgaas wrote:
>> [+cc ARM, IOMMU folks; I don't know the answer, but maybe they do]

Same story as before, it *is* nominally supported (per the linked 
thread), but DT-based IOMMU probing is still subtly broken so often ends 
up doing things too late to be effective. It can also go wrong the worse 
way round, wherein you may sometimes end up with multiple groups when 
you *don't* have ACS isolation between them, depending on the exact 
driver probe order.

Thanks,
Robin.

> 
> [+cc Vidya, Pavan, also see this recent thread:
> https://lore.kernel.org/r/PH8PR12MB667446D4A4CAD6E0A2F488B5B83F2@PH8PR12MB6674.namprd12.prod.outlook.com]
> 
>> On Fri, Jul 19, 2024 at 11:01:11PM +0800, steven wrote:
>>> Hello,
>>>
>>> I am a new person in PCI, I am trying to do something for iommu
>>> group on arm64 platform, I found if I boot the linux (5.10 kernel)
>>> kernel using UEFI + ACPI, it will work correctly. But if I boot it
>>> using UEFI + DTB, the iommu group not work, only one group present.
>>>
>>> I read the code, found that pci_acs_enable is set to 1 during
>>> acpi_init, but I can not find any code for dtb booting, so it will
>>> return "disable_acs_redir " during call pci_enable_acs.
>>>
>>> static void pci_enable_acs(struct pci_dev *dev)
>>> {
>>>      if (!pci_acs_enable)
>>>          goto disable_acs_redir;
>>>
>>>      if (!pci_dev_specific_enable_acs(dev))
>>>          goto disable_acs_redir;
>>>
>>>      pci_std_enable_acs(dev);
>>>
>>>
>>>
>>>
>>> SO, is it not support in dtb?
>>>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-08-06 15:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-19 15:01 does dtb not support pci acs enable? steven
2024-08-01 23:43 ` Bjorn Helgaas
2024-08-02  0:00   ` Bjorn Helgaas
2024-08-05 13:40     ` Will Deacon
2024-08-06 15:56     ` Robin Murphy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).