From: Andrew Jones <ajones@ventanamicro.com>
To: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Cc: Palmer Dabbelt <palmer@dabbelt.com>,
Alistair Francis <alistair.francis@wdc.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Bin Meng <bin.meng@windriver.com>,
Weiwei Li <liwei1518@gmail.com>,
Daniel Henrique Barboza <dbarboza@ventanamicro.com>,
Liu Zhiwei <zhiwei_liu@linux.alibaba.com>,
"Michael S . Tsirkin" <mst@redhat.com>,
Igor Mammedov <imammedo@redhat.com>,
Ani Sinha <anisinha@redhat.com>,
qemu-riscv@nongnu.org, qemu-devel@nongnu.org
Subject: Re: Re: [PATCH v2 3/4] target/riscv: SMBIOS support for RISC-V virt machine
Date: Mon, 22 Jan 2024 13:59:22 +0100 [thread overview]
Message-ID: <20240122-195c4a8d0ece609441068e16@orel> (raw)
In-Reply-To: <22105210-d8d1-4808-b9ed-41eee71c53ca@canonical.com>
On Mon, Jan 22, 2024 at 01:28:18PM +0100, Heinrich Schuchardt wrote:
> On 22.01.24 10:57, Andrew Jones wrote:
> > On Fri, Dec 29, 2023 at 01:07:23PM +0100, Heinrich Schuchardt wrote:
...
> > > +#if defined(TARGET_RISCV32)
> > > + smbios_set_default_processor_family(0x200);
> > > +#elif defined(TARGET_RISCV64)
> > > + smbios_set_default_processor_family(0x201);
> > > +#endif
> >
> > I think we should use misa_mxl_max to determine the family, rather than
> > TARGET_*, because, iirc, we're slowly working our ways towards allowing
> > rv32 cpus to be instantiated with qemu-system-riscv64.
>
> Hello Andrew,
>
> thank you for reviewing. I guess you mean something like:
>
> if (riscv_is_32bit(&s->soc[0])) {
> smbios_set_default_processor_family(0x200);
> #if defined(TARGET_RISCV64)
> } else {
> smbios_set_default_processor_family(0x201);
> #endif
> }
Yes, but I'm not sure we need the #ifdef around the 64-bit part.
>
> riscv_is_32bit returns harts->harts[0].env.misa_mxl_max == MXL_RV32.
>
> Some real hardware has a 32bit hart and multiple 64bit harts. Will QEMU
> support mixing harts with different bitness on the virt machine in future?
> In that case we would have to revisit the code using misa_mxl_max in
> multiple places.
>
Never say never, but I don't think there has been much effort to support
these types of configurations with a single QEMU binary. My googling is
failing me right now, but I seem to recall that there may have been
efforts to implement Arm big.LITTLE with multiprocess QEMU [1]. IOW, I
think we're safe to use misa_mxl_max, since we'll have one for each QEMU
instance and we'll use a different QEMU instance for each hart bitness.
[1] docs/system/multi-process.rst
Thanks,
drew
next prev parent reply other threads:[~2024-01-22 13:00 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-29 12:07 [PATCH v2 0/4] target/riscv: SMBIOS support for RISC-V virt machine Heinrich Schuchardt
2023-12-29 12:07 ` [PATCH v2 1/4] smbios: add processor-family option Heinrich Schuchardt
2024-01-05 5:24 ` Alistair Francis
2024-01-05 5:44 ` Heinrich Schuchardt
2024-01-22 4:53 ` Alistair Francis
2024-01-22 4:52 ` Alistair Francis
2024-01-22 9:59 ` Andrew Jones
2023-12-29 12:07 ` [PATCH v2 2/4] smbios: function to set default processor family Heinrich Schuchardt
2024-01-22 10:00 ` Andrew Jones
2023-12-29 12:07 ` [PATCH v2 3/4] target/riscv: SMBIOS support for RISC-V virt machine Heinrich Schuchardt
2024-01-03 20:40 ` Daniel Henrique Barboza
2024-01-22 9:57 ` Andrew Jones
2024-01-22 12:28 ` Heinrich Schuchardt
2024-01-22 12:59 ` Andrew Jones [this message]
2024-01-22 13:22 ` Heinrich Schuchardt
2024-01-25 3:16 ` Alistair Francis
2023-12-29 12:07 ` [PATCH v2 4/4] qemu-options: enable -smbios option on RISC-V Heinrich Schuchardt
2024-01-03 20:40 ` Daniel Henrique Barboza
2024-01-05 5:26 ` Alistair Francis
2024-01-22 10:00 ` Andrew Jones
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=20240122-195c4a8d0ece609441068e16@orel \
--to=ajones@ventanamicro.com \
--cc=alistair.francis@wdc.com \
--cc=anisinha@redhat.com \
--cc=bin.meng@windriver.com \
--cc=dbarboza@ventanamicro.com \
--cc=heinrich.schuchardt@canonical.com \
--cc=imammedo@redhat.com \
--cc=liwei1518@gmail.com \
--cc=mst@redhat.com \
--cc=palmer@dabbelt.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-riscv@nongnu.org \
--cc=zhiwei_liu@linux.alibaba.com \
/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).