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

Re: [Xen-devel] [PATCH for-4.6 0/5] xen: arm: Parse PCI DT nodes' ranges and interrupt-map



Hi Suravee,

On 18/02/15 20:13, Suravee Suthikulanit wrote:
>> Who decide to assign the MSI n to the SPI x? DOM0 or Xen?
> 
> For v2m, each MSI is tied to a specific SPI. The range of SPIs is
> specified in the GIC V2M_MSI_TYPER register. In Xen, we need to make
> sure that these are routed to Dom0 initially since Dom0 GICv2m driver is
> the one handling all MSI assignments.

I guess you emulate the GICv2m frame? If so, can't you trap access to
the frame in order to configure the SPI?

>> Wouldn't it be possible to route the SPI dynamically when the domain
>> decide to use the MSI n? We would need to implement PHYSDEVOP_map_pirq
>> for MSI.
> 
> Enabling MSI is done by each end-point PCI device drivers in the guest.
> In Linux, this would mean that when the driver tries to allocate an MSI
> interrupt, it would need to communicate back to Xen (possibly via
> hypercall as you pointed out) to get the next available SPI. It is not
> necessary for now. I am planning to revisit this when we try to
> implement pass-through support. Lemme know if you think this should be
> handled differently.

The pass-through support will come quickly. I think it would be better
to support this case now, mainly if we have to add some code in Linux.
It may take some times to upstream it.

Although, I haven't really though about how to do it in Xen.

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