[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v4 14/16] xen/arm: Add virtual GICv3 support



On Mon, 2014-06-02 at 17:10 +0100, Julien Grall wrote:
> 
> > diff --git a/xen/arch/arm/vgic.c b/xen/arch/arm/vgic.c
> > index 3fa0857..787c547 100644
> > --- a/xen/arch/arm/vgic.c
> > +++ b/xen/arch/arm/vgic.c
> > @@ -264,10 +264,19 @@ int domain_vgic_init(struct domain *d)
> >      else
> >          d->arch.vgic.nr_lines = 0; /* We don't need SPIs for the guest */
> >  
> > -    if ( gic_hw_version() == GIC_V2 )
> > +    switch ( gic_hw_version() )
> > +    {
> > +#ifdef CONFIG_ARM_64
> > +    case GIC_V3:
> > +        vgic_v3_init(d);
> > +        break;
> > +#endif
> > +    case GIC_V2:
> >          vgic_v2_init(d);
> > -    else
> > +        break;
> > +    default:
> >          panic("No VGIC found\n");
> 
> I think I've already said in an earlier patch. Please avoid to use panic
> when this function is called by a VM.

Whether called from a guest or not, gic_hw_version's result is, I think,
completely under hypervisor control, if it returns a gic version which
we don't support then that is worthy of a panic() I think, or a
BUG_ON(), since that is a hypervisor coding issue.

Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.