From: Julien Grall <julien.grall@citrix.com>
To: Manish Jaggi <mjaggi@caviumnetworks.com>,
Jan Beulich <JBeulich@suse.com>
Cc: "Prasun.kapoor@cavium.com" <Prasun.kapoor@cavium.com>,
Ian Campbell <ian.campbell@citrix.com>,
stefano.stabellini@eu.citrix.com,
Vijaya Kumar <Vijaya.Kumar@caviumnetworks.com>,
Julien Grall <julien.grall@linaro.org>,
Xen Devel <xen-devel@lists.xen.org>
Subject: Re: PCI Pass-through in Xen ARM: Draft 4
Date: Wed, 2 Sep 2015 13:59:07 +0100 [thread overview]
Message-ID: <55E6F29B.6010205@citrix.com> (raw)
In-Reply-To: <55E6E6BC.6000101@caviumnetworks.com>
On 02/09/15 13:08, Manish Jaggi wrote:
>
>
> On Tuesday 01 September 2015 01:02 PM, Jan Beulich wrote:
>>>>> On 31.08.15 at 14:36, <mjaggi@caviumnetworks.com> wrote:
>>> On Thursday 13 August 2015 03:12 PM, Manish Jaggi wrote:
>>>> 4.2.1 Mapping BAR regions in guest address space
>>>>
>>>> -----------------------------------------------------------------------------
>>>>
>>>>
>>>> When a PCI-EP device is assigned to a domU the toolstack will read
>>>> the pci
>>>> configuration space BAR registers. Toolstack allocates a virtual BAR
>>>> region for each BAR region, from the area reserved in guest address
>>>> space for
>>>> mapping BARs referred to as Guest BAR area. This area is defined in
>>>> public/arch-arm.h
>>>>
>>>> /* For 32bit BARs*/
>>>> #define GUEST_BAR_BASE_32 <<>>
>>>> #define GUEST_BAR_SIZE_32 <<>>
>>>>
>>>> /* For 64bit BARs*/
>>>> #define GUEST_BAR_BASE_64 <<>>
>>>> #define GUEST_BAR_SIZE_64 <<>>
>>>>
>>>> Toolstack then invokes domctl xc_domain_memory_mapping to map in
>>>> stage2
>>>> translation. If a BAR region address is 32b BASE_32 area would be
>>>> used,
>>>> otherwise 64b. If a combination of both is required the support is
>>>> TODO.
>>>>
>>>> Toolstack manages these areas and allocate from these area. The
>>>> allocation
>>>> and deallocation is done using APIs similar to malloc and free.
>>>>
>>> To implement this feature in xl tools there is required to have a malloc
>>> and free from the reserved area.
>>> Can we have the XEN_DOMCTL_memory_mapping extended with a flag say
>>> ALLOCATE/FREE_FROM_BAR_AREA.
>>> When this flag is passed xen would add or remove the stage2 mapping for
>>> the domain.
>>> This will make use of the code already present in xen.
>> Above it was said that the tool stack manages this area (including
>> allocations from it). Why would this require a new hypercall?
> As a rule xl tools should manage the guest memory map. Now if it does by
> itself or initiates it is another thing.
> Allocating an area for PCI BAR and freeing it reserved area would
> require adding allocator code in xl tools.
> Since xen already knows about the area (as it is defined in public
> header file) and there exists code in xen,
Which code? We don't have any code in Xen to find free space in the
stage-2 table for the PCI region.
Anyway, I think this logic should be done in the toolstack and not in
the hypervisor. Only the toolstack is in charge of the memory layout.
Xen appears to know the memory layout on ARM because it's statically define.
Regards,
--
Julien Grall
next prev parent reply other threads:[~2015-09-02 12:59 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
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 [this message]
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=55E6F29B.6010205@citrix.com \
--to=julien.grall@citrix.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=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).