[PATCH libpciaccess] linux: support 32 bit PCI domains
Emil Velikov
emil.l.velikov at gmail.com
Tue Jul 11 09:33:56 UTC 2017
On 11 July 2017 at 05:39, Alan Coopersmith <alan.coopersmith at oracle.com> wrote:
> On 07/10/17 11:35 AM, Stephen Hemminger wrote:
>>
>> The PCI domain maybe larger than 16 bits on Microsoft Azure and other
>> virtual environments. PCI busses reported by ACPI are limited to
>> 16 bits, but in Azure the domain value for pass through devices is
>> intentionally larger than 16 bits to avoid clashing with local
>> devices. This is needed to support pass through of GPU devices.
>>
>> Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=101744
>> Signed-off-by: Stephen Hemminger <sthemmin at microsoft.com>
>> ---
>> include/pciaccess.h | 2 +-
>> src/linux_sysfs.c | 16 +++-------------
>> 2 files changed, 4 insertions(+), 14 deletions(-)
>>
>> diff --git a/include/pciaccess.h b/include/pciaccess.h
>> index 1d7aa4beabfd..93ed76f3cd25 100644
>> --- a/include/pciaccess.h
>> +++ b/include/pciaccess.h
>> @@ -321,7 +321,7 @@ struct pci_device {
>> * the domain will always be zero.
>> */
>> /*@{*/
>> - uint16_t domain;
>> + uint32_t domain;
>> uint8_t bus;
>> uint8_t dev;
>> uint8_t func;
>
>
> Isn't that going to break the ABI?
>
Yes it will. There was a similar patch a year ago[1], which ultimately
led to trimming the upper bits of the domain.
Now that there's an actual need for said data, it might be worth
looking into the suggestions put in the earlier thread.
Stephen, can you give that a try?
-Emil
[1] https://lists.freedesktop.org/archives/xorg-devel/2016-August/050586.html
More information about the xorg-devel
mailing list