From: Ian Campbell <ian.campbell@citrix.com>
To: Julien Grall <julien.grall@citrix.com>
Cc: Vijay Kilari <vijay.kilari@gmail.com>,
Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
Prasun Kapoor <Prasun.Kapoor@caviumnetworks.com>,
manish.jaggi@caviumnetworks.com,
Julien Grall <julien.grall@linaro.org>,
"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
Stefano Stabellini <stefano.stabellini@citrix.com>
Subject: Re: Xen on ARM vITS Handling Draft B (Was Re: Xen/arm: Virtual ITS command queue handling)
Date: Wed, 27 May 2015 12:22:50 +0100 [thread overview]
Message-ID: <1432725770.14664.200.camel@citrix.com> (raw)
In-Reply-To: <5561A95E.1070706@citrix.com>
On Sun, 2015-05-24 at 11:35 +0100, Julien Grall wrote:
[...]
> I wrote my though for the validation bits (see below) and add some
> definitions useful for people which don't have the spec.
Thanks for this.
>
> Emulation of ITS commands
> =========================
>
> # Introduction
>
> This document is based on the section 5.13 of GICv3 specification
> (PRD03-GENC-010745 24.0). The goal is to provide insight of the cost
> to emulate ITS commands in Xen.
>
> The ITS provides 12 commands in order to manage interrupt collection,
> device and interrupts.
>
> # Definitions
I tried to integrate your text here into the introduction section of the
VITs doc.
[...]
> # Validation of the parameters
And this bit I used as the basis for a new "ITS Command Translation"
chapter.
I have some questions which I have inserted into the next draft of the
doc with XXX markers. I intend to post a new draft very soon, rather
than wait for any discussion, so you might prefer to wait and answer
them in that thread.
> Each command contains parameters that needs to be validated before any
> usage in Xen or passing to the hardware.
>
> This section will describe the validation of the main parameters.
>
> ## Device ID
>
> This parameter is used in commands which manage the device and the
> interrupts associated to this device. Checking if a device is present
> and retrieving the data structure must be fast.
>
> The device identifiers may not be assigned contiguously and the maximum
> number is very high (2^32).
That's true for the host, but I think the lookup here needs to be based
on the virtual device id, not necessarily the physical one, so we have
the opportunity to arrange things for our convenience.
In particular we could arrange for device ids to be contiguous (or in a
small number of ranges) and we know that N is going to be much lower
that 2^32 in practice.
So I think we could almost get away with either a simple array or a much
simpler M-level look up (for small M, say 2).
Or is there some constraint which means we cannot virtualise the device
id?
> The possible efficient data structure would be:
> 1) List: The lookup/deletion is in O(n) and the insertion will
> depend if the device should be sort following their identifier. The
> memory overhead is 18 bytes per element.
> 2) Red-black tree: All the operations are O(log(n)). The memory
> overhead is 24 bytes per element.
>
> The solution 2) seems the more suitable for having fast deviceID
> validation even though the memory overhead is a bit higher compare to
> the list.
Vijay's text discussed Event ID too. I've added some words about that,
they may be rubbish, please check the next draft.
> ## Collection
>
> This parameter is used in commands which manage collections and
> interrupt in order to move them for one CPU to another. The ITS is only
> mandatory to implement N + 1 collections where N is the number of
> processor on the platform. Furthermore, the identifier are always
> contiguous.
>
> If we decide to implement the strict minimum (i.e N + 1), an array is
> enough and will allow operations in O(1).
May not even need that since [0..NR_CPUS+1] would allow us to go
straight to either vcpu->collection_id or domain->collection_id (the
latter being the +1).
>
> ## Target Address
>
> This parameter is used in commands to manage collection.
It's also, I think, the output of the ITS Translation table?
> It's a unique
> identifier per processor. The format is different following the value
> of the bit GITS_TYPER.PTA (see definition). The value of the field
> pre-defined by the ITS and the software has to handle the 2 cases.
IOW the bit is r/o and fixed by the ITS implementor?
> The solution with GITS_TYPER.PTA set to one will require some computation
> in order to find the VCPU associated with the redistributor address. It
> will be similar to get_vcpu_from_rdist in the vGICv3 emulation
> (xen/arch/arm/vgic-v3.c).
>
> On another hand, setting GITS_TYPER.PTA to zero will give us control to
> decide the linear process number which could simply be the vcpu_id (always
> linear).
Does this get more complicated with large numbers of vcpus on gic v3
(i.e. once AFFR>0 gets involved)?
>
next prev parent reply other threads:[~2015-05-27 11:22 UTC|newest]
Thread overview: 77+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-05 12:14 Xen/arm: Virtual ITS command queue handling Vijay Kilari
2015-05-05 13:51 ` Stefano Stabellini
2015-05-05 13:54 ` Julien Grall
2015-05-05 15:56 ` Vijay Kilari
2015-05-05 14:09 ` Julien Grall
2015-05-05 16:09 ` Vijay Kilari
2015-05-05 16:27 ` Julien Grall
2015-05-12 15:02 ` Ian Campbell
2015-05-12 17:35 ` Julien Grall
2015-05-13 13:23 ` Ian Campbell
2015-05-13 14:26 ` Julien Grall
2015-05-15 10:59 ` Ian Campbell
2015-05-15 11:26 ` Vijay Kilari
2015-05-15 11:30 ` Ian Campbell
2015-05-15 12:03 ` Julien Grall
2015-05-15 12:47 ` Vijay Kilari
2015-05-15 12:52 ` Julien Grall
2015-05-15 12:53 ` Ian Campbell
2015-05-15 13:14 ` Vijay Kilari
2015-05-15 13:24 ` Ian Campbell
2015-05-15 13:44 ` Julien Grall
2015-05-15 14:04 ` Vijay Kilari
2015-05-15 15:05 ` Julien Grall
2015-05-15 15:38 ` Ian Campbell
2015-05-15 17:31 ` Julien Grall
2015-05-16 4:03 ` Vijay Kilari
2015-05-16 8:49 ` Julien Grall
2015-05-19 11:38 ` Vijay Kilari
2015-05-19 11:48 ` Ian Campbell
2015-05-19 11:55 ` Ian Campbell
2015-05-19 12:10 ` Vijay Kilari
2015-05-19 12:19 ` Ian Campbell
2015-05-19 12:48 ` Vijay Kilari
2015-05-19 13:12 ` Ian Campbell
2015-05-19 14:05 ` Julien Grall
2015-05-19 14:48 ` Ian Campbell
2015-05-19 15:44 ` Julien Grall
2015-05-15 14:05 ` Ian Campbell
2015-05-15 12:19 ` Julien Grall
2015-05-15 12:58 ` Ian Campbell
2015-05-15 13:24 ` Julien Grall
2015-05-19 12:14 ` Ian Campbell
2015-05-19 13:27 ` Julien Grall
2015-05-19 13:36 ` Ian Campbell
2015-05-19 13:46 ` Julien Grall
2015-05-19 13:54 ` Ian Campbell
2015-05-19 14:04 ` Vijay Kilari
2015-05-19 14:18 ` Ian Campbell
2015-05-21 12:37 ` Manish Jaggi
2015-05-26 13:04 ` Ian Campbell
2015-06-01 22:57 ` Manish Jaggi
2015-06-02 8:29 ` Ian Campbell
2015-05-19 14:06 ` Julien Grall
2015-05-13 16:27 ` Vijay Kilari
2015-05-15 11:28 ` Ian Campbell
2015-05-15 12:38 ` Vijay Kilari
2015-05-15 13:06 ` Ian Campbell
2015-05-15 13:17 ` Julien Grall
2015-05-15 11:45 ` Xen on ARM vITS Handling Draft B (Was Re: Xen/arm: Virtual ITS command queue handling) Ian Campbell
2015-05-15 14:55 ` Julien Grall
2015-05-19 12:10 ` Ian Campbell
2015-05-19 13:37 ` Julien Grall
2015-05-19 13:51 ` Ian Campbell
2015-05-22 12:16 ` Vijay Kilari
2015-05-22 12:49 ` Julien Grall
2015-05-22 13:58 ` Vijay Kilari
2015-05-22 14:35 ` Julien Grall
2015-05-22 14:54 ` Vijay Kilari
2015-05-24 10:35 ` Julien Grall
2015-05-25 9:06 ` Vijay Kilari
2015-05-25 9:32 ` Julien Grall
2015-05-25 10:40 ` Vijay Kilari
2015-05-25 12:44 ` Julien Grall
2015-05-25 13:38 ` Vijay Kilari
2015-05-25 17:11 ` Julien Grall
2015-05-27 11:22 ` Ian Campbell [this message]
2015-05-27 11:22 ` 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=1432725770.14664.200.camel@citrix.com \
--to=ian.campbell@citrix.com \
--cc=Prasun.Kapoor@caviumnetworks.com \
--cc=julien.grall@citrix.com \
--cc=julien.grall@linaro.org \
--cc=manish.jaggi@caviumnetworks.com \
--cc=stefano.stabellini@citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=vijay.kilari@gmail.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).