lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <76dd8909-d1bc-c282-bca0-6c4da2ac0fed@redhat.com>
Date:	Mon, 13 Jun 2016 14:41:36 +0200
From:	Auger Eric <eric.auger@...hat.com>
To:	Robin Murphy <robin.murphy@....com>, Wei Chen <Wei.Chen@....com>,
	linux-arm-kernel@...ts.infradead.org
Cc:	iommu@...ts.linux-foundation.org, will.deacon@....com,
	linux-kernel@...r.kernel.org, steve.capper@....com
Subject: Re: [PATCH] iommu/arm-smmu: request pcie devices to enable ACS

Wei,
Le 13/06/2016 à 13:18, Robin Murphy a écrit :
> On 13/06/16 10:20, Wei Chen wrote:
>> The PCIe ACS capability will affect the layout of iommu groups.
>> Generally speaking, if the path from root port to the PCIe device
>> is ACS enabled, the iommu will create a single iommu group for this
>> PCIe device. If all PCIe devices on the path are ACS enabled then
>> Linux can determine this path is ACS enabled.
>>
>> Linux use two PCIe configuration registers to determine the ACS
>> status of PCIe devices:
>> ACS Capability Register and ACS Control Register.
>>
>> The first register is used to check the implementation of ACS function
>> of a PCIe device, the second register is used to check the enable status
>> of ACS function. If one PCIe device has implemented and enabled the ACS
>> function then Linux will determine this PCIe device enabled ACS.
>>
>>  From the Chapter:6.12 of PCI Express Base Specification Revision 3.1a,
>> we can find that when a PCIe device implements ACS function, the enable
>> status is set to disabled by default and can be enabled by ACS-aware
>> software.
>>
>> ACS will affect the iommu groups topology, so, the iommu driver is
>> ACS-aware software. This patch adds a call to pci_request_acs() to the
>> arm-smmu driver to enable the ACS function in PCIe devices that support
>> it.
nit: I would add ", when they get probed."

Besides Reviewed-by: Eric Auger <eric.auger@...hat.com>

Best Regards

Eric
>>
>> Signed-off-by: Wei Chen <Wei.Chen@....com>
> 
> Makes sense to me:
> 
> Reviewed-by: Robin Murphy <robin.murphy@....com>
> 
> p.s. The confidential disclaimer is a good way to get patches ignored
> here on the lists - please check with Steve about getting set up on the
> appropriate SMTP server.
> 
> Robin.
> 
>> ---
>>   drivers/iommu/arm-smmu-v3.c | 2 ++
>>   drivers/iommu/arm-smmu.c    | 4 +++-
>>   2 files changed, 5 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/iommu/arm-smmu-v3.c b/drivers/iommu/arm-smmu-v3.c
>> index 94b6821..30ea899 100644
>> --- a/drivers/iommu/arm-smmu-v3.c
>> +++ b/drivers/iommu/arm-smmu-v3.c
>> @@ -2686,6 +2686,8 @@ static int __init arm_smmu_init(void)
>>          if (ret)
>>                  return ret;
>>
>> +       pci_request_acs();
>> +
>>          return bus_set_iommu(&pci_bus_type, &arm_smmu_ops);
>>   }
>>
>> diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-smmu.c
>> index 9345a3f..ab365ec 100644
>> --- a/drivers/iommu/arm-smmu.c
>> +++ b/drivers/iommu/arm-smmu.c
>> @@ -2096,8 +2096,10 @@ static int __init arm_smmu_init(void)
>>   #endif
>>
>>   #ifdef CONFIG_PCI
>> -       if (!iommu_present(&pci_bus_type))
>> +       if (!iommu_present(&pci_bus_type)) {
>> +               pci_request_acs();
>>                  bus_set_iommu(&pci_bus_type, &arm_smmu_ops);
>> +       }
>>   #endif
>>
>>          return 0;
>> -- 
>> 2.7.4
>>
>> IMPORTANT NOTICE: The contents of this email and any attachments are
>> confidential and may also be privileged. If you are not the intended
>> recipient, please notify the sender immediately and do not disclose
>> the contents to any other person, use it for any purpose, or store or
>> copy the information in any medium. Thank you.
>>
>> _______________________________________________
>> iommu mailing list
>> iommu@...ts.linux-foundation.org
>> https://lists.linuxfoundation.org/mailman/listinfo/iommu
>>
> 
> _______________________________________________
> iommu mailing list
> iommu@...ts.linux-foundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/iommu

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ