Re: [Xen-devel] [PATCH v7] VT-d: use correct BDF for VF to search VT-d unit

2017-08-24 Thread Chao Gao
On Thu, Aug 24, 2017 at 02:22:47AM -0600, Jan Beulich wrote: On 24.08.17 at 10:01, wrote: >>> From: Tian, Kevin >>> Sent: Thursday, August 24, 2017 3:22 PM >>> >>> > From: Gao, Chao >>> > Sent: Tuesday, August 22, 2017 5:52 AM >>> > >>> > When SR-IOV is enabled,

Re: [Xen-devel] [PATCH v7] VT-d: use correct BDF for VF to search VT-d unit

2017-08-24 Thread Jan Beulich
>>> On 24.08.17 at 10:01, wrote: >> From: Tian, Kevin >> Sent: Thursday, August 24, 2017 3:22 PM >> >> > From: Gao, Chao >> > Sent: Tuesday, August 22, 2017 5:52 AM >> > >> > When SR-IOV is enabled, 'Virtual Functions' of a 'Physical Function' are >> > under >> > the scope

Re: [Xen-devel] [PATCH v7] VT-d: use correct BDF for VF to search VT-d unit

2017-08-24 Thread Tian, Kevin
> From: Tian, Kevin > Sent: Thursday, August 24, 2017 3:22 PM > > > From: Gao, Chao > > Sent: Tuesday, August 22, 2017 5:52 AM > > > > When SR-IOV is enabled, 'Virtual Functions' of a 'Physical Function' are > > under > > the scope of the same VT-d unit as the 'Physical Function'. A 'Physical > >

Re: [Xen-devel] [PATCH v7] VT-d: use correct BDF for VF to search VT-d unit

2017-08-24 Thread Tian, Kevin
> From: Jan Beulich [mailto:jbeul...@suse.com] > Sent: Wednesday, August 23, 2017 4:53 PM > > >>> On 23.08.17 at 09:42, wrote: > > On Wed, Aug 23, 2017 at 09:01:07AM +0100, Roger Pau Monné wrote: > >>On Wed, Aug 23, 2017 at 02:46:08PM +0800, Chao Gao wrote: > >>> On Wed, Aug

Re: [Xen-devel] [PATCH v7] VT-d: use correct BDF for VF to search VT-d unit

2017-08-24 Thread Tian, Kevin
> From: Gao, Chao > Sent: Tuesday, August 22, 2017 5:52 AM > > When SR-IOV is enabled, 'Virtual Functions' of a 'Physical Function' are > under > the scope of the same VT-d unit as the 'Physical Function'. A 'Physical > Function' can be a 'Traditional Function' or an ARI 'Extended Function'. >

Re: [Xen-devel] [PATCH v7] VT-d: use correct BDF for VF to search VT-d unit

2017-08-23 Thread Jan Beulich
>>> On 23.08.17 at 09:42, wrote: > On Wed, Aug 23, 2017 at 09:01:07AM +0100, Roger Pau Monné wrote: >>On Wed, Aug 23, 2017 at 02:46:08PM +0800, Chao Gao wrote: >>> On Wed, Aug 23, 2017 at 08:31:51AM +0100, Roger Pau Monné wrote: >>> >On Wed, Aug 23, 2017 at 01:20:13AM -0600,

Re: [Xen-devel] [PATCH v7] VT-d: use correct BDF for VF to search VT-d unit

2017-08-23 Thread Jan Beulich
>>> On 23.08.17 at 09:39, wrote: > On Wed, Aug 23, 2017 at 02:04:24AM -0600, Jan Beulich wrote: > On 23.08.17 at 03:05, wrote: >>> Strictly speaking, the VF can be an extended function. The definition is >>> within ARI device (in this kind of device,

Re: [Xen-devel] [PATCH v7] VT-d: use correct BDF for VF to search VT-d unit

2017-08-23 Thread Chao Gao
On Wed, Aug 23, 2017 at 09:01:07AM +0100, Roger Pau Monné wrote: >On Wed, Aug 23, 2017 at 02:46:08PM +0800, Chao Gao wrote: >> On Wed, Aug 23, 2017 at 08:31:51AM +0100, Roger Pau Monné wrote: >> >On Wed, Aug 23, 2017 at 01:20:13AM -0600, Jan Beulich wrote: >> >> >>> On 23.08.17 at 09:16,

Re: [Xen-devel] [PATCH v7] VT-d: use correct BDF for VF to search VT-d unit

2017-08-23 Thread Chao Gao
On Wed, Aug 23, 2017 at 02:04:24AM -0600, Jan Beulich wrote: On 23.08.17 at 03:05, wrote: >> Strictly speaking, the VF can be an extended function. The definition is >> within ARI device (in this kind of device, device field is treated as an >> extension of function

Re: [Xen-devel] [PATCH v7] VT-d: use correct BDF for VF to search VT-d unit

2017-08-23 Thread Jan Beulich
>>> On 23.08.17 at 03:05, wrote: > Strictly speaking, the VF can be an extended function. The definition is > within ARI device (in this kind of device, device field is treated as an > extension of function number) and function number is greater than 7. But > this field isn't

Re: [Xen-devel] [PATCH v7] VT-d: use correct BDF for VF to search VT-d unit

2017-08-23 Thread Roger Pau Monné
On Wed, Aug 23, 2017 at 02:46:08PM +0800, Chao Gao wrote: > On Wed, Aug 23, 2017 at 08:31:51AM +0100, Roger Pau Monné wrote: > >On Wed, Aug 23, 2017 at 01:20:13AM -0600, Jan Beulich wrote: > >> >>> On 23.08.17 at 09:16, wrote: > >> > On Wed, Aug 23, 2017 at 09:05:14AM +0800,

Re: [Xen-devel] [PATCH v7] VT-d: use correct BDF for VF to search VT-d unit

2017-08-23 Thread Jan Beulich
>>> On 23.08.17 at 09:31, wrote: > Maybe what I'm missing is whether it is possible to have a device with > virtual functions that expand across several buses? The typical (non-ARI) arrangement I've seen is for all VFs to always live on buses different from the PF (which is

Re: [Xen-devel] [PATCH v7] VT-d: use correct BDF for VF to search VT-d unit

2017-08-23 Thread Chao Gao
On Wed, Aug 23, 2017 at 08:31:51AM +0100, Roger Pau Monné wrote: >On Wed, Aug 23, 2017 at 01:20:13AM -0600, Jan Beulich wrote: >> >>> On 23.08.17 at 09:16, wrote: >> > On Wed, Aug 23, 2017 at 09:05:14AM +0800, Chao Gao wrote: >> >> On Tue, Aug 22, 2017 at 06:43:49AM -0600,

Re: [Xen-devel] [PATCH v7] VT-d: use correct BDF for VF to search VT-d unit

2017-08-23 Thread Roger Pau Monné
On Wed, Aug 23, 2017 at 01:20:13AM -0600, Jan Beulich wrote: > >>> On 23.08.17 at 09:16, wrote: > > On Wed, Aug 23, 2017 at 09:05:14AM +0800, Chao Gao wrote: > >> On Tue, Aug 22, 2017 at 06:43:49AM -0600, Jan Beulich wrote: > >> On 21.08.17 at 23:52,

Re: [Xen-devel] [PATCH v7] VT-d: use correct BDF for VF to search VT-d unit

2017-08-23 Thread Jan Beulich
>>> On 23.08.17 at 09:16, wrote: > On Wed, Aug 23, 2017 at 09:05:14AM +0800, Chao Gao wrote: >> On Tue, Aug 22, 2017 at 06:43:49AM -0600, Jan Beulich wrote: >> On 21.08.17 at 23:52, wrote: >> >> --- a/xen/include/xen/pci.h >> >> +++

Re: [Xen-devel] [PATCH v7] VT-d: use correct BDF for VF to search VT-d unit

2017-08-23 Thread Roger Pau Monné
On Wed, Aug 23, 2017 at 09:05:14AM +0800, Chao Gao wrote: > On Tue, Aug 22, 2017 at 06:43:49AM -0600, Jan Beulich wrote: > On 21.08.17 at 23:52, wrote: > >> --- a/xen/include/xen/pci.h > >> +++ b/xen/include/xen/pci.h > >> @@ -39,6 +39,10 @@ > >> #define

Re: [Xen-devel] [PATCH v7] VT-d: use correct BDF for VF to search VT-d unit

2017-08-22 Thread Chao Gao
On Tue, Aug 22, 2017 at 06:43:49AM -0600, Jan Beulich wrote: On 21.08.17 at 23:52, wrote: >> --- a/xen/include/xen/pci.h >> +++ b/xen/include/xen/pci.h >> @@ -39,6 +39,10 @@ >> #define PCI_SBDF3(s,b,df) s) & 0x) << 16) | PCI_BDF2(b, df)) >> >> struct

Re: [Xen-devel] [PATCH v7] VT-d: use correct BDF for VF to search VT-d unit

2017-08-22 Thread Jan Beulich
>>> On 21.08.17 at 23:52, wrote: > --- a/xen/include/xen/pci.h > +++ b/xen/include/xen/pci.h > @@ -39,6 +39,10 @@ > #define PCI_SBDF3(s,b,df) s) & 0x) << 16) | PCI_BDF2(b, df)) > > struct pci_dev_info { > +/* > + * When 'is_virtfn' is set, 'is_extfn' is

Re: [Xen-devel] [PATCH v7] VT-d: use correct BDF for VF to search VT-d unit

2017-08-22 Thread Chao Gao
On Tue, Aug 22, 2017 at 08:29:58AM +0100, Roger Pau Monné wrote: >On Tue, Aug 22, 2017 at 05:52:04AM +0800, Chao Gao wrote: >> When SR-IOV is enabled, 'Virtual Functions' of a 'Physical Function' are >> under >> the scope of the same VT-d unit as the 'Physical Function'. A 'Physical >> Function'

Re: [Xen-devel] [PATCH v7] VT-d: use correct BDF for VF to search VT-d unit

2017-08-22 Thread Roger Pau Monné
On Tue, Aug 22, 2017 at 05:52:04AM +0800, Chao Gao wrote: > When SR-IOV is enabled, 'Virtual Functions' of a 'Physical Function' are under > the scope of the same VT-d unit as the 'Physical Function'. A 'Physical > Function' can be a 'Traditional Function' or an ARI 'Extended Function'. > And

[Xen-devel] [PATCH v7] VT-d: use correct BDF for VF to search VT-d unit

2017-08-21 Thread Chao Gao
When SR-IOV is enabled, 'Virtual Functions' of a 'Physical Function' are under the scope of the same VT-d unit as the 'Physical Function'. A 'Physical Function' can be a 'Traditional Function' or an ARI 'Extended Function'. And furthermore, 'Extended Functions' on an endpoint are under the scope