From: Ian Campbell Subject: Re: [PATCH v6 1/5] xen/arm: observe itargets setting in vgic_enable_irqs and vgic_disable_irqs Date: Wed, 2 Jul 2014 16:58:39 +0100 Message-ID: <1404316719.8137.27.camel@kazak.uk.xensource.com> References: <1403541463-23734-1-git-send-email-stefano.stabellini@eu.citrix.com> <1403882224.3169.70.camel@kazak.uk.xensource.com> 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: Stefano Stabellini Cc: julien.grall@citrix.com, xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Wed, 2014-07-02 at 16:39 +0100, Stefano Stabellini wrote: > On Fri, 27 Jun 2014, Ian Campbell wrote: > > On Mon, 2014-06-23 at 17:37 +0100, Stefano Stabellini wrote: > > > @@ -589,12 +628,27 @@ static int vgic_distr_mmio_write(struct vcpu *v, mmio_info_t *info) > > > if ( dabt.size != 0 && dabt.size != 2 ) goto bad_width; > > > rank = vgic_rank_offset(v, 8, gicd_reg - GICD_ITARGETSR); > > > if ( rank == NULL) goto write_ignore; > > > + /* 8-bit vcpu mask for this domain */ > > > + BUG_ON(v->domain->max_vcpus > 8); > > > + tr = (1 << v->domain->max_vcpus) - 1; > > > + if ( dabt.size == 2 ) > > > + tr = tr | (tr << 8) | (tr << 16) | (tr << 24); > > > + else > > > + tr = (tr << (8 * (offset & 0x3))); > > > + tr &= *r; > > > + /* ignore zero writes */ > > > + if ( !tr ) > > > + goto write_ignore; > > > > Please can you add a comment here like: > > > > /* For word reads ignore writes where any single byte is zero */ > > > > With that: Acked-by: Ian Campbell > > > > Although, might it be more reasonable to use the existing value for such > > bytes? (i.e. only ignore the zero bytes, not the whole thing) > > I don't know.. I would consider the entire write as invalid as it > containts some invalid configurations. The question is what does the spec say? Ian.