From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Julien Grall <julien@xen.org>
Cc: Rahul Singh <Rahul.Singh@arm.com>,
Bertrand Marquis <Bertrand.Marquis@arm.com>,
Stefano Stabellini <sstabellini@kernel.org>,
Jan Beulich <jbeulich@suse.com>,
"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
nd <nd@arm.com>, Julien Grall <julien.grall.oss@gmail.com>
Subject: Re: RFC: PCI devices passthrough on Arm design proposal
Date: Mon, 20 Jul 2020 10:47:34 +0200 [thread overview]
Message-ID: <20200720084734.GE7191@Air-de-Roger> (raw)
In-Reply-To: <0c76b6a0-2242-3bbd-9740-75c5580e93e8@xen.org>
On Fri, Jul 17, 2020 at 05:18:46PM +0100, Julien Grall wrote:
>
>
> On 17/07/2020 17:08, Roger Pau Monné wrote:
> > On Fri, Jul 17, 2020 at 03:51:47PM +0000, Bertrand Marquis wrote:
> > >
> > >
> > > > On 17 Jul 2020, at 17:30, Roger Pau Monné <roger.pau@citrix.com> wrote:
> > > >
> > > > On Fri, Jul 17, 2020 at 03:23:57PM +0000, Bertrand Marquis wrote:
> > > > >
> > > > >
> > > > > > On 17 Jul 2020, at 17:05, Roger Pau Monné <roger.pau@citrix.com> wrote:
> > > > > >
> > > > > > On Fri, Jul 17, 2020 at 02:49:20PM +0000, Bertrand Marquis wrote:
> > > > > > >
> > > > > > >
> > > > > > > > On 17 Jul 2020, at 16:41, Roger Pau Monné <roger.pau@citrix.com> wrote:
> > > > > > > >
> > > > > > > > On Fri, Jul 17, 2020 at 02:34:55PM +0000, Bertrand Marquis wrote:
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > > On 17 Jul 2020, at 16:06, Jan Beulich <jbeulich@suse.com> wrote:
> > > > > > > > > >
> > > > > > > > > > On 17.07.2020 15:59, Bertrand Marquis wrote:
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > > On 17 Jul 2020, at 15:19, Jan Beulich <jbeulich@suse.com> wrote:
> > > > > > > > > > > >
> > > > > > > > > > > > On 17.07.2020 15:14, Bertrand Marquis wrote:
> > > > > > > > > > > > > > On 17 Jul 2020, at 10:10, Jan Beulich <jbeulich@suse.com> wrote:
> > > > > > > > > > > > > > On 16.07.2020 19:10, Rahul Singh wrote:
> > > > > > > > > > > > > > > # Emulated PCI device tree node in libxl:
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Libxl is creating a virtual PCI device tree node in the device tree to enable the guest OS to discover the virtual PCI during guest boot. We introduced the new config option [vpci="pci_ecam"] for guests. When this config option is enabled in a guest configuration, a PCI device tree node will be created in the guest device tree.
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > I support Stefano's suggestion for this to be an optional thing, i.e.
> > > > > > > > > > > > > > there to be no need for it when there are PCI devices assigned to the
> > > > > > > > > > > > > > guest anyway. I also wonder about the pci_ prefix here - isn't
> > > > > > > > > > > > > > vpci="ecam" as unambiguous?
> > > > > > > > > > > > >
> > > > > > > > > > > > > This could be a problem as we need to know that this is required for a guest upfront so that PCI devices can be assigned after using xl.
> > > > > > > > > > > >
> > > > > > > > > > > > I'm afraid I don't understand: When there are no PCI device that get
> > > > > > > > > > > > handed to a guest when it gets created, but it is supposed to be able
> > > > > > > > > > > > to have some assigned while already running, then we agree the option
> > > > > > > > > > > > is needed (afaict). When PCI devices get handed to the guest while it
> > > > > > > > > > > > gets constructed, where's the problem to infer this option from the
> > > > > > > > > > > > presence of PCI devices in the guest configuration?
> > > > > > > > > > >
> > > > > > > > > > > If the user wants to use xl pci-attach to attach in runtime a device to a guest, this guest must have a VPCI bus (even with no devices).
> > > > > > > > > > > If we do not have the vpci parameter in the configuration this use case will not work anymore.
> > > > > > > > > >
> > > > > > > > > > That's what everyone looks to agree with. Yet why is the parameter needed
> > > > > > > > > > when there _are_ PCI devices anyway? That's the "optional" that Stefano
> > > > > > > > > > was suggesting, aiui.
> > > > > > > > >
> > > > > > > > > I agree in this case the parameter could be optional and only required if not PCI device is assigned directly in the guest configuration.
> > > > > > > >
> > > > > > > > Where will the ECAM region(s) appear on the guest physmap?
> > > > > > > >
> > > > > > > > Are you going to re-use the same locations as on the physical
> > > > > > > > hardware, or will they appear somewhere else?
> > > > > > >
> > > > > > > We will add some new definitions for the ECAM regions in the guest physmap declared in xen (include/asm-arm/config.h)
> > > > > >
> > > > > > I think I'm confused, but that file doesn't contain anything related
> > > > > > to the guest physmap, that's the Xen virtual memory layout on Arm
> > > > > > AFAICT?
> > > > > >
> > > > > > Does this somehow relate to the physical memory map exposed to guests
> > > > > > on Arm?
> > > > >
> > > > > Yes it does.
> > > > > We will add new definitions there related to VPCI to reserve some areas for the VPCI ECAM and the IOMEM areas.
> > > >
> > > > Yes, that's completely fine and is what's done on x86, but again I
> > > > feel like I'm lost here, this is the Xen virtual memory map, how does
> > > > this relate to the guest physical memory map?
> > >
> > > Sorry my bad, we will add values in include/public/arch-arm.h, wrong header :-)
> >
> > Oh right, now I see it :).
> >
> > Do you really need to specify the ECAM and MMIO regions there?
>
> You need to define those values somewhere :). The layout is only shared
> between the tools and the hypervisor. I think it would be better if they are
> defined at the same place as the rest of the layout, so it is easier to
> rework the layout.
OK, that's certainly a different approach from what x86 uses, where
the guest memory layout is not defined in the public headers.
On x86 my plan would be to add an hypercall that would set the
position of the ECAM region in the guest physmap, and that would be
called by the toolstack during domain construction.
Roger.
next prev parent reply other threads:[~2020-07-20 8:47 UTC|newest]
Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <3F6E40FB-79C5-4AE8-81CA-E16CA37BB298@arm.com>
[not found] ` <BD475825-10F6-4538-8294-931E370A602C@arm.com>
2020-07-16 17:10 ` RFC: PCI devices passthrough on Arm design proposal Rahul Singh
2020-07-16 20:51 ` Stefano Stabellini
2020-07-17 6:53 ` Bertrand Marquis
2020-07-17 7:41 ` Oleksandr Andrushchenko
2020-07-17 11:26 ` Julien Grall
2020-07-17 11:41 ` Oleksandr Andrushchenko
2020-07-17 13:21 ` Bertrand Marquis
2020-07-17 12:46 ` Rahul Singh
2020-07-17 12:55 ` Jan Beulich
2020-07-17 13:12 ` Bertrand Marquis
2020-07-17 8:10 ` Jan Beulich
2020-07-17 8:47 ` Oleksandr Andrushchenko
2020-07-17 13:28 ` Rahul Singh
2020-07-17 13:14 ` Bertrand Marquis
2020-07-17 13:19 ` Jan Beulich
2020-07-17 13:59 ` Bertrand Marquis
2020-07-17 14:06 ` Jan Beulich
2020-07-17 14:34 ` Bertrand Marquis
2020-07-17 14:41 ` Roger Pau Monné
2020-07-17 14:49 ` Bertrand Marquis
2020-07-17 15:05 ` Roger Pau Monné
2020-07-17 15:23 ` Bertrand Marquis
2020-07-17 15:30 ` Roger Pau Monné
2020-07-17 15:51 ` Bertrand Marquis
2020-07-17 16:08 ` Roger Pau Monné
2020-07-17 16:18 ` Julien Grall
2020-07-17 19:17 ` Oleksandr
2020-07-18 9:58 ` Bertrand Marquis
2020-07-18 11:24 ` Julien Grall
2020-07-20 11:27 ` Oleksandr
2020-07-20 8:47 ` Roger Pau Monné [this message]
2020-07-20 9:24 ` Julien Grall
2020-07-20 23:23 ` Stefano Stabellini
2020-07-21 9:54 ` Rahul Singh
2020-07-17 11:16 ` Roger Pau Monné
2020-07-17 13:22 ` Bertrand Marquis
2020-07-17 13:29 ` Julien Grall
2020-07-17 13:44 ` Bertrand Marquis
2020-07-17 13:49 ` Julien Grall
2020-07-17 14:01 ` Bertrand Marquis
2020-07-17 14:31 ` Roger Pau Monné
2020-07-17 15:21 ` Bertrand Marquis
2020-07-17 15:55 ` Roger Pau Monné
2020-07-18 9:49 ` Bertrand Marquis
2020-07-20 8:45 ` Roger Pau Monné
2020-07-20 23:24 ` Stefano Stabellini
2020-07-21 1:39 ` Rob Herring
2020-07-21 19:35 ` Stefano Stabellini
[not found] ` <8ac91a1b-e6b3-0f2b-0f23-d7aff100936d@xen.org>
2020-07-17 13:50 ` Julien Grall
2020-07-17 13:59 ` Jan Beulich
2020-07-17 14:12 ` Julien Grall
2020-07-17 14:23 ` Jan Beulich
2020-07-17 14:47 ` Bertrand Marquis
2020-07-17 15:26 ` Julien Grall
2020-07-17 15:47 ` Bertrand Marquis
2020-07-17 16:05 ` Roger Pau Monné
2020-07-18 9:55 ` Bertrand Marquis
2020-07-18 11:14 ` Julien Grall
2020-07-20 11:32 ` Rahul Singh
2020-07-18 11:32 ` Julien Grall
2020-07-18 11:08 ` Julien Grall
2020-07-20 11:26 ` Rahul Singh
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=20200720084734.GE7191@Air-de-Roger \
--to=roger.pau@citrix.com \
--cc=Bertrand.Marquis@arm.com \
--cc=Rahul.Singh@arm.com \
--cc=jbeulich@suse.com \
--cc=julien.grall.oss@gmail.com \
--cc=julien@xen.org \
--cc=nd@arm.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.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.