mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
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@vates.tech>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Michal Orzel <michal.orzel@amd.com>
(cherry picked from commit adbbbd47a1)
This commit is contained in:
1 parent
781b60f951
commit
3ffc21956e
1 file changed
+2
@@ -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,
|
||||
|
||||