xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Ian Campbell <ian.campbell@citrix.com>
To: Jan Beulich <JBeulich@suse.com>,
	Manish Jaggi <mjaggi@caviumnetworks.com>
Cc: "Prasun.kapoor@cavium.com" <Prasun.kapoor@cavium.com>,
	Vijaya Kumar <Vijaya.Kumar@caviumnetworks.com>,
	Julien Grall <julien.grall@linaro.org>,
	Xen Devel <xen-devel@lists.xen.org>,
	stefano.stabellini@eu.citrix.com
Subject: Re: PCI Pass-through in Xen ARM: Draft 4
Date: Thu, 13 Aug 2015 18:01:24 +0100	[thread overview]
Message-ID: <1439485284.23981.129.camel@citrix.com> (raw)
In-Reply-To: <55CCD3F1020000780009AC34@prv-mh.provo.novell.com>

On Thu, 2015-08-13 at 09:29 -0600, Jan Beulich wrote:

A bunch of your questions seem to be about things which have been discussed
at length in previous postings, it's probably worth reviewing some of those
discussions.

> &gt; 
> &gt;   /* For 32bit BARs*/
> &gt;   #define GUEST_BAR_BASE_32 &lt;&lt;&gt;&gt;
> &gt;   #define GUEST_BAR_SIZE_32 &lt;&lt;&gt;&gt;
> &gt; 
> &gt;   /* For 64bit BARs*/
> &gt;   #define GUEST_BAR_BASE_64 &lt;&lt;&gt;&gt;
> &gt;   #define GUEST_BAR_SIZE_64 &lt;&lt;&gt;&gt;
> 
> This sounds like you want to use a pair of fixed (forever, since putting
> it in the ABI) ranges - is that really a good idea? Wouldn't it be possible
> (and necessary when assigning many or large devices) to establish
> these ranges dynamically?

The guest physical address space layout is explicitly not an ABI on ARM.
The relevant bits of arch-arm.h have the appropriate tools-and-xen-only
ifdefs.

> 
[...]
> Furthermore OSes can generally reassign BARs as they see fit (as
> long as the chosen addresses don't collide with anything else).

Not with PV pcifront/back based setups, the BARs are fixed then I believe,
even for x86/PV. That model is being followed on ARM too.

We don't want to involve QEMU just to emulate this sort of thing, and nor
do we really want to add such functionality to pciback.


> But I wonder in general why this would need to be done through
> xenstore: pciback knows the real BAR base, and with the help of
> the hypervisor it ought to be able to also know the corresponding
> guest address.

How? Previously adding a new hypercall was proposed for this, I didn't like
that approach because it added a new frozen ABI to the hypercall interface
and IMHO the tools is the right place to have the address space layout
stuff anyway.


> >   Since there is only one pci-frontend bus in domU, s:b:d.f is 0:0:d.f
> >   It is proposed in this design document that the df generation be done 
> > by
> >   toolstack and the xenstore keys be created by toolstack.
> > 
> >   Folowing guest_sbdf generation the domctl to assign the device is 
> > invoked.
> >   This hypercall is updated to include *guest_sbdf*. Xen ITS driver can 
> > 
> > store
> >   this mapping domID: guest_sbdf: machine_sbdf and can be used later.
> 
> Mind explaining why the hypervisor needs to know about the guest
> topology? Is that because you want to continue to not involve qemu
> in any of the emulation?

Some virtualsed hardware (i.e. the interrupt translation unit) take device
-ids which are derived from the SBDF, since Xen deals with configuring that
h/w it needs to know the guest's SBDF.

Ian.

  reply	other threads:[~2015-08-13 17:01 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-13  9:42 PCI Pass-through in Xen ARM: Draft 4 Manish Jaggi
2015-08-13 10:37 ` Julien Grall
2015-09-02 15:19   ` Ian Campbell
2015-09-02 15:40     ` Julien Grall
2015-08-13 15:29 ` Jan Beulich
2015-08-13 17:01   ` Ian Campbell [this message]
2015-08-14  9:26     ` Jan Beulich
2015-08-14 13:21       ` Stefano Stabellini
2015-08-14 13:58         ` Jan Beulich
2015-08-14 14:03           ` Stefano Stabellini
2015-08-14 14:34             ` Jan Beulich
2015-08-14 14:37               ` Stefano Stabellini
2015-08-14 14:45                 ` Julien Grall
2015-08-14 15:15                   ` Jan Beulich
2015-08-14 15:24                     ` Stefano Stabellini
2015-09-02 14:45               ` Ian Campbell
2015-09-02 14:52                 ` Jan Beulich
2015-09-02 15:07                   ` Ian Campbell
2015-09-02 14:47       ` Ian Campbell
2015-08-14 15:38   ` Stefano Stabellini
2015-08-14 18:58     ` Jaggi, Manish
2015-08-16 23:59       ` Stefano Stabellini
2015-09-02 14:57   ` Ian Campbell
2015-09-02 15:06     ` Jan Beulich
2015-08-31 12:36 ` Manish Jaggi
2015-09-01  7:32   ` Jan Beulich
2015-09-02 12:08     ` Manish Jaggi
2015-09-02 12:59       ` Julien Grall
2015-09-02 13:46         ` Ian Campbell
2015-09-02 15:03           ` Ian Campbell
2015-09-02 15:03         ` Ian Campbell
2015-09-01 16:15 ` Stefano Stabellini
2015-09-10  1:12 ` Julien Grall
2015-09-15 18:58   ` Jaggi, Manish
2015-09-15 21:18     ` David Daney
2015-09-16 12:58     ` Julien Grall
2015-09-19 20:24       ` Manish Jaggi
2015-09-19 20:48         ` Julien Grall
2015-09-19 21:51           ` Daney, David
2015-09-21 10:17             ` Julien Grall

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=1439485284.23981.129.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@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).