From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH] xen/arm: gic-v3: Implement correctly the callback send_SGI Date: Fri, 8 May 2015 15:01:34 +0100 Message-ID: <1431093694.2660.468.camel@citrix.com> References: <1430159464-24599-1-git-send-email-julien.grall@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Yqiqh-00037g-KR for xen-devel@lists.xenproject.org; Fri, 08 May 2015 14:01:55 +0000 In-Reply-To: <1430159464-24599-1-git-send-email-julien.grall@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Julien Grall Cc: xen-devel@lists.xenproject.org, Chen Baozi , tim@xen.org, stefano.stabellini@citrix.com List-Id: xen-devel@lists.xenproject.org On Mon, 2015-04-27 at 19:31 +0100, Julien Grall wrote: > Currently, the GICv3 drivers is only able to send an SGI when the cpumask "driver" > is provided. Although with the modes SGI_TARGET_OTHERS and SGI_TARGET_SELF, > no cpumask is provided. Any usage of those modes will crash the hypersivor. > > Move the rename gicv3_send_sgi to gicv3_send_sgi_list and implement the s/Move the r/R/ > different modes: > - SGI_TARGET_OTHERS: Set the Interrupt Routing Mode (bit 40) to 1 > (see Table 4 on Section 4.2.6 PRD03-GENC-010745 24.0) > - SGI_TARGET_SELF: Contrawise GICv2, the SGI registers doesn't provide "Contrariwise"? But I think you really mean "Unlike". I'd also say "the GICv3 SGI registers" and s/doesn't/don't/. > a specific field. So use gicv3_send_sgi_list and pass the cpumask of > the current CPU > - SGI_TARGET_LIST: Directly call gicv3_send_sgi_list with the given > cpumask > > Reported-by: Chen Baozi > Signed-off-by: Julien Grall Apart from the commit message nits one code comment: [...] > + case SGI_TARGET_OTHERS: > + WRITE_SYSREG(ICH_SGI_TARGET_OTHERS << ICH_SGI_IRQMODE_SHIFT | > + (register_t)sgi << ICH_SGI_IRQ_SHIFT, I don't think you want register_t here, unless ICC_SGI1R_EL1 might be a different width on different architectures. I think you should just cast to uint64_t and WRITE_SYSREG64. Ian.