From: Ian Campbell <ian.campbell@citrix.com>
To: Vijay Kilari <vijay.kilari@gmail.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
Prasun Kapoor <Prasun.Kapoor@caviumnetworks.com>,
Vijaya Kumar K <vijaya.kumar@caviumnetworks.com>,
Tim Deegan <tim@xen.org>,
"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
Julien Grall <julien.grall@citrix.com>,
Stefano Stabellini <stefano.stabellini@citrix.com>,
manish.jaggi@caviumnetworks.com
Subject: Re: [RFC PATCH v3 09/18] xen/arm: ITS: Add virtual ITS commands support
Date: Fri, 3 Jul 2015 09:41:37 +0100 [thread overview]
Message-ID: <1435912897.9447.11.camel@citrix.com> (raw)
In-Reply-To: <CALicx6uhvA7dqk_+UFCv5dExkix66sG3c1x6m80LAgJuypovKQ@mail.gmail.com>
On Fri, 2015-07-03 at 12:20 +0530, Vijay Kilari wrote:
> On Mon, Jun 29, 2015 at 5:53 PM, Ian Campbell <ian.campbell@citrix.com> wrote:
> > On Mon, 2015-06-22 at 17:31 +0530, vijay.kilari@gmail.com wrote:
> >> +static int vgic_its_process_mapvi(struct vcpu *v, struct vgic_its *vits,
> >> + its_cmd_block *virt_cmd)
> >> +{
> >> + struct vitt entry;
> >> + struct vits_device *vdev;
> >> + uint8_t vcol_id, cmd;
> >> + uint32_t vid, dev_id, event;
> >> +
> >> + vcol_id = virt_cmd->mapvi.col;
> >> + vid = virt_cmd->mapvi.phy_id;
> >> + dev_id = its_decode_devid(v->domain, virt_cmd);
> >
> > If you used the "union its_cmd" I proposed earlier for the virt_cmd
> > argument then this would just be "virt_command->mapvi.devid".
>
> its_decode_devid() is used to get physical devid for a given
> virtual device id. I have to use virt_command->mapvi.devid.
>
> If vitt entries are made base on physical dev id then
>
> - This helps where in if interrupt is received we can extract
> physical dev id from
> the its_device structure held by irq_desc. With this physical device id we can
> search vitt entry to get collection/vcpu and vlpi information.
http://xenbits.xen.org/people/ianc/vits/draftG.html#virtual-lpi-injection shows that there is no need for the physical device id when handling an pLPI and turning it into a vPLI injection.
In the pLPI case the vlpi comes out of the irq_desc and
vgic_vcpu_inject_lpi only requires a vpli, not physical, which it then
uses as indexes into the per-domain irq_pending
(http://xenbits.xen.org/people/ianc/vits/draftG.html#per-domain-struct-pending_irq-for-vlpis)
See also
http://xenbits.xen.org/people/ianc/vits/draftG.html#mapvi-map-an-input-identifier-to-a-physical-interrupt-and-an-interrupt-collection.
which describes how a MAPVI from the guest needs to be handled.
> However fake devices cannot have physical device id. We cannot search vitt
> entries. Esp INT command has only virtual dev id. So I think this
> approach is not
> viable.
As shown above vgic_vcpu_inject_lpi only takes a vpli param, so the fact
there that there is no physical device id for an INT command on a fake
command doesn't matter.
> I propose:
> Manage vitt entries based on virtual dev id and manage domain specific
> RB-tree (which holds list of devices assigned to domain) with physical devid.
>
> Now on receiving interrupt, will search for RB-tree based on physical dev id and
> get virtual dev id. With virtual dev id search vitt entries to get
> vcpu/collection & vlpi
> info.
The design document should shows there is no need for this.
You are very welcome to propose an alternative design, but I'm afraid
that in that case I'm going to have to ask you to produce a
comprehensive document covering all aspects of your proposed design,
either from scratch or by modifying the existing draft to account for
the consequences of your proposed changes across the board, i.e. it
needs remain a coherent design across the board after your changes.
The fact that you are proposing an RB-tree looked during interrupt
however is a problematic aspect of your proposal, in the existing design
has been arranged such that this is not necessary.
> Also for fake devices, we search vitt entries with vdevice id for INT command.
>
> Any suggestions?
>
> Regards
> Vijay
next prev parent reply other threads:[~2015-07-03 8:41 UTC|newest]
Thread overview: 88+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-22 12:01 [RFC PATCH v3 00/18] Add ITS support vijay.kilari
2015-06-22 12:01 ` [RFC PATCH v3 01/18] xen/arm: Add bitmap_find_next_zero_area helper function vijay.kilari
2015-06-22 14:14 ` Julien Grall
2015-06-22 12:01 ` [RFC PATCH v3 02/18] xen: Add log2 functionality vijay.kilari
2015-06-22 13:17 ` Jan Beulich
2015-06-24 13:05 ` Vijay Kilari
2015-06-24 13:21 ` Jan Beulich
2015-06-22 12:01 ` [RFC PATCH v3 03/18] xen: console: Add ratelimit support for error message vijay.kilari
2015-06-22 13:21 ` Jan Beulich
2015-06-25 13:14 ` Vijay Kilari
2015-06-25 13:21 ` Andrew Cooper
2015-06-25 13:31 ` Jan Beulich
2015-06-22 12:01 ` [RFC PATCH v3 04/18] xen/arm: gicv3: Refactor redistributor information vijay.kilari
2015-06-22 15:00 ` Julien Grall
2015-06-29 11:09 ` Ian Campbell
2015-06-22 12:01 ` [RFC PATCH v3 05/18] xen/arm: ITS: Port ITS driver to xen vijay.kilari
2015-06-22 17:16 ` Julien Grall
2015-06-26 9:19 ` Vijay Kilari
2015-06-26 9:52 ` Julien Grall
2015-06-29 11:39 ` Ian Campbell
2015-06-29 15:43 ` Vijay Kilari
2015-06-29 15:47 ` Vijay Kilari
2015-06-29 16:49 ` Ian Campbell
2015-06-22 12:01 ` [RFC PATCH v3 06/18] xen/arm: ITS: Add helper functions to manage its_devices vijay.kilari
2015-06-23 10:21 ` Julien Grall
2015-06-22 12:01 ` [RFC PATCH v3 07/18] xen/arm: ITS: implement hw_irq_controller for LPIs vijay.kilari
2015-06-23 14:32 ` Julien Grall
2015-06-26 12:54 ` Vijay Kilari
2015-06-26 15:05 ` Julien Grall
2015-06-29 11:53 ` Ian Campbell
2015-06-29 12:46 ` Julien Grall
2015-07-02 12:15 ` Vijay Kilari
2015-06-26 14:25 ` Vijay Kilari
2015-06-26 15:15 ` Julien Grall
2015-06-29 11:59 ` Ian Campbell
2015-07-02 12:21 ` Vijay Kilari
2015-07-02 12:35 ` Ian Campbell
2015-07-02 12:44 ` Vijay Kilari
2015-07-02 12:59 ` Ian Campbell
2015-07-02 16:11 ` Julien Grall
2015-06-22 12:01 ` [RFC PATCH v3 08/18] xen/arm: vITS: Add virtual ITS driver vijay.kilari
2015-06-23 16:39 ` Julien Grall
2015-07-02 13:33 ` Vijay Kilari
2015-07-02 14:30 ` Ian Campbell
2015-06-24 9:20 ` Julien Grall
2015-06-29 12:13 ` Ian Campbell
2015-06-22 12:01 ` [RFC PATCH v3 09/18] xen/arm: ITS: Add virtual ITS commands support vijay.kilari
2015-06-24 10:29 ` Julien Grall
2015-06-29 12:16 ` Ian Campbell
2015-06-29 12:18 ` Ian Campbell
2015-06-29 12:23 ` Ian Campbell
2015-07-03 6:50 ` Vijay Kilari
2015-07-03 8:41 ` Ian Campbell [this message]
2015-06-22 12:01 ` [RFC PATCH v3 10/18] xen/arm: ITS: Add APIs to add and assign device vijay.kilari
2015-06-24 11:38 ` Julien Grall
2015-06-29 12:25 ` Ian Campbell
2015-06-29 12:29 ` Ian Campbell
2015-07-02 8:40 ` Vijay Kilari
2015-07-02 9:01 ` Ian Campbell
2015-07-02 10:30 ` Julien Grall
2015-06-22 12:01 ` [RFC PATCH v3 11/18] xen/arm: ITS: Add GITS registers emulation vijay.kilari
2015-06-26 12:51 ` Julien Grall
2015-07-08 12:11 ` Ian Campbell
2015-06-22 12:01 ` [RFC PATCH v3 12/18] xen/arm: ITS: Add GICR register emulation vijay.kilari
2015-06-22 12:01 ` [RFC PATCH v3 13/18] xen/arm: ITS: Add irq descriptors for LPIs vijay.kilari
2015-06-29 12:58 ` Ian Campbell
2015-06-29 13:11 ` Julien Grall
2015-07-07 11:00 ` Vijay Kilari
2015-07-07 11:16 ` Julien Grall
2015-07-07 15:50 ` Ian Campbell
2015-07-07 15:52 ` Julien Grall
2015-07-07 16:04 ` Ian Campbell
2015-06-22 12:01 ` [RFC PATCH v3 14/18] xen/arm: ITS: Initialize physical ITS vijay.kilari
2015-06-22 12:01 ` [RFC PATCH v3 15/18] xen/arm: ITS: Add domain specific ITS initialization vijay.kilari
2015-06-29 13:01 ` Ian Campbell
2015-06-22 12:01 ` [RFC PATCH v3 16/18] xen/arm: ITS: Handle LPI interrupts vijay.kilari
2015-06-29 13:03 ` Ian Campbell
2015-06-22 12:01 ` [RFC PATCH v3 17/18] xen/arm: ITS: Generate ITS node for Dom0 vijay.kilari
2015-06-29 13:06 ` Ian Campbell
2015-07-07 5:31 ` Vijay Kilari
2015-07-07 8:21 ` Julien Grall
2015-07-07 10:25 ` Vijay Kilari
2015-07-07 11:07 ` Julien Grall
2015-06-22 12:01 ` [RFC PATCH v3 18/18] xen/arm: ITS: Map ITS translation space vijay.kilari
2015-06-22 13:52 ` [RFC PATCH v3 00/18] Add ITS support Julien Grall
2015-06-22 13:56 ` Ian Campbell
2015-06-24 10:02 ` Ian Campbell
2015-06-29 13:11 ` 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=1435912897.9447.11.camel@citrix.com \
--to=ian.campbell@citrix.com \
--cc=Prasun.Kapoor@caviumnetworks.com \
--cc=julien.grall@citrix.com \
--cc=manish.jaggi@caviumnetworks.com \
--cc=stefano.stabellini@citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=tim@xen.org \
--cc=vijay.kilari@gmail.com \
--cc=vijaya.kumar@caviumnetworks.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).