Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 Mar 2014 16:12:17 +0200
From:      Konstantin Belousov <kostikbel@gmail.com>
To:        Ryan Stone <rysto32@gmail.com>
Cc:        "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>
Subject:   Re: [PATCH] Support PCIe Alternative RID Interpretation (ARI)
Message-ID:  <20140316141216.GA21331@kib.kiev.ua>
In-Reply-To: <CAFMmRNzL3uBZ-djWgpnKi3XDQdq4c1ODAL_8E-Vpy-dPLa-hog@mail.gmail.com>
References:  <CAFMmRNzL3uBZ-djWgpnKi3XDQdq4c1ODAL_8E-Vpy-dPLa-hog@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--yrj/dFKFPuw6o+aM
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Fri, Mar 14, 2014 at 10:06:12PM -0400, Ryan Stone wrote:
> http://people.freebsd.org/~rstone/patches/pci_ari.diff
>=20
> This patch add support for PCIe Alternative RID Interpretation (ARI)
> to our PCI implementation.  ARI is an optional feature in PCIe; when
> it is enabled on a endpoint device that device can have up to 256 PCI
> functions (increased from 8).  This is implemented by re-interpreting
> the 5-bit slot number as being part of the function number.  The slot
> number for all such functions will implicitly be 0.
>=20
> There are two main changes here.  The first changes PCI enumeration to
> explicitly probe slot 0, function 0 separate from all other devices.
> This is necessary because we must check whether the device supports
> ARI and enable it before enumerating the rest of the devices.
Am I reading the patch correctly, that device (0, 0, 200) would return
slot 0 and function 200 from pci_get_slot() and pci_get_function() ?
This is expected, but it would break VT-d busdma, I think.

This is not said in the VT-d spec about ARI, but I believe that
DMAR would split the function number by 7-3/2-0 bits, same as for
the non-ARI devices.  Then the transactions will be translated by
the wrong context.

=46rom other minor notes, having additional line for "ARI enabled"
message under bootverbose would make already excessive PCI config
dump even more problematic.

--yrj/dFKFPuw6o+aM
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (FreeBSD)

iQIcBAEBAgAGBQJTJbFAAAoJEJDCuSvBvK1BkroP+wZ/m5Zcoje1tR7SFjmD8VPy
9HoPZwVQVWQmAmgGkqXm6YP7naP3FjP/E5qYoWhBfO335eTJTaTnmLt+1ClcjD3Q
zE1xfVajulQsi1/1q9mPt4rbN6TrVMmP9Qb/r8ClLdGH0VQZW550UuWuY7dlafV3
HXzuWSmKS18DdJ1bJgyNX7kyu0VgCEjVoDKiPJSCuiHp+VKRBjT8L6Zgar0N2W3q
FfSxbcoqVwzgVbP61xjL/A/3oeXeNqvE8khoDpYN2nDBpLL7zPAQ4XOBdxlvKR80
CBXNlCN9Mua5LboezdZVuGwsIECcGSnT08oBKLWsKL+y/A273iHk+mN0aWJnaOc8
vIaI9dlw+zEAzBoVEwOY9+a9WH0ijMWoZPUTTrtsxqolM3fJLlL7am5hsv/IYR9m
vlInpTt7LxQNSVUEgKo5fZpaCZMyw8PVT0/FSOMekVQTTlvuhlfcvksOYRsz44eW
iRXfOeFDI679NHP3ar/NJmF4JXbZ2r+ILg4QrOdXU0MBSBfSIBKETOU+8eYQA1Xh
5Jpo0RjQCoLvuK1fHG10pNw3SLrDjj7qBCG83s5YNszZPRzD+QoB/+Oh3PhfAGYy
maAnUlRRrS3+fgHCg6lEF5g8SslFRSxXG9fc5NfIq9D5Px5tGZ5eMpQyCoO28QL8
klXCEODgpQPWB1zcRM0D
=56wQ
-----END PGP SIGNATURE-----

--yrj/dFKFPuw6o+aM--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140316141216.GA21331>