xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Julien Grall <julien.grall@citrix.com>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Ian Campbell <ian.campbell@citrix.com>,
	Manish Jaggi <mjaggi@caviumnetworks.com>,
	Prasun Kapoor <Prasun.kapoor@caviumnetworks.com>,
	"Kumar, Vijaya" <Vijaya.Kumar@caviumnetworks.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
	Stefano Stabellini <stefano.stabellini@citrix.com>,
	"Kulkarni, Ganapatrao" <Ganapatrao.Kulkarni@caviumnetworks.com>
Subject: Re: PCI Pass-through in Xen ARM - Draft 2.
Date: Tue, 14 Jul 2015 18:58:29 +0200	[thread overview]
Message-ID: <55A53FB5.20906@citrix.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1507141742150.17378@kaball.uk.xensource.com>

Hi Stefano,

On 14/07/2015 18:46, Stefano Stabellini wrote:
>>> Linux provides a function (pci_for_each_dma_alias) which will return a
>>> requester ID for a given PCI device. It appears that the BDF (the 's' of sBDF
>>> is only internal to Linux and not part of the hardware) is equal to the
>>> requester ID on your platform but we can't assume it for anyone else.
>>
>> The PCI Express Base Specification states that the requester ID is "The
>> combination of a Requester's Bus Number, Device Number, and Function
>> Number that uniquely identifies the Requester."
>>
>> I think it is safe to assume BDF = requester ID on all platforms.
>
> With the catch that in case of ARI devices
> (http://pcisig.com/sites/default/files/specification_documents/ECN-alt-rid-interpretation-070604.pdf),
> BDF is actually BF because the device number is always 0 and the
> function number is 8 bits.

And some other problem such as broken PCI device...
Both Xen x86 (domain_context_mapping in drivers/passthrough/vtd/iommu.c) 
and Linux (pci_dma_for_each_alias) use a code more complex than 
requesterID = BDF.

So I don't think we can use requesterID = BDF in physdev op unless we 
are *stricly* sure this is valid.

Although, based on the x86 code, Xen should be able to translate the BDF 
into the requester ID...

Regards,

-- 
Julien Grall

  reply	other threads:[~2015-07-14 16:58 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-28 18:38 PCI Pass-through in Xen ARM - Draft 2 Manish Jaggi
2015-06-29 10:31 ` Julien Grall
2015-06-29 10:50   ` Ian Campbell
2015-06-29 11:00     ` Julien Grall
2015-07-05  5:55   ` Manish Jaggi
2015-07-06  6:13     ` Manish Jaggi
2015-07-06  9:11     ` Ian Campbell
2015-07-06 10:06       ` Manish Jaggi
2015-07-06 10:20         ` Ian Campbell
2015-07-29  9:37           ` Manish Jaggi
2015-07-30  9:54             ` Ian Campbell
2015-07-30 12:51               ` Manish Jaggi
2015-07-30 14:39                 ` Ian Campbell
2015-07-31  7:46                   ` Manish Jaggi
2015-07-31  8:05                     ` Ian Campbell
2015-07-31 10:32                       ` Ian Campbell
2015-07-31 14:24                         ` Konrad Rzeszutek Wilk
2015-07-31 11:07                       ` Manish Jaggi
2015-07-31 11:19                         ` Ian Campbell
2015-07-31 12:50                           ` Manish Jaggi
2015-07-31 12:57                             ` Ian Campbell
2015-07-31 12:59                             ` Julien Grall
2015-07-31 13:27                               ` Ian Campbell
2015-07-31 14:33                               ` Manish Jaggi
2015-07-31 14:56                                 ` Julien Grall
2015-07-31 15:12                                   ` Manish Jaggi
2015-07-31 15:13                                     ` Julien Grall
2015-07-06 10:43     ` Julien Grall
2015-07-06 11:09       ` Manish Jaggi
2015-07-06 11:45         ` Julien Grall
2015-07-07  7:10           ` Manish Jaggi
2015-07-07  8:18             ` Julien Grall
2015-07-07  8:46               ` Manish Jaggi
2015-07-07 10:54                 ` Manish Jaggi
2015-07-07 11:24                 ` Ian Campbell
2015-07-09  7:13                   ` Manish Jaggi
2015-07-09  8:08                     ` Julien Grall
2015-07-09 10:30                       ` Manish Jaggi
2015-07-09 13:57                         ` Julien Grall
2015-07-10  6:07                           ` Pranavkumar Sawargaonkar
2015-07-14 16:37                       ` Stefano Stabellini
2015-07-14 16:46                         ` Stefano Stabellini
2015-07-14 16:58                           ` Julien Grall [this message]
2015-07-14 18:01                             ` Stefano Stabellini
2015-07-22  5:41                               ` Manish Jaggi
2015-07-22  8:34                                 ` Julien Grall
2015-07-14 16:47                   ` Stefano Stabellini
2015-07-07 15:27     ` Konrad Rzeszutek Wilk
2015-06-29 15:34 ` Ian Campbell
2015-07-05  6:07 Manish Jaggi
2015-07-06  9:07 ` Ian Campbell

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=55A53FB5.20906@citrix.com \
    --to=julien.grall@citrix.com \
    --cc=Ganapatrao.Kulkarni@caviumnetworks.com \
    --cc=Prasun.kapoor@caviumnetworks.com \
    --cc=Vijaya.Kumar@caviumnetworks.com \
    --cc=ian.campbell@citrix.com \
    --cc=mjaggi@caviumnetworks.com \
    --cc=stefano.stabellini@citrix.com \
    --cc=stefano.stabellini@eu.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).