qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Sunil V L <sunilvl@ventanamicro.com>
To: Andrea Bolognani <abologna@redhat.com>
Cc: Anup Patel <apatel@ventanamicro.com>,
	qemu-riscv@nongnu.org, qemu-devel@nongnu.org,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Alistair Francis <alistair.francis@wdc.com>,
	Bin Meng <bin.meng@windriver.com>,
	Weiwei Li <liweiwei@iscas.ac.cn>,
	Daniel Henrique Barboza <dbarboza@ventanamicro.com>,
	Liu Zhiwei <zhiwei_liu@linux.alibaba.com>
Subject: Re: [PATCH v5 0/3] hw/riscv/virt: pflash improvements
Date: Wed, 31 May 2023 19:18:53 +0530	[thread overview]
Message-ID: <ZHdQRVidTzxrb6vn@sunil-laptop> (raw)
In-Reply-To: <CABJz62M_98hwGSHc2iJ7T+7AT+rQUa4xwc8s1WHo=TTbfCmbGA@mail.gmail.com>

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	other threads:[~2023-05-31 13:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-26 12:10 [PATCH v5 0/3] hw/riscv/virt: pflash improvements Sunil V L
2023-05-26 12:10 ` [PATCH v5 1/3] hw/riscv: virt: Assume M-mode FW in pflash0 only when "-bios none" Sunil V L
2023-05-26 12:10 ` [PATCH v5 2/3] riscv/virt: Support using pflash via -blockdev option Sunil V L
2023-05-26 14:04   ` Philippe Mathieu-Daudé
2023-05-26 12:10 ` [PATCH v5 3/3] docs/system: riscv: Add pflash usage details Sunil V L
2023-05-26 14:04   ` Philippe Mathieu-Daudé
2023-05-26 12:47 ` [PATCH v5 0/3] hw/riscv/virt: pflash improvements Andrea Bolognani
2023-05-31  5:16 ` Anup Patel
2023-05-31 11:34   ` Andrea Bolognani
2023-05-31 13:48     ` Sunil V L [this message]

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=ZHdQRVidTzxrb6vn@sunil-laptop \
    --to=sunilvl@ventanamicro.com \
    --cc=abologna@redhat.com \
    --cc=alistair.francis@wdc.com \
    --cc=apatel@ventanamicro.com \
    --cc=bin.meng@windriver.com \
    --cc=dbarboza@ventanamicro.com \
    --cc=liweiwei@iscas.ac.cn \
    --cc=palmer@dabbelt.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-riscv@nongnu.org \
    --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).