[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



On Tue, 5 May 2015, Julien Grall wrote:
> On 05/05/15 11:28, Stefano Stabellini wrote:
> > On Mon, 4 May 2015, Julien Grall wrote:
> >> Hi Vijay,
> >>
> >> On 04/05/2015 16:19, Vijay Kilari wrote:
> >>>>>>> How did you implement the interrupt mode? Could it be improve?
> >>>>>>
> >>>>>>
> >>>>>>      1) In physical ITS driver its_device is created with devID
> >>>>>> 00:00.1
> >>>>>> with
> >>>>>> 256 MSI-x are reserved and is named as completion_dev, which is
> >>>>>> global.
> >>>>>
> >>>>>
> >>>>> That's a lot of MSI-x reserved... Can't you use only one per domain?
> >>>>
> >>>>
> >>>> Hmmm... I meant for all the domain, not "per domain".
> >>>
> >>>     Complexity with one irq for all domains is that if completion 
> >>> interrupt
> >>> comes it is difficult to find out  for which vITS/Domain ITS command
> >>> it came for.
> >>
> >> While reserving a single devID sounds feasible on all the future platform.
> >> Allocating 256 MSI-x sounds more difficult, you assume that any board will
> >> have at least 256 MSI-x free.
> >>
> >> Although, this is not scalable. How do you plan to handle more than 256
> >> domains? By increasing the number of reserved MSI-x?
> >>
> >> I don't ask you to implement the later now... but if increasing the number 
> >> of
> >> domain supported means rewriting all the completion code and maybe the vITS
> >> then you should ask yourself if it's really worth to take this current
> >> approach.
> > 
> > As far as I understand there are max 2048 MSI-X per devid and max 8
> > functions per device (we can continue to 00:00.2, etc). That gives us
> > 16384 max domains with a PCI device assigned to them. We wouldn't use
> > any of these MSIs for domains without devices assigned to them. Overall
> > I think is OK as a limit, as long as we can handle the allocation
> > efficiently (we cannot really allocate 16384 data structures at boot
> > time).
> 
> You assume that there is enough of LPIs unused. This may not be true on
> every platform.

In that case, we just fail PCI device assignment. It is OK to fail when
no hw resources are available.  A guest without PCI devices should boot
without issues though. It is important that guests without PCI devices
assigned continue operating as usual.


> > Actually even 256 domains with devices assigned to them would be enough
> > for now, if we don't consume these MSIs with regular domains without PCI
> > passthrough.
> 
> It would need some plumbing in the toolstack to use vITS only when PCI
> passthrough is used for the guest.

Given that in a regular DomU there are no PCI devices (emulated or
otherwise), the vITS should be completely unused, or useless anyway. So
it is OK to have it in place, as long as it doesn't do anything and it
doesn't allocate any resources. If a PCI device has been assigned since
boot time, or when a PCI device is hotplugged into the guest, then we
allocate resources and start doing something useful.

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