[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [RFC 20/22] xen/arm: gic: Expose the vGIC versions suported by GIC
On Fri, 2015-05-08 at 14:29 +0100, Julien Grall wrote: > Some version of the GIC are able so support multiple versions of the > vGIC. > > For instance, some version of the GICv3 can as well support GICv2. > > Signed-off-by: Julien Grall <julien.grall After my suggestion on #16 this might fit in as a flag in the proposed gic info structs? > --- > xen/arch/arm/gic-v2.c | 1 + > xen/arch/arm/gic-v3.c | 1 + > xen/include/asm-arm/gic.h | 6 ++++-- > 3 files changed, 6 insertions(+), 2 deletions(-) > > diff --git a/xen/arch/arm/gic-v2.c b/xen/arch/arm/gic-v2.c > index f53560e..4719bc8 100644 > --- a/xen/arch/arm/gic-v2.c > +++ b/xen/arch/arm/gic-v2.c > @@ -737,6 +737,7 @@ const static struct gic_hw_operations gicv2_ops = { > static int __init gicv2_preinit(struct dt_device_node *node, const void > *data) > { > gicv2_info.hw_version = GIC_V2; > + gicv2_info.vgic_versions = GIC_V2; > gicv2_info.node = node; > register_gic_ops(&gicv2_ops); > dt_irq_xlate = gic_irq_xlate; > diff --git a/xen/arch/arm/gic-v3.c b/xen/arch/arm/gic-v3.c > index 7603a2c..329d6ca 100644 > --- a/xen/arch/arm/gic-v3.c > +++ b/xen/arch/arm/gic-v3.c > @@ -1249,6 +1249,7 @@ static const struct gic_hw_operations gicv3_ops = { > static int __init gicv3_preinit(struct dt_device_node *node, const void > *data) > { > gicv3_info.hw_version = GIC_V3; > + gicv3_info.vgic_versions = GIC_V3; > gicv3_info.node = node; > register_gic_ops(&gicv3_ops); > dt_irq_xlate = gic_irq_xlate; > diff --git a/xen/include/asm-arm/gic.h b/xen/include/asm-arm/gic.h > index 4319ac4..5f791b4 100644 > --- a/xen/include/asm-arm/gic.h > +++ b/xen/include/asm-arm/gic.h > @@ -207,8 +207,8 @@ struct gic_lr { > }; > > enum gic_version { > - GIC_V2, > - GIC_V3, > + GIC_V2 = 1 << 0, > + GIC_V3 = 1 << 1, > }; > > extern enum gic_version gic_hw_version(void); > @@ -282,6 +282,8 @@ void gic_clear_lrs(struct vcpu *v); > struct gic_info { > /* GIC version */ > enum gic_version hw_version; > + /* vGIC versions supported */ > + uint32_t vgic_versions; > /* Number of GIC lines supported */ > unsigned int nr_lines; > /* Number of LR registers */ _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |