From: Ian Campbell <ian.campbell@citrix.com>
To: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Cc: Prasun.kapoor@cavium.com,
Manish Jaggi <mjaggi@caviumnetworks.com>,
Vijaya Kumar <Vijaya.Kumar@caviumnetworks.com>,
Julien Grall <julien.grall@linaro.org>,
xen-devel@lists.xen.org,
"StefanoStabellini(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: Fri, 27 Feb 2015 14:42:46 +0000 [thread overview]
Message-ID: <1425048166.14641.217.camel@citrix.com> (raw)
In-Reply-To: <alpine.DEB.2.02.1502271426310.23507@kaball.uk.xensource.com>
On Fri, 2015-02-27 at 14:33 +0000, Stefano Stabellini wrote:
> On Thu, 26 Feb 2015, Ian Campbell wrote:
> > On Thu, 2015-02-26 at 15:39 +0530, Manish Jaggi wrote:
> > > Have you reached a conclusion?
> >
> > My current thinking on how PCI for Xen on ARM should look is thus:
> >
> > xen/arch/arm/pci.c:
> >
> > New file, containing core PCI infrastructure for ARM. Includes:
> >
> > pci_hostbridge_register(), which registers a host bridge:
> >
> > Registration includes:
> > DT node pointer
> >
> > CFG space address
> >
> > pci_hostbridge_ops function table, which
> > contains e.g. cfg space read/write ops, perhaps
> > other stuff).
> >
> > Function for setting the (segment,bus) for a given host bridge.
> > Lets say pci_hostbridge_setup(), the host bridge must have been
> > previously registered. Looks up the host bridge via CFG space
> > address and maps that to (segment,bus).
> >
> > Functions for looking up host bridges by various keys as needed
> > (cfg base address, DT node, etc)
> >
> > pci_init() function, called from somewhere appropriate in
> > setup.c which calls device_init(node, DEVICE_PCIHOST, NULL) (see
> > gic_init() for the shape of this)
> >
> > Any other common helper functions for managing PCI devices, e.g.
> > for implementing PHYSDEVOP_*, which cannot be made properly
> > common (i.e. shared with x86).
> >
> > xen/drivers/pci/host-*.c (or pci/host/*.c):
> >
> > New files, one per supported PCI controller IP block. Each
> > should use the normal DT_DEVICE infrastructure for probing,
> > i.e.:
> > DT_DEVICE_START(foo, "FOO", DEVICE_PCIHOST)
> >
> > Probe function should call pci_hostbridge_register() for each
> > host bridge which the controller exposes.
> >
> > xen/arch/arm/physdev.c:
> >
> > Implements do_physdev_op handling PHYSDEVOP_*. Includes:
> >
> > New hypercall subop PHYSDEVOP_pci_host_bridge_add:
> >
> > As per 1424703761.27930.140.camel@citrix.com> which
> > calls pci_hostbridge_setup() to map the (segment,bus) to
> > a specific pci_hostbridge_ops (i.e. must have previously
> > been registered with pci_hostbridge_register(), else
> > error).
>
> I think that the new hypercall is unnecessary. We know the MMCFG address
> ranges belonging to a given host bridge from DT and
> PHYSDEVOP_pci_mmcfg_reserved gives us segment, start_bus and end_bus for
> a specific MMCFG.
My understanding from discussion with Jan was that this is not what this
hypercall does, or at least that this would be an abuse of the existing
interface. See: <54E75D8702000078000621DD@mail.emea.novell.com>
Anyway, what happens for when there is no MMCFG table to drive dom0's
calls to pci_mmcfg_reserved? Or a given host-bridge doesn't have special
flags and so isn't mentioned there.
I think a dedicated hypercall is better.
Ian.
next prev parent reply other threads:[~2015-02-27 14:42 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 [this message]
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=1425048166.14641.217.camel@citrix.com \
--to=ian.campbell@citrix.com \
--cc=JBeulich@suse.com \
--cc=Prasun.kapoor@cavium.com \
--cc=Vijaya.Kumar@caviumnetworks.com \
--cc=julien.grall@linaro.org \
--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 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.