From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Julian Vetter <julian.vetter@vates.tech>, xen-devel@lists.xenproject.org
Cc: "Andrew Cooper" <andrew.cooper3@citrix.com>,
"Anthony PERARD" <anthony.perard@vates.tech>,
"Michal Orzel" <michal.orzel@amd.com>,
"Jan Beulich" <jbeulich@suse.com>,
"Julien Grall" <julien@xen.org>,
"Roger Pau Monné" <roger.pau@citrix.com>,
"Stefano Stabellini" <sstabellini@kernel.org>,
"Juergen Gross" <jgross@suse.com>,
"Andrii Sultanov" <andriy.sultanov@vates.tech>,
"Guillaume Thouvenin" <guillaume.thouvenin@vates.tech>,
"Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>,
"Bertrand Marquis" <bertrand.marquis@arm.com>,
"Volodymyr Babchuk" <Volodymyr_Babchuk@epam.com>,
"Oleksii Moisieiev" <oleksii_moisieiev@epam.com>,
"Timothy Pearson" <tpearson@raptorengineering.com>,
"Alistair Francis" <alistair.francis@wdc.com>,
"Connor Davis" <connojdavis@gmail.com>,
"Oleksii Kurochko" <oleksii.kurochko@gmail.com>,
"Teddy Astie" <teddy.astie@vates.tech>
Subject: Re: [PATCH v3 2/6] ARM/sysctl: Expose the supported guest GIC modes in physinfo
Date: Tue, 11 Aug 2026 14:38:18 +0100 [thread overview]
Message-ID: <5c920195-efc6-460d-b2b2-743911d7916d@citrix.com> (raw)
In-Reply-To: <1784211104.8631fc262581453bbf619ec5b2062170.19f6b44e427000edb5@vates.tech>
On 16/07/2026 3:11 pm, Julian Vetter wrote:
> From: Andrew Cooper <andrew.cooper3@citrix.com>
I supposed I should finish the commit message.
"In preparation to simplify the domain creation logic surrounding GIC
version."
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
> ---
> Changes in v3:
> - No changes
> ---
> xen/arch/arm/sysctl.c | 26 ++++++++++++++++++++++++++
> xen/include/public/sysctl.h | 2 ++
> 2 files changed, 28 insertions(+)
>
> diff --git a/xen/arch/arm/sysctl.c b/xen/arch/arm/sysctl.c
> index 32cab4feff..3b0edf4cec 100644
> --- a/xen/arch/arm/sysctl.c
> +++ b/xen/arch/arm/sysctl.c
> @@ -12,7 +12,10 @@
> #include <xen/dt-overlay.h>
> #include <xen/errno.h>
> #include <xen/hypercall.h>
> +
> #include <asm/arm64/sve.h>
> +#include <asm/gic.h>
> +
> #include <public/sysctl.h>
>
> void arch_do_physinfo(struct xen_sysctl_physinfo *pi)
> @@ -21,6 +24,29 @@ void arch_do_physinfo(struct xen_sysctl_physinfo *pi)
>
> pi->arch_capabilities |= MASK_INSR(sve_encode_vl(get_sys_vl_len()),
> XEN_SYSCTL_PHYSCAP_ARM_SVE_MASK);
> +
> + /*
> + * The GIC version(s) we're happy creating guests with. Right now for
> + * simplicity it is tied to the active hardware version, but this will
> + * cease to be the case if/when the compatbility modes are enabled.
> + */
> + switch ( gic_hw_version() )
> + {
> + case GIC_V2:
> + pi->arch_capabilities |= XEN_SYSCTL_PHYSCAP_ARM_GIC_V2;
> + break;
> +
> + case GIC_V3:
> + pi->arch_capabilities |= XEN_SYSCTL_PHYSCAP_ARM_GIC_V3;
> + break;
> +
> + case GIC_INVALID:
> + /*
> + * Running a control domain without having the GIC sorted yet?
> + * Something's broken, but there's nothing we can do about it here.
> + */
printk_once(XENLOG_ERR "Unrecognised GIC version %d\n", gic_ver);
We might not be able to do anything useful for the caller, but we can at
least make sure the problem doesn't go unnoticed.
~Andrew
next prev parent reply other threads:[~2026-08-11 13:39 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-16 14:06 [PATCH v3 0/6] Fix ARM domcreate Julian Vetter
2026-07-16 14:11 ` [PATCH v3 1/6] xen/arm: report proper GIC version via XEN_DOMCTL_getdomaininfo Julian Vetter
2026-08-17 12:19 ` Orzel, Michal
[not found] ` <20260716141138.88265-1-julian.vetter@vates.tech>
2026-07-16 14:11 ` [PATCH v3 2/6] ARM/sysctl: Expose the supported guest GIC modes in physinfo Julian Vetter
2026-08-11 13:38 ` Andrew Cooper [this message]
2026-08-17 12:39 ` Orzel, Michal
2026-08-17 13:08 ` Andrew Cooper
2026-08-17 14:36 ` Orzel, Michal
2026-07-16 14:11 ` [PATCH v3 3/6] tools/arm: choose GIC version explicitly instead of relying on GIC_NATIVE Julian Vetter
2026-08-11 13:43 ` Andrew Cooper
2026-07-16 14:11 ` [PATCH v3 4/6] xen/arm: remove XEN_DOMCTL_CONFIG_GIC_NATIVE from the ABI Julian Vetter
2026-08-11 13:54 ` Andrew Cooper
2026-07-16 14:11 ` [PATCH v3 5/6] xen/arm: report clock_frequency via sysctl physinfo, not createdomain Julian Vetter
2026-07-16 14:38 ` Jan Beulich
2026-07-16 14:11 ` [PATCH v3 6/6] xen: make config argument const Julian Vetter
2026-08-11 13:59 ` Andrew Cooper
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5c920195-efc6-460d-b2b2-743911d7916d@citrix.com \
--to=andrew.cooper3@citrix.com \
--cc=Volodymyr_Babchuk@epam.com \
--cc=alistair.francis@wdc.com \
--cc=andriy.sultanov@vates.tech \
--cc=anthony.perard@vates.tech \
--cc=bertrand.marquis@arm.com \
--cc=connojdavis@gmail.com \
--cc=guillaume.thouvenin@vates.tech \
--cc=jbeulich@suse.com \
--cc=jgross@suse.com \
--cc=julian.vetter@vates.tech \
--cc=julien@xen.org \
--cc=marmarek@invisiblethingslab.com \
--cc=michal.orzel@amd.com \
--cc=oleksii.kurochko@gmail.com \
--cc=oleksii_moisieiev@epam.com \
--cc=roger.pau@citrix.com \
--cc=sstabellini@kernel.org \
--cc=teddy.astie@vates.tech \
--cc=tpearson@raptorengineering.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.