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

Re: [PATCH v2 2/4] xen/arm: its: separate ITS and host LPI quirk scopes


  • To: "Orzel, Michal" <michal.orzel@xxxxxxx>
  • From: Mykola Kvach <mykola_kvach@xxxxxxxx>
  • Date: Tue, 22 Sep 2026 17:02:08 +0300
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=rbLdUjeDZ7fj3h/kdE7ekuRdj4H7UCSvClOU6Cd5lAg=; b=iWtlRdjTG2K5GBZACDVBElDmMVvaVUKhMVGdzqrr6Lg1Xf5/TtH93InE16xqIK5zi7WR4088OHYiiElxIgtpOkGTlGGXJ6EmSHlpY8V430F2lSshnuz5yefaDrvPa9y7bimCaSuvoY4CwwjAXvSh1nzSq088gZ/9nfakktxvdpetlSV9gMg0+Ip6UuyW+NrmAwgRK+tHug5k5ENGC6QSlBkyzrLmwx0qMuX2lWcOvjeGl+Ihr2mOgpmMSAGWacOWF/M5cpuyR368ecDKm22IkpoDOAVCDg7cormDmBEuvYPP014WMNO978w76ZwbG+kAqVAj4w3QzwgxS1JtefowKg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=czPMoJtnuk4ko5uXMvwBG5ZvHEiab8N1cEOKaqGMiwDiAoUJNM8+F4i0Ea+yzE+jTfvcmarSQTRbV09pWIA3fLqp6kok65FJHx54JV9C/PmzGzL/0Q3cb3k/E2OS0AL+XRkulN8G8B6IA4eHqva9yIIGC29LVwYcTdeFfQsIjY1nr8H0ac+FFUfhO1c8nPkUw0MC6GFiXctRQWQCkr7mOcm4QGxkH5m6epVa0aKiXbyKS0l1a+S32Dtd+wd/hkt3ZzeDUP99w95gO79SiA2XajxLHByK9io8ZDFh22KCdPdSeOoEgJQ1wJe3XT8FPnAg4ANFCYIh6p82pDcx6sEFdg==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=epam.com header.i="@epam.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com;
  • Cc: Mykola Kvach <xakep.amatop@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Luca Fancellu <luca.fancellu@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>
  • Delivery-date: Tue, 22 Sep 2026 14:02:19 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Mail-followup-to: "Orzel, Michal" <michal.orzel@xxxxxxx>, Mykola Kvach <xakep.amatop@xxxxxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxxx, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Luca Fancellu <luca.fancellu@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>

Hi Michal,

Thanks for the follow-up.

On Fri, Jul 31, 2026 at 10:24:47AM +0200, Orzel, Michal wrote:
> 
> 
> On 28-May-26 02:25, Mykola Kvach wrote:
> > From: Mykola Kvach <mykola_kvach@xxxxxxxx>
> > 
> > ITS quirks can impose restrictions on memory accessed by the ITS itself and
> > on shared host LPI/Redistributor state. These scopes are not identical, so
> > a single global ITS quirk state makes the host LPI policy depend implicitly
> > on the quirks seen while initializing host ITSes.
> > 
> > Add per-ITS quirk_flags to struct host_its and keep a separate
> > host_lpi_flags state in the LPI code. The quirk table now records the
> > ITS-private and host LPI scopes explicitly through its_flags and lpi_flags.
> > The R-Car Gen4 quirk applies the same memory-related restrictions to both
> > scopes, preserving the existing behavior without relying on an implicit
> > aggregation step.
> > 
> > This also removes the old assumption that all host ITSes must expose the
> > same quirk state. Host LPI restrictions are accumulated only from quirk
> > entries that explicitly set lpi_flags.
> > 
> > Use per-ITS quirk_flags for GITS_CBASER, GITS_BASER<n> and ITT allocations.
> > Use host_lpi_flags directly in gic-v3-lpi.c for GICR_PROPBASER and
> > GICR_PENDBASER setup. Memory-related quirk bits are named GICV3_QUIRK_MEM_*
> > and are translated by shared gicv3_mem_get_*() helpers.
> > 
> > Signed-off-by: Mykola Kvach <mykola_kvach@xxxxxxxx>
> I already gave R-b for this patch but noticed two issues:
> 
> [...]
> 
> >  
> > -static void gicv3_its_enable_quirks(struct host_its *hw_its)
> > +static void __init gicv3_its_collect_quirks(struct host_its *hw_its)
> The only caller of gicv3_its_collect_quirks() is
> gicv3_its_init_single_its(), which stays non-init until patch 4/4.
> Please annotate the caller here as well.

I plan to replace the first patch, whose release fix is now upstream,
with the initialization-order follow-up discussed with Julien. It will
prepare all ITSes and collect their quirks, initialize host LPI state,
and then activate the ITSes.

I'll put the __init annotations on the ITS preparation and activation
functions, and gicv3_its_init(), in that replacement patch. This will
make the quirk collector's caller init-only before the quirk-scope
changes are introduced.

> 
> [...]
> 
> > @@ -157,6 +164,7 @@ int gicv3_lpi_init_rdist(void __iomem * rdist_base);
> >  /* Initialize the host structures for LPIs and the host ITSes. */
> >  int gicv3_lpi_init_host_lpis(unsigned int host_lpi_bits);
> >  int gicv3_its_init(void);
> > +void __init gicv3_lpi_update_host_flags(uint32_t flags);
> Please, do not add __init here for a prototype.

I'll also remove __init from the gicv3_lpi_update_host_flags() prototype
and keep it on the definition.

Best regards,
Mykola



 


Rackspace

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