qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alistair Francis <alistair23@gmail.com>
To: Gregor Haas <gregorhaas1997@gmail.com>
Cc: qemu-devel@nongnu.org, qemu-riscv@nongnu.org,
	atishp@rivosinc.com,  dbarboza@ventanamicro.com,
	alistair.francis@wdc.com
Subject: Re: [PATCH v3 0/1] Add support for generating OpenSBI domains in the device tree
Date: Wed, 11 Sep 2024 13:53:37 +1000	[thread overview]
Message-ID: <CAKmqyKPfgUmUnHbYjEViBUoJQn_bZOoHyus17w4Sg9dRykA8ew@mail.gmail.com> (raw)
In-Reply-To: <CAMqWt3oWGLaXBsM7inQkird0+VQcdbaQoZ-uF2Okmg4B2Q8uqg@mail.gmail.com>

On Wed, Sep 11, 2024 at 7:08 AM Gregor Haas <gregorhaas1997@gmail.com> wrote:
>
> Hi Alistair!
>
> On Sun, Sep 8, 2024 at 8:27 PM Alistair Francis <alistair23@gmail.com> wrote:
>>
>> On Tue, Aug 6, 2024 at 7:05 AM Gregor Haas <gregorhaas1997@gmail.com> wrote:
>> >
>> > This patch series adds support for specifying OpenSBI domains on the QEMU
>> > command line. A simple example of what this looks like is below, including
>> > mapping the board's UART into the secondary domain:
>>
>> Thanks for the patch, sorry it took me so long to look into this
>
>
> No worries -- thanks for your review!
>
>>
>>
>> >
>> > qemu-system-riscv64 -machine virt -bios fw_jump.bin -cpu max -smp 2 -m 4G -nographic \
>> >         -device opensbi-memregion,id=mem,base=0xBC000000,order=26,mmio=false \
>> >         -device opensbi-memregion,id=uart,base=0x10000000,order=12,mmio=true,device0="/soc/serial@10000000" \
>> >         -device opensbi-domain,id=domain,possible-harts=0-1,boot-hart=0x0,next-addr=0xBC000000,next-mode=1,region0=mem,perms0=0x3f,region1=uart,perms1=0x3f
>>
>> This will need documentation added under docs (probably under
>> docs/system/riscv) of how this should be used.
>
>
> I've just sent a v4 patch series which includes documentation! Please let
> me know what you think.
>
>>
>> I'm not convinced this is something we want though. A user can dump
>> the QEMU DTB and edit it to support OpenSBI domains if they want.
>>
>> My worry is that the command line method is complex for users to get
>> right and will be fragile and prone to breakage as parts of QEMU's DTB
>> changes.
>
>
> I've found this patch series really useful for programmatically generating test
> fixtures in an isolation system I'm working on, which is built on top of OpenSBI
> domains. In that sense, I've found generating the correct flags is easier rather
> than manually editing or generating several dozen device tree files for each
> test configuration.

That's fair

>
> I take your point that these flags are hard to get right, and there may be more
> user-friendly ways to do this. FWIW, I that this will only rarely break if QEMU's
> DTB changes -- the only part that really depends on QEMU's DTB (rather than
> just adding new information to it) is the device-linking part for memregions, and
> it gives a loud, direct error if it cannot find the user-specified device.

Maybe some unit tests would help here as well, to make sure we catch
the error when the change happens.

Alistair


  reply	other threads:[~2024-09-11  3:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-05 21:04 [PATCH v3 0/1] Add support for generating OpenSBI domains in the device tree Gregor Haas
2024-08-05 21:04 ` [PATCH v3 1/1] " Gregor Haas
2024-08-22 20:29   ` Daniel Henrique Barboza
2024-08-22 21:48 ` [PATCH v3 0/1] " Daniel Henrique Barboza
2024-08-22 22:04   ` Gregor Haas
2024-09-09  3:27 ` Alistair Francis
2024-09-10 21:08   ` Gregor Haas
2024-09-11  3:53     ` Alistair Francis [this message]
2024-09-17 12:45   ` Andrew Jones
2024-09-19 21:16     ` Gregor Haas

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=CAKmqyKPfgUmUnHbYjEViBUoJQn_bZOoHyus17w4Sg9dRykA8ew@mail.gmail.com \
    --to=alistair23@gmail.com \
    --cc=alistair.francis@wdc.com \
    --cc=atishp@rivosinc.com \
    --cc=dbarboza@ventanamicro.com \
    --cc=gregorhaas1997@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-riscv@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).