From: Manish Jaggi <mjaggi@caviumnetworks.com>
To: Julien Grall <julien.grall@linaro.org>
Cc: prasun.kapoor@cavium.com, Ian Campbell <ian.campbell@citrix.com>,
"Kumar, Vijaya" <vijaya.kumar@caviumnetworks.com>,
xen-devel@lists.xen.org,
"Stefano Stabellini (Stefano.Stabellini@citrix.com)"
<stefano.stabellini@citrix.com>, Jan Beulich <jbeulich@suse.com>
Subject: Re: RFC: [PATCH 1/3] Enhance platform support for PCI
Date: Tue, 24 Feb 2015 05:53:26 +0530 [thread overview]
Message-ID: <54EBC47E.4040801@caviumnetworks.com> (raw)
In-Reply-To: <54EB9E13.7060802@linaro.org>
On 24/02/15 3:09 am, Julien Grall wrote:
> On 23/02/2015 17:12, Manish Jaggi wrote:
>>
>> On 23/02/15 8:45 pm, Julien Grall wrote:
>>> On 23/02/15 11:50, Manish Jaggi wrote:
>>>> On 23/02/15 4:44 pm, Julien Grall wrote:
>>>>>
>>>>> On 23/02/2015 10:59, Manish Jaggi wrote:
>>>>>> On 20/02/15 8:09 pm, Ian Campbell wrote:
>>>>>>> On Fri, 2015-02-20 at 19:44 +0530, Manish Jaggi wrote:
>>>>>>>>> Another option might be a new hypercall (assuming one doesn't
>>>>>>>>> already
>>>>>>>>> exist) to register a PCI bus which would take e.g. the PCI CFG
>>>>>>>>> base
>>>>>>>>> address and return a new u16 segment id to be used for all
>>>>>>>>> subsequent
>>>>>>>>> PCI related calls. This would require the dom0 OS to hook its
>>>>>>>>> pci_bus_add function, which might be doable (more doable than
>>>>>>>>> handling
>>>>>>>>> xen_segment_id DT properties I think).
>>>>>>>> This seems ok, i will try it out.
>>>>>>> I recommend you let this subthread (e.g. the conversation with Jan)
>>>>>>> settle upon a preferred course of action before implementing any
>>>>>>> one
>>>>>>> suggestion.
>>>>>> Ian we have also to consider for NUMA / multi node where there
>>>>>> are two
>>>>>> or more its nodes.
>>>>>> pci0{
>>>>>>
>>>>>> msi-parent = <&its0>;
>>>>>> }
>>>>>>
>>>>>> pci1{
>>>>>>
>>>>>> msi-parent = <&its1>;
>>>>>> }
>>>>>>
>>>>>> This requires parsing pci nodes in xen and create a mapping between
>>>>>> pci
>>>>>> nodes and its. Xe would need to be aware of PCI nodes in device tree
>>>>>> prior to dom0 sending a hypercall. Adding a property to pci node in
>>>>>> device tree should be a good approach.
>>>>> Why do you need it early? Wouldn't be sufficient to retrieve those
>>>>> information when the hypercall pci_device_add is called?
>>>>>
>>>> The dom0/U device tree should have one 1 its node, xen should map to
>>>> specific its when trapped.
>>> The DOM0 device tree should expose the same layout as the hardware. By
>>> exposing only one ITS you make your life more complicate.
>> in what way?
>
> Because you have to parse all the device tree to remove the reference
> to the second ITS. It's pointless and can be difficult to do it.
>
Could you please describe the case where it is difficult
> If you are able to emulate on ITS, you can do it for multiple one.
keeping it simple and similar across dom0/domUs
Consider a case where a domU is assigned two PCI devices which are
attached to different nodes. (Node is an entity having its own cores are
host controllers).
Currently for PCI pass-through xen has a virtual PCI bus in domU. In our
implementation we attach a msi controller which is gic-v3-its to this
bus in pci-front. Since there is a single bus you cannot attach 2 msi
controllers. So xen would have to map the commands from virtual ITS to
different physical ITS based on the deviceID / collection ID.
>
>>> PHYSDEVOP_pci_device_add should be called before any initialization is
>>> done. Therefore ITS should be configured for this PCI after Xen is
>>> aware
>>> of the PCI.
>> That is for a device, I believe all devices on a host bridge are
>> serviced by a single ITS
>
> Why do you speak about host bridge? Do you need to configure the ITS
> at boot time for the host bridge?
>
> Do you have any spec stating there is one ITS per host bridge?
>
I was referring to the mapping between ITS and PCI host bridge and not
between a PCI end point / device which is added by the said hypercall.
ITS is per node.It is always after but ITS for the PCI node is known to
Xen before dom0 is started.
>>>
>>> IHMO, any ITS trap before this is wrong.
>> AFAIK guest always sees a virtual ITS, could you please explain what is
>> wrong in trapping.
>
> I never say the trapping is wrong in all case.... The "before" was
> here for any trap before the PCI has been added to Xen is, IHMO, wrong.
>
There is no trap before.
> Regards,
>
next prev parent reply other threads:[~2015-02-24 0:23 UTC|newest]
Thread overview: 70+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-20 11:34 RFC: [PATCH 1/3] Enhance platform support for PCI Manish Jaggi
2015-02-20 12:03 ` Julien Grall
2015-02-20 12:10 ` Manish Jaggi
2015-02-20 12:20 ` Julien Grall
2015-02-20 12:34 ` Manish Jaggi
2015-02-20 13:01 ` Manish Jaggi
2015-02-20 13:45 ` Ian Campbell
2015-02-20 14:11 ` Jan Beulich
2015-02-20 14:26 ` Ian Campbell
2015-02-20 14:39 ` Jan Beulich
2015-02-20 15:01 ` Ian Campbell
2015-02-20 15:13 ` Manish Jaggi
2015-02-20 15:15 ` Julien Grall
2015-02-20 15:15 ` Jan Beulich
2015-02-20 17:33 ` Ian Campbell
2015-02-23 8:43 ` Jan Beulich
2015-02-23 12:45 ` Ian Campbell
2015-02-23 14:07 ` Jan Beulich
2015-02-23 14:33 ` Ian Campbell
2015-02-23 14:45 ` Jan Beulich
2015-02-23 15:02 ` Ian Campbell
2015-02-23 15:27 ` Jan Beulich
2015-02-23 15:46 ` Ian Campbell
2015-02-23 16:20 ` Jan Beulich
2015-02-26 10:09 ` Manish Jaggi
2015-02-26 10:30 ` Jan Beulich
2015-02-26 11:05 ` Ian Campbell
2015-02-27 14:33 ` Stefano Stabellini
2015-02-27 14:42 ` Ian Campbell
2015-02-27 14:54 ` Stefano Stabellini
2015-02-27 15:24 ` Ian Campbell
2015-02-27 15:29 ` Ian Campbell
2015-02-27 16:35 ` Jan Beulich
2015-02-27 16:50 ` Ian Campbell
2015-02-27 17:15 ` Stefano Stabellini
2015-03-02 11:48 ` Ian Campbell
2015-03-03 9:19 ` Manish Jaggi
2015-03-17 5:26 ` Manish Jaggi
2015-03-17 7:28 ` Jan Beulich
2015-03-17 12:06 ` Manish Jaggi
2015-03-17 12:31 ` Jan Beulich
2015-03-18 4:05 ` Manish Jaggi
2015-03-17 13:17 ` Konrad Rzeszutek Wilk
2015-03-11 18:26 ` Stefano Stabellini
2015-03-12 9:16 ` Jan Beulich
2015-03-12 10:33 ` Stefano Stabellini
2015-03-12 11:28 ` Jan Beulich
2015-03-12 9:30 ` Ian Campbell
2015-02-20 14:14 ` Manish Jaggi
2015-02-20 14:39 ` Ian Campbell
2015-02-23 10:59 ` Manish Jaggi
2015-02-23 11:14 ` Julien Grall
2015-02-23 11:50 ` Manish Jaggi
2015-02-23 15:15 ` Julien Grall
2015-02-23 17:12 ` Manish Jaggi
2015-02-23 21:39 ` Julien Grall
2015-02-24 0:23 ` Manish Jaggi [this message]
2015-02-24 13:43 ` Julien Grall
2015-02-25 2:33 ` Manish Jaggi
2015-02-25 10:20 ` Ian Campbell
2015-02-26 10:49 ` Vijay Kilari
2015-02-26 11:12 ` Ian Campbell
2015-02-26 13:58 ` Julien Grall
2015-02-26 14:46 ` Pranavkumar Sawargaonkar
2015-02-26 15:17 ` Julien Grall
2015-02-27 10:11 ` Pranavkumar Sawargaonkar
2015-02-27 10:38 ` Ian Campbell
2015-02-27 13:22 ` Ian Campbell
2015-02-27 13:59 ` Vijay Kilari
2015-02-20 13:37 ` 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=54EBC47E.4040801@caviumnetworks.com \
--to=mjaggi@caviumnetworks.com \
--cc=ian.campbell@citrix.com \
--cc=jbeulich@suse.com \
--cc=julien.grall@linaro.org \
--cc=prasun.kapoor@cavium.com \
--cc=stefano.stabellini@citrix.com \
--cc=vijaya.kumar@caviumnetworks.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.