|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v2] xen/arm: gicv3: initialize eSPI unconditionally
On 22-Sep-26 20:58, Leonid Komarianskyi wrote: > Since the firmware may initialize eSPIs before Xen, and without > CONFIG_GICV3_ESPI enabled, Xen would not reinitialize them properly > during boot. In such cases, once the GIC is re-enabled in Xen, > interrupts may be received that cannot be handled. > > To ensure proper operation on hardware with eSPI feature, even when the eSPI > config is disabled, gicv3_dist_espi_common_init() should be invoked > regardless of whether CONFIG_GICV3_ESPI is enabled or not. This will not > affect hardware without eSPI support, as the function checks if the > hardware supports eSPIs by reading the GICD_TYPER.ESPI field (using > GICD_TYPER_ESPIS_NUM macro), which indicates whether the extended SPI > range is supported. If the hardware does not support eSPI, the function > will not perform any actions. > > There are no functional changes for setups where CONFIG_GICV3_ESPI=y. > > Suggested-by: Julien Grall <jgrall@xxxxxxxxxx> > Signed-off-by: Leonid Komarianskyi <leonid_komarianskyi@xxxxxxxx> > Acked-by: Julien Grall <jgrall@xxxxxxxxxx> > --- > Changes in v2: > - rebased on the current staging > - placed Suggested-by tag first to keep tags in chronological order > - added Acked-by from Julien Grall > > This is a follow-up patch related to the discussion: > https://lore.kernel.org/xen-devel/820704d0-4047-4f02-a058-01daba2765f1@xxxxxxx/ > > Sending v2 with the requested changes, as I only now noticed > that this patch has not been merged yet. > --- > xen/arch/arm/gic-v3.c | 32 ++++++++++++++------------ > xen/arch/arm/include/asm/gic_v3_defs.h | 2 -- > 2 files changed, 17 insertions(+), 17 deletions(-) > > diff --git a/xen/arch/arm/gic-v3.c b/xen/arch/arm/gic-v3.c > index acdac22953..463769d77b 100644 > --- a/xen/arch/arm/gic-v3.c > +++ b/xen/arch/arm/gic-v3.c > @@ -703,17 +703,32 @@ unsigned int gic_number_espis(void) > return gic_hw_ops->info->nr_espi; > } > > +static void __init gicv3_dist_espi_init_aff(uint64_t affinity) > +{ > + unsigned int i; > + > + for ( i = 0; i < gicv3_info.nr_espi; i++ ) > + writeq_relaxed_non_atomic(affinity, GICD + GICD_IROUTERnE + i * 8); > +} > +#else > + NIT: no blank line here. I'll remove on commit. Reviewed-by: Michal Orzel <michal.orzel@xxxxxxx> ~Michal
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |