All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Orzel, Michal" <michal.orzel@amd.com>
To: Hirokazu Takahashi <taka@valinux.co.jp>,
	<xen-devel@lists.xenproject.org>
Cc: jbeulich@suse.com, "Juergen Gross" <jgross@suse.com>,
	"Stefano Stabellini" <sstabellini@kernel.org>,
	"Julien Grall" <julien@xen.org>,
	"Bertrand Marquis" <bertrand.marquis@arm.com>,
	"Volodymyr Babchuk" <Volodymyr_Babchuk@epam.com>,
	"Andrew Cooper" <andrew.cooper3@citrix.com>,
	"Anthony PERARD" <anthony.perard@vates.tech>,
	"Roger Pau Monné" <roger@xenproject.org>,
	"Timothy Pearson" <tpearson@raptorengineering.com>,
	"Alistair Francis" <alistair.francis@wdc.com>,
	"Baptiste Le Duc" <baptiste.le-duc@vates.tech>,
	"Connor Davis" <connojdavis@gmail.com>,
	"Oleksii Kurochko" <oleksii.kurochko@gmail.com>,
	"Dario Faggioli" <dfaggioli@suse.com>,
	"George Dunlap" <gwd@xenproject.org>
Subject: Re: [PATCH v13 2/5] xen/sched: Link CPU topology to scheduler
Date: Tue, 1 Dec 2026 14:20:29 +0100	[thread overview]
Message-ID: <fd3e03ab-d06d-4e81-b196-e75fcdd21ca5@amd.com> (raw)
In-Reply-To: <20261130065721.95202-3-taka@valinux.co.jp>



On 30-Nov-26 07:57, Hirokazu Takahashi wrote:
> Make CPU topology information available to the Xen scheduler.
> Additionally, ensure that this topology information is displayed
> when executing the 'xl info -n' command.
> 
> Signed-off-by: Hirokazu Takahashi <taka@valinux.co.jp>
> Acked-by: Jan Beulich <jbeulich@suse.com>
> Reviewed-by: Juergen Gross <jgross@suse.com> # scheduler part
> ---
>  xen/arch/arm/include/asm/processor.h   |  4 --
>  xen/arch/arm/smpboot.c                 | 34 ++++++++++++-----
>  xen/arch/ppc/include/asm/processor.h   |  4 --
>  xen/arch/riscv/include/asm/processor.h |  4 --
>  xen/common/device-tree/cpu-topology.c  | 53 ++++++++++++++++++++++++++
>  xen/common/sched/credit2.c             |  6 +++
>  xen/common/sysctl.c                    |  1 +
>  xen/drivers/acpi/cpu-topology.c        |  3 ++
>  xen/include/xen/cpu-topology.h         | 24 +++++++++++-
>  9 files changed, 110 insertions(+), 23 deletions(-)
> 
> diff --git a/xen/arch/arm/include/asm/processor.h b/xen/arch/arm/include/asm/processor.h
> index 8ee8f88fb4..fe4125cd75 100644
> --- a/xen/arch/arm/include/asm/processor.h
> +++ b/xen/arch/arm/include/asm/processor.h
> @@ -614,10 +614,6 @@ void show_stack(const struct cpu_user_regs *regs);
>  
>  #define cpu_relax() barrier() /* Could yield? */
>  
> -/* All a bit UP for the moment */
> -#define cpu_to_core(_cpu)   (0)
> -#define cpu_to_socket(_cpu) (0)
> -
>  struct vcpu;
>  void vcpu_regs_hyp_to_user(const struct vcpu *vcpu,
>                             struct vcpu_guest_core_regs *regs);
> diff --git a/xen/arch/arm/smpboot.c b/xen/arch/arm/smpboot.c
> index 97e227cd92..41162f8ea1 100644
> --- a/xen/arch/arm/smpboot.c
> +++ b/xen/arch/arm/smpboot.c
> @@ -103,17 +103,30 @@ static void set_cpu_sibling_map(unsigned int cpu)
>      BUG_ON(!per_cpu(cpu_sibling_mask, cpu));
>      BUG_ON(!per_cpu(cpu_core_mask, cpu));
>  
> -    /*
> -     * Currently we assume there is no multithread and NUMA, so
> -     * a CPU is a sibling with itself, and the all online CPUs
> -     * are supposed to belong to the same socket (NUMA node).
The comment above cpu_sibling_mask definition is still stale i.e. current Xen on
Arm assumes there is no multithread.

BTW. We still have a warning if we find MPIDR MT bit set although this bit does
not really mean the CPU supports SMT. That's bad because on e.g. A78 which is
commonly used these days and that has this bit set, the warning is on. The
warning is right that SMT might impact the security of the system as some things
are shared between threads. This is just a note that we should do something with
that in the future i.e. remove the check that is based on MPIDR and decide what
to do with the warning (e.g. use the cpu topology information instead). No
action for this patch specifically.

With the stale comment removed:
Acked-by: Michal Orzel <michal.orzel@amd.com>

~Michal



  reply	other threads:[~2026-12-01 13:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-30  6:57 [PATCH v13 0/5] xen/acpi,device-tree: Introduce generic CPU topology support for ACPI and DT Hirokazu Takahashi
2026-11-30  6:57 ` [PATCH v13 1/5] xen/device-tree: Parse 'cpu-map' node for CPU topology exploration Hirokazu Takahashi
2026-12-01 11:22   ` Orzel, Michal
2026-12-02  3:55     ` Hirokazu Takahashi
2026-11-30  6:57 ` [PATCH v13 2/5] xen/sched: Link CPU topology to scheduler Hirokazu Takahashi
2026-12-01 13:20   ` Orzel, Michal [this message]
2026-12-02  4:05     ` Hirokazu Takahashi
2026-11-30  6:57 ` [PATCH v13 3/5] xen/sched: Make cpu_nr_siblings() architecture-specific Hirokazu Takahashi
2026-11-30  6:57 ` [PATCH v13 4/5] xen/acpi: Parse PPTT to initialize CPU topology Hirokazu Takahashi
2026-11-30  6:57 ` [PATCH v13 5/5] xen/acpi: Do not pass ACPI PPTT to Dom0 Hirokazu Takahashi
2026-12-01 13:31   ` Orzel, Michal
2026-12-02  4:08     ` Hirokazu Takahashi

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=fd3e03ab-d06d-4e81-b196-e75fcdd21ca5@amd.com \
    --to=michal.orzel@amd.com \
    --cc=Volodymyr_Babchuk@epam.com \
    --cc=alistair.francis@wdc.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=anthony.perard@vates.tech \
    --cc=baptiste.le-duc@vates.tech \
    --cc=bertrand.marquis@arm.com \
    --cc=connojdavis@gmail.com \
    --cc=dfaggioli@suse.com \
    --cc=gwd@xenproject.org \
    --cc=jbeulich@suse.com \
    --cc=jgross@suse.com \
    --cc=julien@xen.org \
    --cc=oleksii.kurochko@gmail.com \
    --cc=roger@xenproject.org \
    --cc=sstabellini@kernel.org \
    --cc=taka@valinux.co.jp \
    --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.