From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH V6 05/10] xen/arm64: gicv3: Use AFF1 when translating ICC_SGI1R_EL1 to cpumask Date: Mon, 8 Jun 2015 11:06:55 +0100 Message-ID: <1433758015.7108.423.camel@citrix.com> References: <1433163388-16970-1-git-send-email-cbz@baozis.org> <1433163388-16970-6-git-send-email-cbz@baozis.org> <1433520573.7108.337.camel@citrix.com> <5571E99C.9050803@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Z1txM-0001PY-P4 for xen-devel@lists.xenproject.org; Mon, 08 Jun 2015 10:07:00 +0000 In-Reply-To: <5571E99C.9050803@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 , Chen Baozi List-Id: xen-devel@lists.xenproject.org On Fri, 2015-06-05 at 19:25 +0100, Julien Grall wrote: > > On 05/06/2015 17:09, Ian Campbell wrote: > >> + * injection, ignoring level 2 & 3. > >> + */ > >> + if ( gicv3_sgir_to_cpumask(&vcpu_mask, sgir) ) > >> + { > >> + gprintk(XENLOG_WARNING, "Wrong affinity in SGI1R_EL register\n"); > > > > I don't think we need to log this. The guest has asked to send an SGI to > > a VCPU which we know can't possibly exist. I'm not sure what real h/w > > would do, but if it is e.g. UNPREDICTABLE then we should consider > > killing the guest here. I suspect it's actually just ignored, in which > > case we can silently do the same. > > From the spec: > > "Note: if a bit is one and the bit does not correspond to a valid target > processor, the bit must be ignored by the Distributor. In such cases, a > Distributor may optionally generate an SEI." > > The implementation of SEI is implementation defined. I'm not sure what > would be the right behavior to adopt here. In general I'm in favour of being as harsh as allowed by default (i.e. without a good reason to do otherwise), to avoid guests coming to rely on lenient behaviour which we might find we want to change in the future. Ian