All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: "Roger Pau Monné" <roger.pau@citrix.com>
Cc: Tim Deegan <tim@xen.org>, Kevin Tian <kevin.tian@intel.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	Wei Liu <wei.liu2@citrix.com>,
	George Dunlap <George.Dunlap@eu.citrix.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>,
	xen-devel@lists.xen.org,
	Crawford Eric R <Eric.R.Crawford@intel.com>
Subject: Re: [PATCH v7] VT-d: use correct BDF for VF to search VT-d unit
Date: Wed, 23 Aug 2017 01:20:13 -0600	[thread overview]
Message-ID: <599D48CD0200007800172497@prv-mh.provo.novell.com> (raw)
In-Reply-To: <20170823071600.tnns5ywvhevqnmjz@dhcp-3-128.uk.xensource.com>

>>> On 23.08.17 at 09:16, <roger.pau@citrix.com> 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, <chao.gao@intel.com> wrote:
>> >> --- a/xen/include/xen/pci.h
>> >> +++ b/xen/include/xen/pci.h
>> >> @@ -39,6 +39,10 @@
>> >>  #define PCI_SBDF3(s,b,df) ((((s) & 0xffff) << 16) | PCI_BDF2(b, df))
>> >>  
>> >>  struct pci_dev_info {
>> >> +    /*
>> >> +     * When 'is_virtfn' is set, 'is_extfn' is re-used to indicate whether
>> >> +     * the PF of this VF is an extended function.
>> >> +     */
>> >
>> >I'd be inclined to extend the comment by appending ", as a VF itself
>> >can never be an extended function." Is that correct? If so, would
>> 
>> Hi, Jan and Roger.
>> 
>> 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 used as we don't care about whether a VF is or not an
>> extended function (at least at present).
>> 
>> Eric reviewed this patch and told me we may match
>> 'if ( pdev->info.is_extfn )' in acpi_find_matched_drhd_unit.
>> So we may introduce a new field like what I do in v6 or check
>> 'pdev->info.is_virtfn' first in acpi_find_matched_drhd_unit (maybe other
>> places we check pdev->info.is_extfn).
>> 
>> Which one do you prefer?
> 
> Looking at this again I'm not sure why you need any modifications to
> acpi_find_matched_drhd_unit. If the virtual function is an extended
> function pdev->bus should be equal to pdev->info.physfn.bus, in which
> case the already existing is_extfn check will already DTRT?
> 
> Ie: an extended VF should always have the same bus as the PF it
> belongs to, unless I'm missing something.

Why would that be?

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  reply	other threads:[~2017-08-23  7:20 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-21 21:52 [PATCH v7] VT-d: use correct BDF for VF to search VT-d unit Chao Gao
2017-08-22  7:29 ` Roger Pau Monné
2017-08-22  8:48   ` Chao Gao
2017-08-22 12:43 ` Jan Beulich
2017-08-23  1:05   ` Chao Gao
2017-08-23  7:16     ` Roger Pau Monné
2017-08-23  7:20       ` Jan Beulich [this message]
2017-08-23  7:31         ` Roger Pau Monné
2017-08-23  6:46           ` Chao Gao
2017-08-23  8:01             ` Roger Pau Monné
2017-08-23  7:42               ` Chao Gao
2017-08-23  8:52                 ` Jan Beulich
2017-08-24  7:29                   ` Tian, Kevin
2017-08-23  8:00           ` Jan Beulich
2017-08-23  8:04     ` Jan Beulich
2017-08-23  7:39       ` Chao Gao
2017-08-23  8:51         ` Jan Beulich
2017-08-24  7:22 ` Tian, Kevin
     [not found] ` <AADFC41AFE54684AB9EE6CBC0274A5D190D80DD6@SHSMSX101.ccr.corp.intel.com>
2017-08-24  8:01   ` Tian, Kevin
2017-08-24  8:22     ` Jan Beulich
2017-08-24  9:36       ` Chao Gao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=599D48CD0200007800172497@prv-mh.provo.novell.com \
    --to=jbeulich@suse.com \
    --cc=Eric.R.Crawford@intel.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=kevin.tian@intel.com \
    --cc=roger.pau@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=tim@xen.org \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.