qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] What should a virtual board emulate? (was: [PATCH] mips


From: BALATON Zoltan
Subject: Re: [Qemu-devel] What should a virtual board emulate? (was: [PATCH] mips-fulong2e: obey -vga none)
Date: Wed, 20 Mar 2019 12:29:21 +0100 (CET)
User-agent: Alpine 2.21.9999 (BSF 287 2018-06-16)

On Wed, 20 Mar 2019, Markus Armbruster wrote:
For better or worse, we have a whole bunch of global variables
(manipulated with command line options) our board code may elect to
honor.

Are they documented somewhere or gathered at the same place or just scattered around in source? I may not know about them. But that's not important, as this is about -nodefaults now.

My question today is what a virtual board should emulate, and what
-nodefaults should mean.

This is philosophycal not related to the fulong2e patch but I understood it as remove devices that are added by default but not needed for a minimal emulation of the machine. The help text of this option does not mention anything about relation to real hardware so it's free to define its defaults and minimal settings.

The most straightforward case is emulating a single physical board, so
that we emulate exactly what's on the board, no more, no less.  Anything
that can be plugged into the board we model as pluggable device you add
with -device.

We can still have convenience options for adding such pluggable devices
in a simpler way.

We can even plug some by default.  -nodefaults suppresses that, i.e. it
gives you exactly the physical board with nothing plugged in.

This might work if we have a physical board to model but sometimes we don't (like mac99 or virt machines). Also it's often more useful to emulate a machine with its usual connected peripherals that are needed for using it conveniently so that suggests -nodefaults would be a minimal config that's still useful (e.g. with keyboard, display) but not with other optional components that are not needed to use it. (You can turn on a PC with just CPU and memory but probably can't do much useful with it other than hear it beep. Although you may try to get something working over serial if your firmware supports that or can preload a kernel in RAM in QEMU so truly minimal config might be useful but should that be another option say, -minimal or is that -nodefaults?)

Now let's circle back to this patch.  mips-fulong2e emulates a physical
board that has ATI VGA soldered on.  After this patch, -nodefaults gives
you an emulation of something that doesn't exist.  Right now, that
virtual frankenboard happens to work better than the more faithful
emulation that has the VGA, but that's just bugs.  Working around bugs
is certainly relevant, just not for guiding us on basic design issues.

Mind, I'm not demanding mips-fulong2e should continue to ignore -vga;
that's for its maintainer to decide.  I don't demand, I ask: what should
a virtual board emulate?  What should -nodefaults do?

Ideally the board should emulate all its components faithfully but often this is not done because of their complexity (and may not be needed as some obscure features are probably not used or can be substituted with something else we already have like another network, display or disk controller). It's still useful to have a board without all its components as guest OS may be able to work with those (especially paravirtualised Linux) so some boards in QEMU don't emulate real hardware just something that can run certain guests or when it models real hardware it may not be fully emulating every detail of it. Since this breaks your assumed relation to real hardware, the -nodefaults option also does not have such relation I think.

Regards,
BALATON Zoltan



reply via email to

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