qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
Cc: Dorjoy Chowdhury <dorjoychy111@gmail.com>, qemu-devel@nongnu.org
Subject: Re: [PATCH] target/arm: fix MPIDR value for ARM CPUs with SMT
Date: Thu, 2 May 2024 14:57:38 +0100	[thread overview]
Message-ID: <CAFEAcA8ynOJtPazJ9D0M0nrbDAp+gHJzGjLSHVC7PunG42WxRA@mail.gmail.com> (raw)
In-Reply-To: <88e97ffd-f308-49db-aba6-ea3b9c308d21@linaro.org>

On Thu, 2 May 2024 at 14:50, Marcin Juszkiewicz
<marcin.juszkiewicz@linaro.org> wrote:
> Both hw/arm/sbsa-ref.c and hw/arm/virt.c build cpu information in
> DeviceTree using "arm_build_mp_afinnity()" function. So if firmware
> parses it then it gets wrong values.

What wrong values? The values in the dtb should match the
Aff* fields, they are not the complete MPIDR_EL1 values
including U and MT bits and so on:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/arm/cpus.yaml#n42
AIUI the ACPI spec says the same.

> Firmware should probably read MPIDR_EL1 directly instead but what with
> those who read DT and rely on this value already?

Firmware should probably not read MPIDR_EL1 directly for
topology information, because it's too vague and
unreliable. Either it's real-hardware firmware, in which
case it presumably knows the topology already, or else
it's running on QEMU, in which case this is one of the
things we can feed it via the DTB (either on virt or
or sbsa-ref).

thanks
-- PMM


  reply	other threads:[~2024-05-02 13:58 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-19 18:31 [PATCH] target/arm: fix MPIDR value for ARM CPUs with SMT Dorjoy Chowdhury
2024-04-21  5:40 ` Richard Henderson
2024-04-21  8:40   ` Dorjoy Chowdhury
2024-04-22 10:46   ` Peter Maydell
2024-04-22 11:26     ` Peter Maydell
2024-04-22 15:21       ` Richard Henderson
2024-04-22 15:24         ` Richard Henderson
2024-05-01 18:08         ` Marcin Juszkiewicz
2024-05-02  9:11           ` Peter Maydell
2024-05-02 10:37             ` Peter Maydell
2024-05-02 10:56               ` Marcin Juszkiewicz
2024-05-02 11:40                 ` Peter Maydell
2024-04-25 16:46       ` Dorjoy Chowdhury
2024-05-02 12:14 ` Marcin Juszkiewicz
2024-05-02 13:04   ` Dorjoy Chowdhury
2024-05-02 13:11     ` Marcin Juszkiewicz
2024-05-02 13:13       ` Peter Maydell
2024-05-02 13:50         ` Marcin Juszkiewicz
2024-05-02 13:57           ` Peter Maydell [this message]
2024-05-03 16:28 ` Peter Maydell
2024-05-03 16:52   ` Dorjoy Chowdhury
2024-05-31 12:52     ` Peter Maydell
2024-05-31 13:46       ` Dorjoy Chowdhury
2024-05-03 18:14   ` Dorjoy Chowdhury
2024-05-04 13:31     ` Peter Maydell
2024-05-04 14:20       ` Dorjoy Chowdhury

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=CAFEAcA8ynOJtPazJ9D0M0nrbDAp+gHJzGjLSHVC7PunG42WxRA@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=dorjoychy111@gmail.com \
    --cc=marcin.juszkiewicz@linaro.org \
    --cc=qemu-devel@nongnu.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).