qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Jones <ajones@ventanamicro.com>
To: Daniel Henrique Barboza <dbarboza@ventanamicro.com>
Cc: qemu-devel@nongnu.org, qemu-riscv@nongnu.org,
	alistair.francis@wdc.com,  liwei1518@gmail.com,
	zhiwei_liu@linux.alibaba.com, palmer@dabbelt.com,
	 Fei Wu <wu.fei9@sanechips.com.cn>
Subject: Re: [PATCH v4 3/5] hw/riscv: experimental server platform reference machine
Date: Tue, 18 Nov 2025 14:50:26 -0600	[thread overview]
Message-ID: <20251118-93789449fcd7e0189113a949@orel> (raw)
In-Reply-To: <265ca0e7-b331-4158-8e11-8f31921cfcc0@ventanamicro.com>

On Tue, Nov 18, 2025 at 05:15:54PM -0300, Daniel Henrique Barboza wrote:
> 
> 
> On 11/11/25 8:36 PM, Andrew Jones wrote:
> > On Tue, Nov 11, 2025 at 03:29:42PM -0300, Daniel Henrique Barboza wrote:
> > > From: Fei Wu <wu.fei9@sanechips.com.cn>
> > ...
> > > +static char *rvsp_ref_get_aia_guests(Object *obj, Error **errp)
> > > +{
> > > +    RVSPMachineState *s = RVSP_REF_MACHINE(obj);
> > > +    char val[32];
> > > +
> > > +    sprintf(val, "%d", s->aia_guests);
> > > +    return g_strdup(val);
> > > +}
> > > +
> > > +static void rvsp_ref_set_aia_guests(Object *obj, const char *val, Error **errp)
> > > +{
> > > +    RVSPMachineState *s = RVSP_REF_MACHINE(obj);
> > > +
> > > +    s->aia_guests = atoi(val);
> > > +    if (s->aia_guests < 0 || s->aia_guests > RVSP_IRQCHIP_MAX_GUESTS) {
> > 
> > The minimum is 5 for the server platform, so we should enforce that. Also
> > I suggest we bump RVSP_IRQCHIP_MAX_GUESTS since it's only 7 right now.
> > 
> > > +        error_setg(errp, "Invalid number of AIA IMSIC guests");
> > > +        error_append_hint(errp, "Valid values be between 0 and %d.\n",
> > > +                          RVSP_IRQCHIP_MAX_GUESTS);
> > > +    }
> > > +}
> > > +
> > > +static void rvsp_ref_machine_class_init(ObjectClass *oc, const void *data)
> > > +{
> > > +    char str[128];
> > > +    MachineClass *mc = MACHINE_CLASS(oc);
> > > +    static const char * const valid_cpu_types[] = {
> > > +        TYPE_RISCV_CPU_RVSP_REF,
> > > +    };
> > > +
> > > +    mc->desc = "RISC-V Server SoC Reference board (EXPERIMENTAL)";
> > 
> > We could (and probably should) version this machine type from the get go.
> > If we do that, then we could simply give it a version 0.9, which would
> > match the current spec. When the spec is ratified and this model is
> > complete, then it can be bumped to 1.0. Going that route would allow us
> > to avoid the EXPERIMENTAL "flag".
> 
> There has been some discussions offline on this and I'll bring them here.
> 
> A minor point: it was suggested to rename the board to 'rvserver' instead
> of 'rvsp-ref'. I like this idea mostly because I keep misspelling rvsp-ref
> as rsvp-ref.

I do like the '-ref' suffix though.

> 
> As for the "version this machine type": in this case is different with what we do
> with other QEMU machines. They have a new version for every QEMU release, e.g.
> ARM's newest virt board is virt-10.2, in the next QEMU release it will be virt-11.0
> and so on. We wouldn't do the same thing here - 'versioning' in this case is name
> the board in a way that makes reference to the spec it implements. So this current
> emulation would be named 'rvsp-ref-0.9', with an alias 'rvsp-ref' pointing to it.
> 
> Changing the emulation to comply with spec version 1.0 will create a rvsp-ref-1.0
> board while keeping rvsp-ref-0.9 as is. Usually QEMU does that by using compat flags
> that changes the behavior of the board, and we'll probably go this route.

Yes, as long as we point out what the version numbers mean somewhere, e.g.
in the machine description, then I guess people will get it.

I'm not sure I want a 0.9 board to live on after a ratified 1.0 is
released, though. So maybe an 'experimental'  board makes more sense
if we need to call it that in order to reserve the right to delete it.

> 
> One thing worth considering is that we can't just version stamp the board, we need to
> do the same with the CPU. So we would have a rvsp-ref-cpu-0.9, rvsp-ref-cpu-1.0 and
> an alias to point to the newest available emulation.

ack

> 
> Also note that we're not 0.9 compliant either since we're missing sdext. So unless
> we're willing to name this current board as rvsp-ref-0.9-beta or something like that,
> maybe it's a good idea to postpone this work until we have 'sdext' implemented.

Yes, let's prioritize sdext so we can match the current spec (which is
unlikely to change much before ratification) before we merge the reference
board at all.

Thanks,
drew


  reply	other threads:[~2025-11-18 20:51 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-11 18:29 [PATCH v4 0/5] hw/riscv: Experimental Server Platform Reference Board Daniel Henrique Barboza
2025-11-11 18:29 ` [PATCH v4 1/5] target/riscv/cpu.c: remove 'bare' condition for .profile Daniel Henrique Barboza
2025-11-11 18:29 ` [PATCH v4 2/5] target/riscv: Add server platform reference cpu Daniel Henrique Barboza
2025-11-11 23:05   ` Andrew Jones
2025-11-17 17:57     ` Daniel Henrique Barboza
2025-11-11 18:29 ` [PATCH v4 3/5] hw/riscv: experimental server platform reference machine Daniel Henrique Barboza
2025-11-11 23:36   ` Andrew Jones
2025-11-18 20:15     ` Daniel Henrique Barboza
2025-11-18 20:50       ` Andrew Jones [this message]
2025-11-12  7:13   ` Philippe Mathieu-Daudé
2025-11-11 18:29 ` [PATCH v4 4/5] hw/riscv/server_platform_ref.c: add riscv-iommu-sys Daniel Henrique Barboza
2025-11-12  7:13   ` Philippe Mathieu-Daudé
2025-11-11 18:29 ` [PATCH v4 5/5] docs: add rvsp-ref.rst Daniel Henrique Barboza
2025-11-11 23:39   ` 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=20251118-93789449fcd7e0189113a949@orel \
    --to=ajones@ventanamicro.com \
    --cc=alistair.francis@wdc.com \
    --cc=dbarboza@ventanamicro.com \
    --cc=liwei1518@gmail.com \
    --cc=palmer@dabbelt.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-riscv@nongnu.org \
    --cc=wu.fei9@sanechips.com.cn \
    --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).