From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: xen/arm: Query - vgic nr_spis value for domU Date: Tue, 24 Feb 2015 09:41:11 +0000 Message-ID: <1424770871.27930.268.camel@citrix.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Vijay Kilari Cc: Julien Grall , "xen-devel@lists.xen.org" , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Tue, 2015-02-24 at 14:54 +0530, Vijay Kilari wrote: > Hi, > > In the below snippet, nr_spis is set to 0 from domU based on this > pending_irq[] is allocated > > int domain_vgic_init(struct domain *d) > { > .... > if ( is_hardware_domain(d) ) > d->arch.vgic.nr_spis = gic_number_lines() - 32; > else > d->arch.vgic.nr_spis = 0; /* We don't need SPIs for the guest */ > ... > > } > > Does it mean that no devices are attached to domU. So spis are required? > If so, for device pass-through (non-pci) how is it managed? Julien's non-pci passthrough series makes this configurable at domain creation time. > For pci-passthrough I am assigning non-zero value to nr_lpis for both > domU & dom0 > and allocating pending_lpis[] because MSIx are assigned to domU > directly on ITS commands > trapped from domain. > > Do you see any issue with this? dom0 should get the underlying h/w platforms value for nr_*, including spi and lpi domU should get configurable nr_lpi in the same way Julien has done for spi. Unless it is possible to make nr_lpi dynamic based on the guests actual usage patterns (i.e. alloc on demand), that would be ok too. Ian.