On Thu, 5 Feb 2026 at 17:41, Michael S. Tsirkin <[email protected]> wrote:
>
> On Thu, Feb 05, 2026 at 05:15:17PM +0000, Peter Maydell wrote:
> > On Thu, 5 Feb 2026 at 10:13, Michael S. Tsirkin <[email protected]> wrote:
> > > presumably, things would be different with -nodefaults?
> >
> > -nodefaults doesn't generally do much on Arm boards, because
> > we don't have a lot of "pluggable thing that's plugged in by
> > default" that we would turn off -- that's more of an x86 thing.
> >
> > On the virt board the UART situation is a bit complicated,
> > for command-line backwards compatibility reasons:
> >
> >  * the first UART always exists
> >  * if you're emulating the security extensions, the second
> >    UART always exists (and is the secure-world UART)
> >  * otherwise, the second UART exists only if the user
> >    configured a second serial backend (i.e. provided
> >    "-serial foo -serial bar" or similar)
> >
> > If I were designing it again from scratch without the
> > back-compat baggage, it would probably have three always-exists
> > UARTs, one for secure-world and two for normal-world.

> that is why we have machine versioning?

The problem is real world guest code that just breaks if
it gets a second serial port unexpectedly. Specifically, UEFI
would behave unhelpfully. Since fixed, but there are/were still
plenty of old UEFI binaries out there. Otherwise I'd have
just added the new UART and made it a versioned machine thing.

> I would say -nodefaults really should not have a serial port
> unless defined, no?

QEMU's arm boards have never behaved that way, and nor have
most of the other architectures' machine types. For PC
-nodefaults makes sense as it disables a lot of the optional
pluggable devices that the machines create by default. For the
Arm boards these devices are not like e.g. a floppy disk
or a PCI VGA card that you could unplug, and that you can
on the QEMU command line manually re-create, they're like a
UART that's baked into the SoC and there usually isn't
a way to create them on the command line.

-- PMM

Reply via email to