[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: Mykola Kvach <xakep.amatop@xxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: "Orzel, Michal" <michal.orzel@xxxxxxx>
  • Date: Fri, 31 Jul 2026 10:24:47 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=gmail.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • 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=f6YXh1GsRJ6OGXBZGODLA+/0e0FUR/AkeyB+bVrj8KI=; b=WL9+0ZyR6LQ02+ClPqmsNp32tsbdJiz7AGken4GX0Awx+TE67jHylsbv5qz3K0qnDoZ6xaufwQbh9KHt92+EJopLez9hjjnU39LW+NJGp/X05NCP6zfjTUP2och4vn1zSg8k5fTNZH4AlE8lfW9WW9HjSCFZRCKOw2Y8R0BZK1XESrI9Qg/2CKx5uGgp/JllnErjF3lKU8VAC5Fz1CFNriPV0HRIl+lo/jGLDO1AbWJL0Xa68JJP6a9tFaeWKLCXfZiN2DGjLLIbh37aHLKj7Y9XAnnBRNirAObnkqVpUjMJHkmRAiSsb5ZzRASFEE0C9ZTXk/xPFX7neisx2vXMOw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=x9Tw29sux+kK0yTyO1OzEOjKJuQV2zyyCFVDrBv12fvzceILw7Tej4tSd7DTWPMl/OZHSRgadB32fbaLVdjrMP1a88CyYuHQW5FP6HwZ+W7iz+VTMPP9h42Ynp6TzBjiYGZI9ySk8ja3HoD3aLeKrat2Ea52LcS8VXHjz0X5lldHvCJhZQnuQtyMDhYIjAtbTzplMkwYPhGJVjsF7z8riWxhMfQOn+nmul9FT1eVpQDMSBbLG7JZMZAWTrpCoCLxxoqZO6ftO47W8R3xqNZmpYRNWdcAi1JysN+DJZhBSmxEWxZrtfkEKtxP7TsyE0QjGlMmHGEzcUbJjqMxiBOx4Q==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=amd.com header.i="@amd.com" header.h="From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck"
  • Cc: Mykola Kvach <mykola_kvach@xxxxxxxx>, 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: Fri, 31 Jul 2026 08:25:13 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>


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.

[...]

> @@ -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.

~Michal




 


Rackspace

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