qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>,
	"Daniel P. Berrange" <berrange@redhat.com>
Cc: seabios@seabios.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2 0/3] seabios: add serial console support
Date: Tue, 5 Jul 2016 13:15:37 +0200	[thread overview]
Message-ID: <4e56459c-c79a-96e8-3cc1-d44ff9a3a5d5@redhat.com> (raw)
In-Reply-To: <1467712848.12358.21.camel@redhat.com>



On 05/07/2016 12:00, Gerd Hoffmann wrote:
> One option would be to continue using sgabios.bin in fw_cfg.  But
> instead of loading and executing it activate the build-in serial console
> if we find the file.  That would make the switch completely transparent
> to upper layers.  But it is quite hackish of course ...

OpenBIOS uses FW_CFG_NOGRAPHIC for this, which is the negation of
qdev_get_machine()->enable_graphics and set by both "-nographic" and
"-machine graphics=no" ("-nographic" is a shortcut for "-display none
-machine graphics=no").  The default is "-machine graphics=yes".

As long as QEMU doesn't enable both FW_CFG_NOGRAPHIC and sgabios.bin, it
should be fine.  For example, if SeaBIOS's serial console is made
accessible with "-machine graphics=no", then:

* QEMU's "-device sga" should do nothing if machine->enable_graphics is set.

* For old machine types, QEMU should hardcode FW_CFG_NOGRAPHIC to
false(*) so that sgabios is never blocked.

For new machine types, SGABIOS will still be accessible with "-device
sga".  New machine types depend on SeaBIOS that has a serial console,
otherwise "-nographic -device sga" breaks.

Paolo

   (*) Hardcoding FW_CFG_NOGRAPHIC to false doesn't match what old QEMU
       does, but provides the best backwards-compatibility:

       - old->new: Because old QEMU provides sgabios, you have to
                   include sgabios.bin in the destination too or
                   migration fails.  After migration, the BIOS comes
                   from old QEMU and itnever looks at FW_CFG_NOGRAPHIC,
                   so the value doesn't matter---we just make it false.

       - new->old: Because old QEMU expects sgabios to be there, you
                   have to include sgabios.bin.  The BIOS comes from
                   new QEMU and looks at FW_CFG_NOGRAPHIC.  To avoid
                   double hooking FW_CFG_NOGRAPHIC has to be false.

      parent reply	other threads:[~2016-07-05 11:15 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-04 20:39 [Qemu-devel] [PATCH v2 0/3] seabios: add serial console support Gerd Hoffmann
2016-07-04 20:39 ` [Qemu-devel] [PATCH 1/3] std: add cp437 to unicode map Gerd Hoffmann
2016-07-05 13:49   ` [Qemu-devel] [SeaBIOS] " Kevin O'Connor
2016-07-04 20:39 ` [Qemu-devel] [PATCH 2/3] kbd: make enqueue_key public, add ascii_to_keycode Gerd Hoffmann
2016-07-04 20:39 ` [Qemu-devel] [PATCH 3/3] add serial console support Gerd Hoffmann
2016-07-05 14:30   ` [Qemu-devel] [SeaBIOS] " Kevin O'Connor
2016-07-05 15:07     ` Gerd Hoffmann
2016-07-05 15:23       ` Kevin O'Connor
2016-07-05  8:06 ` [Qemu-devel] [PATCH v2 0/3] seabios: " Daniel P. Berrange
2016-07-05 10:00   ` Gerd Hoffmann
2016-07-05 10:07     ` Daniel P. Berrange
2016-07-05 11:45       ` Paolo Bonzini
2016-07-05 11:59         ` Daniel P. Berrange
2016-07-05 11:15     ` Paolo Bonzini [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=4e56459c-c79a-96e8-3cc1-d44ff9a3a5d5@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=berrange@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=seabios@seabios.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).