qemu-devel
[Top][All Lists]
Advanced

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

Re: Compatibility between -device sga and -machine graphics=off


From: Daniel P . Berrangé
Subject: Re: Compatibility between -device sga and -machine graphics=off
Date: Wed, 8 Sep 2021 23:10:27 +0100
User-agent: Mutt/2.0.7 (2021-05-04)

On Wed, Sep 08, 2021 at 10:50:53PM +0200, Gerd Hoffmann wrote:
> 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.

libvirt currently targets QEMU 2.11.0 and newer.

Fortunately it appears that QEMU 2.11.0 included SeaBIOS 1.11.0,
so we can thus eliminate usage of 'sga' from libvirt entirely,
provided I can convince myself migration is safe, which looks
probable.

> > 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.

libvirt has never validated the arch when enabling sga, but clearly
it can't ever have been usable on non-x86. So I'll probably restrict
the usage of graphics=off to only those arches where I can validate
it something useful for the firmware output. 


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 :|




reply via email to

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