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

Re: [PATCH v6 2/5] tools/arm: choose GIC version explicitly instead of relying on GIC_NATIVE



On Mon, Sep 28, 2026 at 02:19:58PM +0200, Julian Vetter wrote:
> XEN_DOMCTL_CONFIG_GIC_NATIVE lets the toolstack ask Xen to silently
> resolve the domain's GIC version to whatever the host hardware has. Xen
> then writes the resolved value back into the same in/out
> xen_arch_domainconfig the toolstack used as input, which is the kind of
> API abuse we're trying to get rid of. The struct passed to createdomain
> should only be an input parameter.
> 
> Move the "pick the best available GIC version" decision to the
> toolstack, using the XEN_SYSCTL_PHYSCAP_ARM_GIC_V2/V3 capability bits
> already exposed via XEN_SYSCTL_physinfo:
> 
>  * libxl__arch_domain_build_info_setdefault() resolves the GIC version
>    against those bits before the config is built. An unspecified version
>    becomes v3 if available, else v2, else fails. An explicitly requested
>    v2/v3 is validated against the same bits, so a version the host
>    cannot provide is directly rejected in the toolstack.
>  * The Python xc.domain_create() binding does the same via a call to
>    xc_physinfo().
>  * libxl__arch_domain_prepare_config() therefore only ever sees a
>    concrete v2/v3 request and just validates it. The GIC_NATIVE case is
>    dropped since setdefault() always resolves it first.
> 
> LIBXL_GIC_VERSION_DEFAULT keeps its name and value: xl.cfg still accepts
> "default" as the C<gic_version> keyword, and setdefault() resolves it to
> a concrete v2/v3 before anything else can observe it.
> 
> This guarantees no toolstack path can still produce
> XEN_DOMCTL_CONFIG_GIC_NATIVE, in preparation for removing it from the
> Xen side and from the ABI entirely.
> 
> Signed-off-by: Julian Vetter <julian.vetter@xxxxxxxxxx>
> Acked-by: Michal Orzel <michal.orzel@xxxxxxx>
> ---
> Changes in v6:
> - Drop the xl.cfg(5) mention of XEN_SYSCTL_physinfo
> - Brace every branch of the has_v3/has_v2 if/else, not just the else
> - Keep LIBXL_GIC_VERSION_DEFAULT, to not break gic_version="default"
> - Move has_v3/has_v2 declarations to the top
> - Added Acked-by

Acked-by: Anthony PERARD <anthony.perard@xxxxxxxxxx>

Thanks,


--
Anthony Perard | Vates XCP-ng Developer

XCP-ng & Xen Orchestra - Vates solutions

web: https://vates.tech

 


Rackspace

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