From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v3 08/24] xen/arm: Allow virq != irq Date: Wed, 28 Jan 2015 17:00:49 +0000 Message-ID: <54C915C1.6070304@linaro.org> References: <1421159133-31526-1-git-send-email-julien.grall@linaro.org> <1421159133-31526-9-git-send-email-julien.grall@linaro.org> <54C914A5.20601@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YGVzT-00040a-Gz for xen-devel@lists.xenproject.org; Wed, 28 Jan 2015 17:01:19 +0000 Received: by mail-wg0-f43.google.com with SMTP id y19so21804733wgg.2 for ; Wed, 28 Jan 2015 09:01:17 -0800 (PST) In-Reply-To: <54C914A5.20601@linaro.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Stefano Stabellini Cc: xen-devel@lists.xenproject.org, tim@xen.org, ian.campbell@citrix.com, stefano.stabellini@citrix.com List-Id: xen-devel@lists.xenproject.org On 28/01/15 16:56, Julien Grall wrote: > On 28/01/15 16:47, Stefano Stabellini wrote: >>> diff --git a/xen/arch/arm/irq.c b/xen/arch/arm/irq.c >>> index 25ecf1d..830832c 100644 >>> --- a/xen/arch/arm/irq.c >>> +++ b/xen/arch/arm/irq.c >>> @@ -31,6 +31,13 @@ >>> static unsigned int local_irqs_type[NR_LOCAL_IRQS]; >>> static DEFINE_SPINLOCK(local_irqs_type_lock); >>> >>> +/* Describe an IRQ assigned to a guest */ >>> +struct irq_guest >>> +{ >>> + struct domain *d; >>> + unsigned int virq; >>> +}; >> >> I would prefer if you didn't use dev_id for this and just added a virq >> field to irqaction. > > We already talked about it on v2. You were fine with the idea and acked > the patch. Although, I haven't add your acked-by here because of the new > changes in the code. For reference: https://patches.linaro.org/34671/ > Here my answer to the same question on v2: > > "I though about it. If we add another field in arch_irq_desc, we will > likely use more memory than xmalloc. This is because most of the > platform doesn't use 1024 interrupts but about 256 interrupts. > > As the new field will be a pointer (on ARM64, 8 bytes), that would make > Xen use statically about 8K more. > > We could allocate irq_desc dynamically during Xen boot." -- Julien Grall