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

Re: [Xen-devel] Xen/arm: Virtual ITS command queue handling



On 15/05/15 13:38, Vijay Kilari wrote:
>> Can you give some examples of the heaviest translations please so I can
>> get a feel for actually how expensive we are talking here.
>>
>     For example to translate MAPVI device_ID, event_ID, vID, vCID
> 
>     1) Read from vITS command queue

Not expensive

>     2) Validate device_ID is valid by looking at device list attached
> to that domain (vITS)

It can be reduced by using a tree rather than a list.

>     3) Validate vCID (virtual Collection ID) by checking against
> re-distributor address/cpu numbers
>         of this domain

Validating vCID can be O(1) if you use only the cpu numbers (see
GITS_TYPER.PTA = 0).

>     4) Allocate physical LPI for the vID (virtual LPI) from lpi map of
> this device
>            - Check if virtual LPI is already allocated from this device.
>            - If not allocate it

Not expensive. Only looking in a bitmap.

>            - Update lpi entries for this device

What do you mean by updating the LPI entries for this device?

>     5) Allocate memory for physical LPI descriptor (Add radix tree
> entry) and populate it
>     6) Call route_irq_to_guest() for this LPI

This could be done earlier by pre-allocating a chunk of LPIs.

If memory usage is a concern, I think we could allocate one IRQ
descriptor per chunk of LPIs and manage it ourself.

>     7) Format physical ITS command and send to pITS

Not expensive.

Overall, I don't think command are so expensive if we take time to think
how to optimize the emulation.

Regards,

-- 
Julien Grall

_______________________________________________
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®.