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

Re: [PATCH for-4.22 v2.5] xen/arm: gic: defer host LPI allocation until after ITS init


  • To: Mykola Kvach <mykola_kvach@xxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: "Orzel, Michal" <michal.orzel@xxxxxxx>
  • Date: Fri, 19 Jun 2026 11:48:08 +0200
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=epam.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=MdfRQUMOQhxhhJkCBBPqXhzrGY18rGzkim3POk4UUZ4=; b=W4iVymn++tuOwYIz28nnxFY4oDxtzoxCxpl7xDXYQspW3ZxT3o/MsQZlO3vRR0vaxD9jb5OGRlyMpRjkMX2yPRmUq3pBv/exBBkOLurYNW/dcAkHyo5iNIbthX1WHNXn4pEsJTPgTDQK+1JTAS2XpIavaYzPsQ9zvKuzMbIjrTr2yX095zWmuIe6IKcOJDJsaigvVzhLNeQyks/ceJjkTdShf6OkPWvCTuhdMM3gpaIQJnj+RZuMaOREp5NmZjBLrpAVXFJmaoEJT+mnA/ergweRAsFA/WYc61MLY6kO/EqV2oehpqcMVTiS6tc5jlUZmRNEptYdD1EugtZOJRdK2Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=nymJKZYD6xCuQo0U8ZyNdzJrPiUG4CgJrnnPxa0LlVRY9M663ADVgI4fOIPzY9r2yExMHoHfqadlOlsIRp2Ie8L3xMfFrYNt87/peHVasjfZvPsnWBfQAdkX5ErAHnrc4P8PO/db8piV8XEYMJnd98Ea/qq+dZN/6zPAuFMTCesaZK5ntuMHRSLstJF/ldnNnuhY7GcVJOQhwJ6OzDE3AVPxO/Zrix0G7NtJVuHCMIHsCzdnqpiSaG+8jUFkPd020I7XhCUtDn3wRQmlAS5PAZDida62pmRXALlJUT8eYu68LigqPmmEOLXRWAUDNSl3raOGAfmy4uuJNNrGp6lr1g==
  • 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: Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, "Volodymyr Babchuk" <Volodymyr_Babchuk@xxxxxxxx>, Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>, Luca Fancellu <luca.fancellu@xxxxxxx>, "Mykola Kvach" <xakep.amatop@xxxxxxxxx>, Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>
  • Delivery-date: Fri, 19 Jun 2026 09:48:24 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

@Oleksii, can we ask for a release ack here?

~Michal

On 19-Jun-26 08:09, Orzel, Michal wrote:
> 
> 
> On 19-Jun-26 07:45, Mykola Kvach wrote:
>> gicv3_lpi_init_host_lpis() allocates host LPI state, including the
>> host LPI lookup table, CPU notifier state and the boot CPU pending table.
>> Those allocations use gicv3_its_get_memflags().
>>
>> ITS quirks are discovered by gicv3_its_init(), so allocating host LPI
>> state from gicv3_dist_init() can happen before the memory restrictions
>> required by the ITS are known. On affected systems this can leave
>> Redistributor LPI state allocated and programmed with the default memory
>> policy.
>>
>> Move host LPI initialization after gicv3_its_init(), and only run it when
>> a host ITS was found. The old call ignored the return value. Now that the
>> call is made from gicv3_init(), check it and panic on failure because
>> Redistributor LPI initialization relies on that state being available.
>>
>> This also narrows the condition for host LPI initialization from
>> "GICD advertises LPIs" to "a host ITS was discovered". This is
>> intentional: Xen currently has no supported LPI path without a host ITS,
>> and gicv3_lpi_init_rdist() already rejects that case with -ENODEV.
>> Therefore, on systems where GICD_TYPE_LPIS is set but no host ITS is
>> present, skipping gicv3_lpi_init_host_lpis() only avoids allocating host
>> LPI state that cannot be used by a supported Xen LPI path.
>>
>> Fixes: dcb6cb263689 ("ARM: GICv3 ITS: introduce host LPI array")
>> Fixes: 751ec850ec1d ("ARM: ITS: implement quirks and add support for Renesas 
>> Gen4 ITS")
>> Signed-off-by: Mykola Kvach <mykola_kvach@xxxxxxxx>
>> Reviewed-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@xxxxxxxx>
> Reviewed-by: Michal Orzel <michal.orzel@xxxxxxx>
> 
> ~Michal
> 
> 




 


Rackspace

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