[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Compatibility between -device sga and -machine graphics=off
From: |
Gerd Hoffmann |
Subject: |
Re: Compatibility between -device sga and -machine graphics=off |
Date: |
Wed, 8 Sep 2021 22:50:53 +0200 |
On Wed, Sep 08, 2021 at 05:08:08PM +0100, Daniel P. Berrangé wrote:
> Given the libvirt XML snippet
>
> <os>
> ...
> <bios useserial="yes"/>
> ...
> </os>
>
> libvirt QEMU driver will always format
>
> -device sga
>
> Libguestfs uses this syntax, so we need to make sure it still works
> in future even if 'sga' is disabled or removed in a QEMU build in
> favour of SeaBIOS' built-in support.
Just replacing '-device sga' with '-machine graphics=off' in case sga is
not available should work fine.
serial console support in seabios is available for quite a while
(merged in 2017, seabios 1.11 in rhel-7 has it), so switching over
unconditionally is possibly an option too. Not sure what the libvirt
backward compatibility policy is though.
> 1. Graphical display only, no serial port, BIOS to graphical display
> 2. Serial port only, no graphics, BIOS to nowhere
> 3. Serial port only, no graphics, BIOS to serial
> 4. Graphical display, serial port, BIOS only to graphical display
> 5. Graphical display, serial port, BIOS to graphical display + serial
Should all work fine.
> If I do 'info mtree' though, I do see a different memory layout
> when changing from SGA to graphics=off
> - 00000000000cb000-00000000000cdfff (prio 1000, ram): alias kvmvapic-rom
> @pc.ram 00000000000cb000-00000000000cdfff
> + 00000000000ca000-00000000000ccfff (prio 1000, ram): alias kvmvapic-rom
> @pc.ram 00000000000ca000-00000000000ccfff
probably sgabios.bin is loaded to ca000 when enabled.
> On non-x86 emulators I see graphics=off has semantic effects beyond
> just controlling whether the firmware prints to the serial or not
> though.
It's been a while, but yes, IIRC on ppc this is passed to the linux
kernel somehow (device tree?) so it also affects the default console
device used by linux.
But sgabios is x86-only anyway so that should not be a problem here.
HTH & take care,
Gerd