On Wed, Feb 02, 2022 at 02:32:32PM +0000, Daniel P. Berrangé wrote:
On Wed, Feb 02, 2022 at 06:29:32AM -0800, Andrea Bolognani wrote:
> On Wed, Feb 02, 2022 at 12:44:44PM +0000, Daniel P. Berrangé wrote:
> > Introduce support for
> >
> > <serial type='pty'>
> > <target type='isa-debug'>
> > <model type='isa-debugcon'/>
> > </target>
> > <address type='isa' iobase='0x402'/>
> > </console>
> >
> > which is used as a way to receive debug messages from the
> > firmware on x86 platforms.
> >
> > Note that the default port is 0x0xe9 since that's the original
> > Bochs debug port. Thus for use with SeaBIOS/OVMF, the iobase
> > port needs to be explicitly set to 0x402.
>
> The default is not set anywhere in the code, so I guess we're relying
> on the fact that QEMU has that as the current default. Wouldn't it
> make sense to have it reflected in the XML as well?
>
> The previous version used 0x402 as the default, which apparently
> doesn't match QEMU's own but is what most people will want in
> practice. Wouldn't that be a better default for us? People who care
> about Bochs compatibility can always explicitly set the appropriate
> value themselves.
The previous bversion was a mistake because I incorrectly thought
402 was QEMU's own default. I also mistakenly thought we needed
to set it explicitly for ABI compat, but that's not the case because
the machine type ensures that.
So preferrable to not override QEMU's own defaults in libvirt.
I think it would still make sense to reflect QEMU's current default
in the XML, which would make sure that the same input XML results in
the same device even if QEMU decides to change its defaults later on.
If you don't agree with that idea you can consider this patch
Reviewed-by: Andrea Bolognani <abologna(a)redhat.com>
but please at least reword the last bit of the commit message along
the lines of
Note that if iobase is not specified the result is going to be
hypervisor-specific: QEMU currently defaults to 0xe9, which is the
original Bochs debug port, thus for use with...
to make it clear that you're talking about QEMU's own default and not
libvirt's.
--
Andrea Bolognani / Red Hat / Virtualization