[PATCH libpciaccess] linux: support 32 bit PCI domains

Alan Coopersmith alan.coopersmith at oracle.com
Tue Jul 11 04:39:02 UTC 2017


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?

-- 
	-Alan Coopersmith-               alan.coopersmith at oracle.com
	 Oracle Solaris Engineering - https://blogs.oracle.com/alanc


More information about the xorg-devel mailing list