qemu-riscv
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-riscv] RISC-V: qemu should provide different "model" strings i


From: Palmer Dabbelt
Subject: Re: [Qemu-riscv] RISC-V: qemu should provide different "model" strings in DT for RV64 and RV32
Date: Tue, 07 May 2019 09:17:05 -0700 (PDT)

On Mon, 06 May 2019 12:52:32 PDT (-0700), Alistair Francis wrote:
On Mon, 2019-05-06 at 20:53 +0200, Karsten Merker wrote:
On Mon, May 06, 2019 at 02:33:29PM +0000, Alistair Francis wrote:
> On Sun, 2019-05-05 at 23:03 +0200, Karsten Merker wrote:
> > Hello,
> > > > while working on RISC-V support for the Debian flash-kernel packa > > > > I have stumbled over a potential problem with the "model" string
> > that qemu sets in the DT that it generates for the "virt"
> > machine,
> > namely "riscv-virtio,qemu".
> > > > Some tools, among them flash-kernel, use the "model" string to
> > determine on which specific type of hardware they are running and
> > perform corresponding hardware-specific actions.  It looks like
> > qemu uses the same model string for both RV64 and RV32, which
> > makes it impossible to differentiate between the two. I would
> > therefore like to propose to make the model-string
> > XLEN-dependent, i.e. "riscv64-virtio,qemu" respectively
> > "riscv32-virtio,qemu".
> > This sounds fine to me. > > Is there anything that already relies on the
> "riscv-virtio,qemu" compat string?

At least nothing that I am aware of.

> Maybe we can keep that and add a 32/64 bit one so we don't
> break anything that is already working.

AFAICS this isn't possible as according to the device-tree
specification the "model" property in DT can only have a single
value:

  Property name: model
  Value type: <string>

To allow for multiple values that would have to be

  Value type: <stringlist>

Ah, no worries. I think it's worth sending the patch. The 4.1
development cycle has just opened so now seems like a good time to send
it. We can then test to make sure nothing is broken before the next
release.

I'd be OK with the change from "riscv-virtio,qemu" to "riscv64-virtio,qemu".
It's nominally an interface change, but I doubt anyone would be using it.  It's
probably best to check on sw-dev just to be sure.

--
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. If you are not the intended recipient of this message please do not read, copy, use or disclose this communication and notify the sender immediately. It should be noted that any review, retransmission, dissemination or other use of, or taking action or reliance upon, this information by persons or entities other than the intended recipient is prohibited.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]