From: Manish Jaggi <mjaggi@caviumnetworks.com>
To: Julien Grall <julien.grall@citrix.com>,
Ian Campbell <ian.campbell@citrix.com>
Cc: Prasun Kapoor <Prasun.kapoor@caviumnetworks.com>,
"Kumar, Vijaya" <Vijaya.Kumar@caviumnetworks.com>,
Stefano Stabellini <stefano.stabellini@citrix.com>,
"Kulkarni, Ganapatrao" <Ganapatrao.Kulkarni@caviumnetworks.com>,
"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: PCI Pass-through in Xen ARM - Draft 2.
Date: Thu, 9 Jul 2015 16:00:20 +0530 [thread overview]
Message-ID: <559E4D3C.2010805@caviumnetworks.com> (raw)
In-Reply-To: <559E2BFA.3050903@citrix.com>
On Thursday 09 July 2015 01:38 PM, Julien Grall wrote:
> Hi Manish,
>
> On 09/07/2015 08:13, Manish Jaggi wrote:
>>>
>>> If this was a domctl there might be scope for accepting an
>>> implementation which made assumptions such as sbdf == deviceid. However
>>> I'd still like to see this topic given proper treatment in the design
>>> and not just glossed over with "this is how ThunderX does things".
>> I got your point.
>>> Or maybe the solution is simple and we should just do it now -- i.e.
>>> can
>>> we add a new field to the PHYSDEVOP_pci_host_bridge_add argument struct
>>> which contains the base deviceid for that bridge
>> deviceId would be same as sbdf. As we dont have a way to translate sbdf
>> to deviceID.
>
> I think we have to be clear in this design document about the
> different meaning.
>
> When the Device Tree is used, it's assumed that the deviceID will be
> equal to the requester ID and not the sbdf.
Does SMMU v2 has a concept of requesterID.
I see requesterID term in SMMUv3
>
> 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.
so you mean requesterID = pci_for_each_dma_alias(sbdf)
>
> When we have a PCI in hand, we have to find the requester ID for this
> device.
That is the question. How to map requesterID to sbdf
> On
Once ?
> we have it we can deduce the streamID and the deviceID. The way to do
> it will depend on whether we use device tree or ACPI:
> - For device tree, the streamID, and deviceID will be equal to the
> requester ID
what do you think should be streamID when a device is PCI EP and is
enumerated. Also per ARM SMMU 2.0 spec StreamID is implementation specific.
As per SMMUv3 specs
"For PCI, it is intended that StreamID is generated from the PCI
RequesterID. The generation function may be 1:1
where one Root Complex is hosted by one SMMU"
> - For ACPI, we would have to look up in the ACPI IORT.
>
> For the latter, I think they are static tables and therefore can be
> parse in Xen. So we wouldn't need to PHYSDEVOP_pci_host_bridge_add to
> pass an offset. This will also avoid any assumption that deviceID for
> a given root complex are always contiguous and make extendable for any
> new hardware require a different *ID.
>
> So what we really care is the requester ID. Although, I'm not sure if
> you can find it in Xen. If not, we may need to customize (i.e adding a
> new PHYSDEVOP) PCI add device to take a requesterID in parameter.
>
> Now, in the case of the guest, as we are only supporting device tree,
> we could make the assumption that requesterID == deviceID as long as
> this is exposed in a DOMCTL to allow us flexibility.
>
> It would make sense to extend DOMCTL_assign_device to take the vBDF
> (or requesterID?) in parameter.
>
> Regards,
>
next prev parent reply other threads:[~2015-07-09 10:30 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 [this message]
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
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
-- strict thread matches above, loose matches on Subject: below --
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=559E4D3C.2010805@caviumnetworks.com \
--to=mjaggi@caviumnetworks.com \
--cc=Ganapatrao.Kulkarni@caviumnetworks.com \
--cc=Prasun.kapoor@caviumnetworks.com \
--cc=Vijaya.Kumar@caviumnetworks.com \
--cc=ian.campbell@citrix.com \
--cc=julien.grall@citrix.com \
--cc=stefano.stabellini@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.