[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 Vijay,

On 28/04/15 12:36, Vijay Kilari wrote:
> On Tue, Apr 28, 2015 at 4:05 PM, Julien Grall <julien.grall@xxxxxxxxxx> wrote:
>> If you properly manage the device with struct pci_dev or struct device
>> (which is, as talked earlier, obviously required for security) you
>> should avoid your so-called "dummy device". BTW, what do you mean by
>> "dummy device"?
> 
> 
> (a) For implementing ITS command processing completion interrupt we need
> a unique interrupt for each domain per vITS to update corresponding virtual 
> ITS
> CREADER
> (b) INT command requires dev,ID there needs to be a device
> associated with the ID
> (c) The command processing completion interrupt is not coming from a
> valid device, we have to provide a dummy device,ID
> (d) I propose that the dummy device segment number is read from a
> macro/helper function
> in the platform file.
> For each domain we can add the bus number so for eg: 0xff is the segment
> number which is #define PLAT_DUMMY_SEG 0xff.
> The device for dom0 would be PLAT_DUMMY_SEG:00:0.0
> The device for domU would be PLAT_DUMMY_SEG:00:0.0 | domain_id

There is multiple problem with this solution:
        - What prevents a platform to use this Device ID in the future?
        - What's is the behavior of the ITS when the Device ID doesn't belong
to a real device?
        - The number of bits for the Device ID can be limited via
GITS_TYPER.Devbits, so it's not possible to use an hardware value

> Let me know if there is better way to generate dummy/unused device id?
> 
> So creation of dummy device and setup for INT command execution
> can be done in physical ITS driver with its_device structure managed
> in vgic_its
> 
> Also with this approach, vITS is not held by the VCPU till the completion
> of command processing, So another VCPU of the same domain can add
> another ITS command. If so we have to keep track number of ITS commands
> being processed per VCPU of the domain and increment vITS CREADER accordingly.
> For this, we have to add one unique interrupt ID of the device for per
> VCPU, So that
> unique interrupt is received from the dummy device for per VCPU.

The number of LPIs supported by the ITS could be very limited. We need
to use them with parsimony.

Even if you have a per-VCPU  interrupt, it doesn't prevent a same vCPU
writing other commands after a first batch then wait.

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