[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [RFC PATCH v3 09/18] xen/arm: ITS: Add virtual ITS commands support



On Mon, Jun 29, 2015 at 5:53 PM, Ian Campbell <ian.campbell@xxxxxxxxxx> wrote:
> On Mon, 2015-06-22 at 17:31 +0530, vijay.kilari@xxxxxxxxx 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.

  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.

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.

Also for fake devices, we search vitt entries with vdevice id for INT command.

Any suggestions?

Regards
Vijay

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.