On 04/12/2012 10:52 AM, Peter Maydell wrote:
On 12 April 2012 16:43, Anthony Liguori<anth...@codemonkey.ws>  wrote:
I don't think machines should be objects.

Chipsets should be QOM objects.  What the machines currently do does not map
well to modeling as an object.

Why would you design an infrastructure that lets you coherently bundle
together a collection of devices and have configurable properties on
that bundle as well as on the devices, and then *not* use it for machines?

The machine concept in QEMU is "broken" IMHO. If we want to maintain compatibility (and we do), we need to let machines act as a bridge.

Here's how I expect the PC to work:

qemu --no-machine -readconfig my-system.cfg

[device "root"]
driver=i440fx
cpu[0]=cpu0
slot[3]=e1000
memory=2G
biosname=bios.bin

[device "cpu0"]
driver=qemu64

[device "e1000"]
bus=/i440fx
netdev=eth0

[netdev "eth0"]
type=tap

...

There is no real need to have a '-machine' option and no need to model a 
machine.

-M pc ends up being a compatibility bridge which takes a bunch of options that really do lots of different things (like choosing network device models). I see machines as a function that takes a QemuOpts and then does the equivalent of the above.

Regards,

Anthony Liguori

Reply via email to