Skip to contentSkip to conversation

does dtb not support pci acs enable?

DISCUSSION steven 4 participants 5 messages Jul 19, 2024 – Aug 6, 2024 PCI

lore
Share & tools
lore

steven

author
#0 lore raw

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?

#1 lore raw

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

Quoted 26 lines · steven

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?

#2 lore raw
Quoted 1 line · Bjorn Helgaas

[+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]

Quoted 27 lines · steven
Quoted 26 lines

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?

#4 lore raw
In reply to Bjorn Helgaas
Quoted 2 lines · Bjorn Helgaas
Quoted 1 line · Bjorn Helgaas

[+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.

Quoted 31 lines

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

Quoted 27 lines · steven
Quoted 26 lines

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?