qemu-riscv
[Top][All Lists]
Advanced

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

Re: [PATCH v5 0/3] hw/riscv/virt: pflash improvements


From: Sunil V L
Subject: Re: [PATCH v5 0/3] hw/riscv/virt: pflash improvements
Date: Wed, 31 May 2023 19:18:53 +0530

On Wed, May 31, 2023 at 04:34:58AM -0700, Andrea Bolognani wrote:
> On Wed, May 31, 2023 at 10:46:17AM +0530, Anup Patel wrote:
> > On Fri, May 26, 2023 at 5:41 PM Sunil V L <sunilvl@ventanamicro.com> wrote:
> > >   hw/riscv: virt: Assume M-mode FW in pflash0 only when "-bios none"
> > >   riscv/virt: Support using pflash via -blockdev option
> > >   docs/system: riscv: Add pflash usage details
> >
> > In case of KVM guests, there is no M-mode so pflash0 will always
> > contain S-mode FW.
> >
> > I suggest improving this series to consider KVM guests as well
> > such that the same EDK2 S-mode works for KVM and TCG guests.
> 
> After these patches are applied, pflash0 is assumed to contain S-mode
> code *unless* you go out of your way and add -bios none to the
> command line.
> 
> It seems to me that this default behavior will work fine for KVM
> guests too, based on what you wrote above. Isn't that the case?
> 
Hi Andrea,

Actually, KVM boot is supported if the user passes -bios none. Even if
the user doesn't pass -bios at all, the code will itself add none. So,
in either case, it satisfies the condition for ROM/M-mode firmware code
and pflash0 will be assumed to have M-mode firmware code. To resolve
this, I need to add !kvm_enabled() check also while checking for
pflash0. I have made the changes and tested with KVM and KVM guest also
boots with EDK2 now!.

Let me send the next revision with this update. Thanks Anup for pointing
this use case also.

Thanks,
Sunil



reply via email to

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