From: Andrew Jones <ajones@ventanamicro.com>
To: JeeHeng Sia <jeeheng.sia@starfivetech.com>
Cc: "qemu-arm@nongnu.org" <qemu-arm@nongnu.org>,
"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
"qemu-riscv@nongnu.org" <qemu-riscv@nongnu.org>,
"mst@redhat.com" <mst@redhat.com>,
"imammedo@redhat.com" <imammedo@redhat.com>,
"anisinha@redhat.com" <anisinha@redhat.com>,
"peter.maydell@linaro.org" <peter.maydell@linaro.org>,
"shannon.zhaosl@gmail.com" <shannon.zhaosl@gmail.com>,
"sunilvl@ventanamicro.com" <sunilvl@ventanamicro.com>,
"palmer@dabbelt.com" <palmer@dabbelt.com>,
"alistair.francis@wdc.com" <alistair.francis@wdc.com>,
"bin.meng@windriver.com" <bin.meng@windriver.com>,
"liwei1518@gmail.com" <liwei1518@gmail.com>,
"dbarboza@ventanamicro.com" <dbarboza@ventanamicro.com>,
"zhiwei_liu@linux.alibaba.com" <zhiwei_liu@linux.alibaba.com>
Subject: Re: RE: [RESEND v2 1/2] hw/arm/virt-acpi-build.c: Migrate SPCR creation to common location
Date: Tue, 30 Jan 2024 13:50:36 +0100 [thread overview]
Message-ID: <20240130-48cfb21fac247f0d535f87c9@orel> (raw)
In-Reply-To: <BJSPR01MB0561D2F722BBC446017856709C7DA@BJSPR01MB0561.CHNPR01.prod.partner.outlook.cn>
On Tue, Jan 30, 2024 at 03:30:13AM +0000, JeeHeng Sia wrote:
...
> > Sharing code is good, but if we have to parametrize the entire table, then
> > we might as well keep Arm and RISCV separate. Building the table first
> > with this struct, just to have it built again with the build_append API,
> > doesn't make much sense to me. Do Arm and riscv really diverge on all
> > these parameters? If not, then just add the parameters which do diverge
> > build_scpr's arguments.
> It is kind of chicken and egg thing, I would suggest let the arch code to
> fill in the value. It doesn't make sense to change again in the future when
> both riscv and arm realized the parameters were different.
> Can arm confirm that these values wouldn't change in the future?
> >
We can't be sure that arm nor riscv will change in the future, but we
(arm/riscv/etc. QEMU developers) control the code for both, so I don't see
a problem with only parametrizing what's necessary today and then
extending that, or completely separating, later if necessary. In any case,
I'd rather see the two completely separate from the start, than to see
the structure with all the parameters get added. There's no difference to
me when reading a list of 's->param_name = value' or a list of
build_append_int(table, value, size) /* param_name */. And, given we need
the later eventually anyway, then there's no reason for the former at all.
Thanks,
drew
next prev parent reply other threads:[~2024-01-30 12:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-29 2:14 [RESEND v2 0/2] RISC-V: ACPI: Enable SPCR Sia Jee Heng
2024-01-29 2:14 ` [RESEND v2 1/2] hw/arm/virt-acpi-build.c: Migrate SPCR creation to common location Sia Jee Heng
2024-01-29 5:12 ` Sunil V L
2024-01-30 3:16 ` JeeHeng Sia
2024-01-30 12:40 ` Andrew Jones
2024-01-29 9:19 ` Andrew Jones
2024-01-30 3:30 ` JeeHeng Sia
2024-01-30 12:50 ` Andrew Jones [this message]
2024-01-29 2:14 ` [RESEND v2 2/2] hw/riscv/virt-acpi-build.c: Generate SPCR table Sia Jee Heng
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=20240130-48cfb21fac247f0d535f87c9@orel \
--to=ajones@ventanamicro.com \
--cc=alistair.francis@wdc.com \
--cc=anisinha@redhat.com \
--cc=bin.meng@windriver.com \
--cc=dbarboza@ventanamicro.com \
--cc=imammedo@redhat.com \
--cc=jeeheng.sia@starfivetech.com \
--cc=liwei1518@gmail.com \
--cc=mst@redhat.com \
--cc=palmer@dabbelt.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-riscv@nongnu.org \
--cc=shannon.zhaosl@gmail.com \
--cc=sunilvl@ventanamicro.com \
--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).