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

Re: [PATCH v2 0/4] xen/arm: gicv3: defer host LPI init and split ITS/LPI quirk scopes


  • To: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Mykola Kvach <xakep.amatop@xxxxxxxxx>
  • Date: Thu, 28 May 2026 03:43:51 +0300
  • Arc-authentication-results: i=1; mx.google.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=DH5e/cL18VFRRhSFlXrSX4M4Oc/C9qjmJqdiGpxJADk=; fh=hbjjqkXaWls30zzP/XDCsIpBv9lrvJuCsUy3lBRF/sk=; b=fSxVBLvm4aGRAZWteG0IsXvEXtgB1uj2nDdiQ/Cyq3sHnfKA+JxFpsbBsdjEz/iYo/ Hv1h6n6qxT6HCupseR6IcVWgRAAvobtJrOTkeORKv5ncChBPy+lG8EI4S/qnjeBJA8B8 GDpR6Lk2hRVXOCw/WxiThYKCcunXYW47dtoYH6KkIFlqvVw71B4MOUhg6NUg2oyBwSj+ H+XCrj5B/mnkogwMTXMkdhho9UW44YX5U79x05patuXKJIacJ7dI/ANtm/G1bAii+Oil GyBmc9fM+PtgtMd3OgxmgINxshDG0B53wWaJu9Tzsrj8EtvUX+NY71xlouuLBgrGulko f0vw==; darn=lists.xenproject.org
  • Arc-seal: i=1; a=rsa-sha256; t=1779929043; cv=none; d=google.com; s=arc-20240605; b=MpcFGyCBsjwn4z3jgyhWnnnkyled6guJgD/BQE2T/stmsZ4FD+QKvjXGfYlogDb0d8 bVEi+L6XXBaMWVuqHp52/JNvtlqxP7jpKvobyU4SronDHdHYHkeHeVLENZOazx+z9nej LzMwQ3H9h2VA569H+uVcpomMLTE72r+RHN3bobbMEqp7DcKlx+HR6pt/E1g75VcX+Xee cKAskDjKIl30xWnH0AgeLnybXBzpDDY10epAPbaLqLpAfebmrAWrBDCEbDrlO4cqVBB+ NuODuaoTqrEseGWTyyz2EyVZbXEFPfIj5Ru+vhUFlY8YimlQpFwFf8jqHsd4i0fyno7p RFKA==
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=20251104 header.d=gmail.com header.i="@gmail.com" header.h="Content-Transfer-Encoding:Cc:To:Subject:Message-ID:Date:From:In-Reply-To:References:MIME-Version"
  • Cc: Mykola Kvach <mykola_kvach@xxxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Julien Grall <julien@xxxxxxx>, Bertrand Marquis <bertrand.marquis@xxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Volodymyr Babchuk <Volodymyr_Babchuk@xxxxxxxx>, Luca Fancellu <luca.fancellu@xxxxxxx>, Oleksii Kurochko <oleksii.kurochko@xxxxxxxxx>
  • Delivery-date: Thu, 28 May 2026 00:44:14 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hi all,

I forgot to include the v1 link in the cover letter.
For reference, v1 of this series is available here:
    https://patchew.org/Xen/cover.1774431310.git.mykola._5Fkvach@xxxxxxxx/

This v2 is the next revision of that series. Since the patch order and
subjects changed, some tooling may not associate the two automatically.

Thanks,
Mykola


On Thu, May 28, 2026 at 3:28 AM Mykola Kvach <xakep.amatop@xxxxxxxxx> wrote:
>
> From: Mykola Kvach <mykola_kvach@xxxxxxxx>
>
> Hi all,
>
> This series fixes the ordering of host LPI state initialization relative to
> ITS quirk discovery, and then cleans up how ITS-private and host
> LPI/Redistributor quirk effects are represented.
>
> Patch 1 is the release-critical fix. It moves host LPI initialization after
> gicv3_its_init(), so that the host LPI allocation path observes the ITS
> quirks discovered during ITS initialization. This patch is intended for
> 4.22.
>
> Patches 2-4 are follow-up cleanup and DT attribute handling. They are included
> to show the intended direction and to avoid carrying the old global ITS quirk
> model forward, but they are not required for taking the 4.22 fix if the
> release freeze makes that preferable.
>
> The main change from v1 is that this version no longer tries to pre-initialize
> ITS quirks before host LPI setup. Instead, the minimal fix is to defer the
> existing host LPI initialization until after ITS initialization. The follow-up
> patches then split the quirk state by scope:
>
>   * per-ITS flags are used for memory/state accessed by a particular ITS, such
>     as GITS_CBASER, GITS_BASER<n> and ITT memory;
>
>   * host LPI flags are used for shared Redistributor/LPI state, such as
>     GICR_PROPBASER and GICR_PENDBASER.
>
> This avoids relying on an implicit global aggregation of per-ITS quirk state.
> If an ITS-discovered quirk also affects the host LPI/Redistributor path, that
> effect is now expressed explicitly through the quirk entry's lpi_flags.
>
> The series also handles the DT dma-noncoherent property according to the node
> where it appears. An ITS subnode property affects only the corresponding ITS.
> A top-level GIC node property affects only the host LPI/Redistributor policy.
> The property is not inherited implicitly between the parent GIC node and ITS
> subnodes.
>
> The Orange Pi 5 / RK3588-specific quirk patch from v1 has been dropped. The
> previous version modelled the issue as a 32-bit ITS addressing restriction.
> This version handles the relevant non-coherent/non-shareable GIC integration
> through the standard DT dma-noncoherent property on the GIC and ITS nodes
> instead.
> ---
>
> Changes since v1
>
> * Reordered the series so that the minimal host LPI initialization ordering 
> fix
>   is first. Patch 1 is intended for 4.22.
>
> * Dropped the v1 ITS pre-initialization hook.
>
> * Moved the existing gicv3_lpi_init_host_lpis() call after gicv3_its_init()
>   instead, so host LPI state is allocated after ITS workaround discovery.
>
> * Checked the return value from gicv3_lpi_init_host_lpis() and made failure
>   fatal once the ITS/LPI path is enabled.
>
> * Replaced the old single global ITS quirk state with separate per-ITS and
>   host LPI quirk scopes.
>
> * Removed the implicit aggregation of all per-ITS quirks into the host LPI
>   policy. Host LPI effects are now expressed explicitly with lpi_flags.
>
> * Kept per-ITS flags for ITS-private allocations:
>   - GITS_CBASER;
>   - GITS_BASER<n>;
>   - ITT memory.
>
> * Kept host LPI flags for Redistributor/LPI state:
>   - GICR_PROPBASER;
>   - GICR_PENDBASER.
>
> * Refactored ITS quirk matching from fixed IIDR/mask fields to a generic
>   match(hw_its, data) callback plus opaque data.
>
> * Kept first-match semantics explicit. More specific entries must be listed
>   before broader IIDR-only entries.
>
> * Added a reusable IIDR matcher and used it after checking the Renesas
>   machine compatibles for the R-Car Gen4 quirk.
>
> * Split dma-noncoherent handling by DT node scope:
>   - ITS subnode dma-noncoherent affects only the matching ITS;
>   - top-level GIC dma-noncoherent affects only the host LPI/Redistributor
>     policy.
>
> * Dropped the Orange Pi 5 / RK3588-specific quirk patch from v1. The
>   non-coherent GIC integration is now handled through DT dma-noncoherent
>   properties instead of a Xen-side platform quirk.
>
> Mykola Kvach (4):
>   xen/arm: gic: defer host LPI allocation until after ITS init
>   xen/arm: its: separate ITS and host LPI quirk scopes
>   xen/arm: its: refactor ITS quirk matching
>   xen/arm: its: handle dma-noncoherent on GIC and ITS nodes
>
>  xen/arch/arm/gic-v3-its.c             | 171 ++++++++++++++++----------
>  xen/arch/arm/gic-v3-lpi.c             |  66 ++++++++--
>  xen/arch/arm/gic-v3.c                 |  14 ++-
>  xen/arch/arm/include/asm/gic_v3_its.h |  19 ++-
>  4 files changed, 190 insertions(+), 80 deletions(-)
>
> --
> 2.43.0
>



 


Rackspace

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