qemu-devel
[Top][All Lists]
Advanced

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

Re: [EXT] Re: QEMU+KVM on RISC-V + Hypervisor Extension


From: Ralf Ramsauer
Subject: Re: [EXT] Re: QEMU+KVM on RISC-V + Hypervisor Extension
Date: Wed, 23 Mar 2022 18:05:08 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0



On 21/03/2022 21:47, Palmer Dabbelt wrote:
On Sun, 20 Mar 2022 22:43:07 PDT (-0700), alistair23@gmail.com wrote:
On Thu, Mar 17, 2022 at 7:46 PM Peter Maydell <peter.maydell@linaro.org> wrote:

On Wed, 16 Mar 2022 at 22:23, Alistair Francis <alistair23@gmail.com> wrote:
> Hmm... This seems like a bug. We shouldn't allow the user to specify a
> `-bios` option if using KVM. Would you mind preparing a patch to catch
> this?

You don't want to allow the possibility of a bios blob that expects
to run in S-mode, the way arm virt can run an EL1 UEFI BIOS ?

Interesting. We could still allow that by using -device loader though.

If we load something in S mode it really is a kernel and not firmware,
so I think the -bios argument is a little misleading. We could make
-bios and -enable-kvm a warning instead, to discourage users from
providing OpenSBI, but still allow them to pass something.

We could handle this in OpenSBI: have it just detect that it's been launched in S-mode and just jump to the payload.

To me not allowing it seems reasonable, and we can always re-allow it
in the future if there is a good use case.

That also seems fine to me.  There'd be a lot of work involved in doing anything useful with S-mode firmware, given that things aren't really designed to work that way.  Certainly a lot more work than re-enabling this sort of flag, and while it might be a bit of a headache coupling that to a QEMU source-level change my guess is that there'd need to be a bunch of work done on new HW interfaces to make this useful so there'd be QEMU changes to emulate those either way.

Having at least a warning seems prudent, as most users are going to end up with a hang here and a silent hang is a headache for everyone.

Okay, my analysis was wrong, -bios is in fact already ignored when being used in combination with -enable-kvm on the virt machine model. See:

https://git.qemu.org/?p=qemu.git;a=blob;f=hw/riscv/virt.c;h=da50cbed43ec54777992d40dbf158ec63fccef03;hb=HEAD#l1314

However, the bios will be silently ignored and dropped, which led me to the mistake. I'll provide a patch that gives a warning to the user.

  Ralf


Alistair


thanks
-- PMM



reply via email to

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