From: Julien Grall <julien@xen.org>
To: Bertrand Marquis <bertrand.marquis@arm.com>,
xen-devel@lists.xenproject.org
Cc: Stefano Stabellini <sstabellini@kernel.org>,
Volodymyr Babchuk <Volodymyr_Babchuk@epam.com>
Subject: Re: [PATCH] xen/arm: rename guest_cpuinfo in domain_cpuinfo
Date: Mon, 12 Jun 2023 11:38:12 +0100 [thread overview]
Message-ID: <24566db9-e6da-0b2b-e7a3-5edef81d159c@xen.org> (raw)
In-Reply-To: <7e18eceb2fb2f4cac991773a8697e9bf50b89aaf.1686316358.git.bertrand.marquis@arm.com>
Hi Bertrand,
On 09/06/2023 14:13, Bertrand Marquis wrote:
> Rename the guest_cpuinfo structure to domain_cpuinfo as it is not only
> used for guests but also for dom0 so domain is a more suitable name.
>
> While there also rename the create_guest_cpuinfo function to
> create_domain_cpuinfo to be coherent.
>
> Signed-off-by: Bertrand Marquis <bertrand.marquis@arm.com>
> ---
> xen/arch/arm/arm64/vsysreg.c | 6 ++--
> xen/arch/arm/cpufeature.c | 40 +++++++++++++--------------
> xen/arch/arm/include/asm/cpufeature.h | 2 +-
> xen/arch/arm/vcpreg.c | 2 +-
> 4 files changed, 25 insertions(+), 25 deletions(-)
>
> diff --git a/xen/arch/arm/arm64/vsysreg.c b/xen/arch/arm/arm64/vsysreg.c
> index fe31f7b3827f..b5d54c569b33 100644
> --- a/xen/arch/arm/arm64/vsysreg.c
> +++ b/xen/arch/arm/arm64/vsysreg.c
> @@ -76,7 +76,7 @@ TVM_REG(CONTEXTIDR_EL1)
> case HSR_SYSREG_##reg: \
> { \
> return handle_ro_read_val(regs, regidx, hsr.sysreg.read, hsr, \
> - 1, guest_cpuinfo.field.bits[offset]); \
> + 1, domain_cpuinfo.field.bits[offset]); \
> }
>
> void do_sysreg(struct cpu_user_regs *regs,
> @@ -300,7 +300,7 @@ void do_sysreg(struct cpu_user_regs *regs,
>
> case HSR_SYSREG_ID_AA64PFR0_EL1:
> {
> - register_t guest_reg_value = guest_cpuinfo.pfr64.bits[0];
> + register_t guest_reg_value = domain_cpuinfo.pfr64.bits[0];
>
> if ( is_sve_domain(v->domain) )
> {
> @@ -336,7 +336,7 @@ void do_sysreg(struct cpu_user_regs *regs,
> * When the guest has the SVE feature enabled, the whole id_aa64zfr0_el1
> * needs to be exposed.
> */
> - register_t guest_reg_value = guest_cpuinfo.zfr64.bits[0];
> + register_t guest_reg_value = domain_cpuinfo.zfr64.bits[0];
>
> if ( is_sve_domain(v->domain) )
> guest_reg_value = system_cpuinfo.zfr64.bits[0];
> diff --git a/xen/arch/arm/cpufeature.c b/xen/arch/arm/cpufeature.c
> index b53e1a977601..5f4644865505 100644
> --- a/xen/arch/arm/cpufeature.c
> +++ b/xen/arch/arm/cpufeature.c
> @@ -14,7 +14,7 @@
>
> DECLARE_BITMAP(cpu_hwcaps, ARM_NCAPS);
>
> -struct cpuinfo_arm __read_mostly guest_cpuinfo;
> +struct cpuinfo_arm __read_mostly domain_cpuinfo;
>
> #ifdef CONFIG_ARM_64
> static bool has_sb_instruction(const struct arm_cpu_capabilities *entry)
> @@ -191,45 +191,45 @@ void identify_cpu(struct cpuinfo_arm *c)
> /*
> * This function is creating a cpuinfo structure with values modified to mask
> * all cpu features that should not be published to guest.
I noticed you modified "guests" to "domains" below but not "guest" here.
Is this intended?
> - * The created structure is then used to provide ID registers values to guests.
> + * The created structure is then used to provide ID registers values to domains.
> */
> -static int __init create_guest_cpuinfo(void)
> +static int __init create_domain_cpuinfo(void)
> {
> /* Use the sanitized cpuinfo as initial guest cpuinfo */
Same question here.
> - guest_cpuinfo = system_cpuinfo;
> + domain_cpuinfo = system_cpuinfo;
Cheers,
--
Julien Grall
next prev parent reply other threads:[~2023-06-12 10:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-09 13:13 [PATCH] xen/arm: rename guest_cpuinfo in domain_cpuinfo Bertrand Marquis
2023-06-12 10:38 ` Julien Grall [this message]
2023-06-12 12:13 ` Bertrand Marquis
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=24566db9-e6da-0b2b-e7a3-5edef81d159c@xen.org \
--to=julien@xen.org \
--cc=Volodymyr_Babchuk@epam.com \
--cc=bertrand.marquis@arm.com \
--cc=sstabellini@kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).