From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: Re: [PATCH v4 23/25] arm: vgic emulation Date: Tue, 10 Jan 2012 09:00:52 +0000 Message-ID: <1326186052.29084.86.camel@dagon.hellion.org.uk> References: <1326132001-21251-23-git-send-email-stefano.stabellini@eu.citrix.com> <4F0B3132.5080601@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4F0B3132.5080601@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: David Vrabel Cc: "xen-devel@lists.xensource.com" , "Tim Deegan (3P)" , "JBeulich@suse.com" , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Mon, 2012-01-09 at 18:25 +0000, David Vrabel wrote: > On 09/01/12 17:59, stefano.stabellini@eu.citrix.com wrote: > > > > +static int vgic_distr_mmio_read(struct vcpu *v, mmio_info_t *info) > > +{ > [...] > > + case GICD_ICFGR ... GICD_ICFGRN: > > + if ( dabt.size != 2 ) goto bad_width; > > + rank = vgic_irq_rank(v, 2, gicd_reg - GICD_ICFGR); > > + if ( rank == NULL) goto read_as_zero; > > + vgic_lock_rank(v, rank); > > + *r = rank->icfg[REG_RANK_INDEX(2, gicd_reg - GICD_ICFGR)]; > > + vgic_unlock_rank(v, rank); > > + return 0; > > This needs to return 1 or recent kernels will crash when they try and > read these registers. > > David > > From 8c2377a9b4a10cba57fba9f8a19177ac73339d78 Mon Sep 17 00:00:00 2001 > From: David Vrabel > Date: Mon, 9 Jan 2012 15:17:22 +0000 > Subject: [PATCH] ARM: allow guest to read GICD_ICFGRn registers > > Signed-off-by: David Vrabel Acked-by: Ian Campbell > --- > xen/arch/arm/vgic.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/xen/arch/arm/vgic.c b/xen/arch/arm/vgic.c > index 26eae55..584e682 100644 > --- a/xen/arch/arm/vgic.c > +++ b/xen/arch/arm/vgic.c > @@ -266,7 +266,7 @@ static int vgic_distr_mmio_read(struct vcpu *v, > mmio_info_t *info) > vgic_lock_rank(v, rank); > *r = rank->icfg[REG_RANK_INDEX(2, gicd_reg - GICD_ICFGR)]; > vgic_unlock_rank(v, rank); > - return 0; > + return 1; > > case GICD_NSACR ... GICD_NSACRN: > /* We do not implement securty extensions for guests, read zero */