From: Manish Jaggi <mjaggi@caviumnetworks.com>
To: Ian Campbell <ian.campbell@citrix.com>, Jan Beulich <JBeulich@suse.com>
Cc: Prasun.kapoor@cavium.com,
Vijaya Kumar <Vijaya.Kumar@caviumnetworks.com>,
Julien Grall <julien.grall@linaro.org>,
"StefanoStabellini(Stefano.Stabellini@citrix.com)"
<stefano.stabellini@citrix.com>,
xen-devel@lists.xen.org
Subject: Re: RFC: [PATCH 1/3] Enhance platform support for PCI
Date: Fri, 20 Feb 2015 20:43:01 +0530 [thread overview]
Message-ID: <54E74EFD.9080807@caviumnetworks.com> (raw)
In-Reply-To: <1424444504.30924.282.camel@citrix.com>
On 20/02/15 8:31 pm, Ian Campbell wrote:
> On Fri, 2015-02-20 at 14:39 +0000, Jan Beulich wrote:
>>>>> On 20.02.15 at 15:26, <ian.campbell@citrix.com> wrote:
>>> On Fri, 2015-02-20 at 14:11 +0000, Jan Beulich wrote:
>>>> Otherwise,
>>>> just sequentially assign segment numbers as you discover them or
>>>> get them reported by Dom0. You could even have Dom0 tell you
>>>> the segment numbers (just like we do on x86),
>>> Aha, how does this work on x86 then? I've been looking for a hypercall
>>> which dom0 uses to tell Xen about PCI segments to no avail (I just find
>>> ones for registering actual devices).
>> But that's the one,
> that == physdev_pci_device_add?
>
> AFAICT that tells Xen about a given device existing on a particular
> segment, but doesn't tell Xen any of the properties of that segment.
>
>> plus the MMCFG reporting one (PHYSDEVOP_pci_mmcfg_reserved).
> This looks promising, but rather under-documented.
>
> #define PHYSDEVOP_pci_mmcfg_reserved 24
> struct physdev_pci_mmcfg_reserved {
> uint64_t address;
> uint16_t segment;
> uint8_t start_bus;
> uint8_t end_bus;
> uint32_t flags;
> };
>
> I suppose the first 4 fields correspond to entries in the MMCFG table?
> Which x86 Xen can parse and so can dom0, so dom0 can then make this
> hypercall, passing (address,segment,start_bus,end_bus) to set the flags?
>
> What is address the address of? The CFG space I think?
>
> On ARM with DT I think we only get given address, and something has to
> make up segment, start/end_bus I'm not sure where we would get them
> from.
>
> So although I think we could perhaps bend this interface to ARMs needs
> it would have rather different semantics to x86, i.e. instead of the
> "key" being (address,segment,start_bus,end_bus) and the "value" being
> flags it would be something like "key" = (address) and "value" =
> (segment,start_bus,end_bus,flags).
>
> I don't think reusing like that would be wise.
>
>> Without ACPI, how do you
>> know on ARM how to access config space for a particular
>> segment?
> That's the issue we are trying to resolve, with device tree there is no
> explicit segment ID, so we have an essentially unindexed set of PCI
> buses in both Xen and dom0.
>
> So something somewhere needs to make up a segment ID for each PCI bus
> and Xen and dom0 need to somehow agree on what the mapping is e.g. by
> the one which made up the segment ID telling the other or some other TBD
> means.
>
> On x86 you solve this because both Xen and dom0 can parse the same table
> and reach the same answer, sadly DT doesn't have everything needed in
> it.
In fact xen and dom0 use the same device tree nodes and in the same
order. xen creates the device tree for dom0.
I think xen can enforce the ABI while creating device tree
>
> Ian.
>
next prev parent reply other threads:[~2015-02-20 15:13 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 [this message]
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
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=54E74EFD.9080807@caviumnetworks.com \
--to=mjaggi@caviumnetworks.com \
--cc=JBeulich@suse.com \
--cc=Prasun.kapoor@cavium.com \
--cc=Vijaya.Kumar@caviumnetworks.com \
--cc=ian.campbell@citrix.com \
--cc=julien.grall@linaro.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox