[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v4 23/25] arm: vgic emulation
On Mon, 9 Jan 2012, David Vrabel wrote: > On 09/01/12 17:59, stefano.stabellini@xxxxxxxxxxxxx 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. Not just a comment but a patch! Wonderful! I'll merge it with this patch, thanks! > >From 8c2377a9b4a10cba57fba9f8a19177ac73339d78 Mon Sep 17 00:00:00 2001 > From: David Vrabel <david.vrabel@xxxxxxxxxx> > Date: Mon, 9 Jan 2012 15:17:22 +0000 > Subject: [PATCH] ARM: allow guest to read GICD_ICFGRn registers > > Signed-off-by: David Vrabel <david.vrabel@xxxxxxxxxx> > --- > 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 */ > _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |