On Fri, Nov 14, 2025 at 02:05:18PM +0000, Leigh Brown wrote:
> Hi Daniel,
> On 2025-11-14 12:48, Daniel P. Berrangé wrote:
> > On Fri, Nov 14, 2025 at 08:58:11AM +0000, Leigh Brown wrote:
> [...]
> 
> > > --- libvirt-11.3.0.orig/src/qemu/qemu_validate.c
> > > +++ libvirt-11.3.0/src/qemu/qemu_validate.c
> > > @@ -1304,15 +1304,7 @@ qemuValidateDomainDef(const virDomainDef
> > >          /* On x86 -machine graphics=off toggles the use of the
> > >           * serial console in SeaBIOS (and theoretically other
> > >           * firmwares).
> > > -         * On non-x86, it has also sorts of other effects
> > > -         * on QEMU device models created and so we don't
> > > -         * want to allow its use.
> > >           */
> > > -        if (!ARCH_IS_X86(def->os.arch)) {
> > > -            virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
> > > -                           _("BIOS serial console only supported on
> > > x86
> > > architectures"));
> > > -            return -1;
> > > -        }
> > >          if (!def->nserials) {
> > >              virReportError(VIR_ERR_XML_ERROR, "%s",
> > >                             _("need at least one serial port to use
> > > BIOS
> > > serial output"));
> > > 
> > > With that change, I can now create VMs with a serial console through
> > > virt-install on the Raspberry PI 5.
> > > 
> > > Have I got this right? If so, I'm happy to submit the patch.
> > 
> > This code is specifically only about a config setting for enabling
> > the BIOS to output its boot message/menus on the serial console.
> > It is independent of the broader serial console concept - a guest
> > OS can still be configured with a serial console without the above
> > change.
> 
> Sorry I wasn't 100% clear. With the change I am also able to use serial
> for the BIOS[1] and Grub[2]. Although the grub output is not quite right
> it works well enough to select an entry.

So the above code you're removing is related to the XML config

 <bios useserial='yes' />

This was originally added for SeaBIOS since it needed an explicit
opt-in for using serial output, via the side-loaded sgabios.

Recent SeaBIOS no longer needs sgabios, so useserial is obsolete.

For non-x86, or x86 with EFI, we have no control knobs. Either the
firmware used will output to the serial console or it won't, so
the 'useserial=yes' config serves no purpose, which is why the
above code rejects it.

IOW, if you delete 'useserial=yes' from your guest XML it should
all still work fine AFAIR


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

Reply via email to