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

[xen staging] xen/arm: report proper GIC version via XEN_DOMCTL_getdomaininfo



commit adbbbd47a1fad8e3bc1ab65c555f11d831fd6681
Author:     Julian Vetter <julian.vetter@xxxxxxxxxx>
AuthorDate: Fri Sep 11 14:47:31 2026 +0200
Commit:     Michal Orzel <michal.orzel@xxxxxxx>
CommitDate: Tue Sep 15 17:13:02 2026 +0200

    xen/arm: report proper GIC version via XEN_DOMCTL_getdomaininfo
    
    When creating a domain on ARM, and passing XEN_DOMCTL_CONFIG_GIC_NATIVE
    for the gic_version field in the struct xen_arch_domainconfig,
    arch_sanitise_domain_config() resolves this to the approrpiate GIC_V2 or
    GIC_V3 version the domain actually has, based on the host's
    gic_hw_version(). That value is stored in the domain as
    d->arch.vgic.version, but can't be queried through any other domctl
    later. Toolstacks that create and build a domain in the same call
    already have this info from the createdomain reply and never need to ask
    again.
    
    Toolstacks that create a domain and build it later from a separate
    process do need to ask again. But, the ARM implementation only fills in
    info->flags and info->gpaddr_bits. info->arch_config is left zeroed, so
    XEN_DOMCTL_getdomaininfo always reports gic_version as
    XEN_DOMCTL_CONFIG_GIC_NATIVE (0) regardless of what was actually
    configured earlier.
    
    Signed-off-by: Julian Vetter <julian.vetter@xxxxxxxxxx>
    Reviewed-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
    Reviewed-by: Michal Orzel <michal.orzel@xxxxxxx>
---
 xen/arch/arm/domctl.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/xen/arch/arm/domctl.c b/xen/arch/arm/domctl.c
index 6c9a3f9920..b76af56fad 100644
--- a/xen/arch/arm/domctl.c
+++ b/xen/arch/arm/domctl.c
@@ -24,6 +24,8 @@ void arch_get_domain_info(const struct domain *d,
     info->flags |= XEN_DOMINF_hap;
 
     info->gpaddr_bits = p2m_ipa_bits;
+
+    info->arch_config.gic_version = d->arch.vgic.version;
 }
 
 static int handle_vuart_init(struct domain *d, 
--
generated by git-patchbot for /home/xen/git/xen.git#staging



 


Rackspace

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