qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Ralf Ramsauer <ralf.ramsauer@oth-regensburg.de>
Cc: apatel@ventanamicro.com, Peter Maydell <peter.maydell@linaro.org>,
	anup@brainfault.org, qemu-devel@nongnu.org,
	Palmer Dabbelt <palmer@dabbelt.com>,
	stefan.huber@oth-regensburg.de, alistair23@gmail.com,
	jiangyifei@huawei.com
Subject: Re: [PATCH] hw/riscv: virt: Warn the user if -bios is provided when using KVM
Date: Thu, 24 Mar 2022 09:08:18 +0000	[thread overview]
Message-ID: <Yjw1At8ig+UzFKXn@redhat.com> (raw)
In-Reply-To: <20220323171346.792572-1-ralf.ramsauer@oth-regensburg.de>

On Wed, Mar 23, 2022 at 06:13:46PM +0100, Ralf Ramsauer wrote:
> The -bios option is silently ignored if used in combination with -enable-kvm.
> The reason is that the machine starts in S-Mode, and the bios typically runs in
> M-Mode.
> 
> Warn the user that the bios won't be loaded.
> 
> Signed-off-by: Ralf Ramsauer <ralf.ramsauer@oth-regensburg.de>
> ---
>  hw/riscv/virt.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c
> index 4496a15346..a4d13114ee 100644
> --- a/hw/riscv/virt.c
> +++ b/hw/riscv/virt.c
> @@ -1312,6 +1312,9 @@ static void virt_machine_init(MachineState *machine)
>       * when KVM is enabled.
>       */
>      if (kvm_enabled()) {
> +        if (machine->firmware && strcmp(machine->firmware, "none"))
> +            warn_report("BIOS is not supported in combination with KVM. "
> +                        "Ignoring BIOS.");

If the usage scenario isn't supportable, then ultimately we should be
raising an error and immediately exiting.

If you know of common usage that is already mistakenly passing -bios,
then we could start with a warning and list it as deprecated, then
change to an error_report 2 releases later. If we don't thing people
are often mistakenly passing -bios, then go straight for error_report
and exit.

>          g_free(machine->firmware);
>          machine->firmware = g_strdup("none");
>      }
> -- 
> 2.32.0
> 
> 

With regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|



  parent reply	other threads:[~2022-03-24  9:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-23 17:13 [PATCH] hw/riscv: virt: Warn the user if -bios is provided when using KVM Ralf Ramsauer
2022-03-23 21:05 ` Alistair Francis
2022-03-23 22:31   ` [EXT] " Ralf Ramsauer
2022-03-23 22:31 ` [PATCH v2] " Ralf Ramsauer
2022-03-24  2:46   ` Alistair Francis
2022-03-24  9:08 ` Daniel P. Berrangé [this message]
2022-03-31  0:11   ` [PATCH] " Alistair Francis
2022-03-31 22:07     ` [EXT] " Ralf Ramsauer

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=Yjw1At8ig+UzFKXn@redhat.com \
    --to=berrange@redhat.com \
    --cc=alistair23@gmail.com \
    --cc=anup@brainfault.org \
    --cc=apatel@ventanamicro.com \
    --cc=jiangyifei@huawei.com \
    --cc=palmer@dabbelt.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=ralf.ramsauer@oth-regensburg.de \
    --cc=stefan.huber@oth-regensburg.de \
    /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).