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

Re: [Xen-devel] [RFC PATCH v2 13/22] xen/arm: its: Add virtual ITS command support



Hi Julien,

On Wed, Apr 29, 2015 at 7:05 PM, Julien Grall <julien.grall@xxxxxxxxxx> wrote:
> On 29/04/15 12:56, Julien Grall wrote:
>> As the 2 suggested approach don't seem to fit our usage, we need to find
>> another approach.
>
> I think I have another approach which doesn't require interrupt neither
> polling in EL2.

I could resolve all the issues around approach 1
only concern is generating dummy/fake device id.

>
> 1) Trap on CWRITER
>    a) Read command for the vITS CQ
>    b) Transform command
>    c) Inject command
>         - If ITS CQ full => 2)
>         - If vITS CQ empty => 2)
>         - Else => 1)
> 2) Return to guest
> 3) Trap on CREADR
>    a) Check completion of the current batch of command
>       - If complete => 3.b)
>       - Else => 4)
>    b) Update CREADR
>    c) Check if more command and inject it (see process in 1))
> 4) Return to guest
>
> Some other restrictions to add:
>    - If there is already a batch of command in process for the domain,
> defer the injection of new command
>    - The number of command sent in a batch should be limited.
>
> I think thoses restrictions are okay because the ITS is per-domain not
> per-VCPU.
>
> Although, there is a possible problem if the guest is not reading
> CREADR. Maybe having a timer would be fine to update CREADR and inject
> new commands.

 How to know that guest is not reading CREADR and using INT mode to
check for completion?
One way is when INT ITS command is emulated, then we can assume that guest
is using INT mode and use timer to update CREADR and inject new
commands.

However with INT mode, if the guest driver is checking for CREADR
value on receiving completion interrupt requested through INT ITS command
then CREADR will show up old value.

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