qemu-devel
[Top][All Lists]
Advanced

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

Re: About creating machines on the command line


From: Alexander Graf
Subject: Re: About creating machines on the command line
Date: Wed, 10 Feb 2021 13:13:01 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.16; rv:78.0) Gecko/20100101 Thunderbird/78.7.1



On 05.02.21 11:43, Luc Michel wrote:

On 2/3/21 6:09 PM, Alexander Graf wrote:


On 03.02.21 17:55, Philippe Mathieu-Daudé wrote:

On 1/11/21 3:50 PM, Luc Michel wrote:
Hi,

We would like to work on improving QEMU to be able to create custom
machines from the command line. The goal here is to get feedback from
the community and shape the future developments.

Cc'ing John who is working on command line, and some developers from
the "inter-VM device emulation interface" call.
https://www.mail-archive.com/qemu-devel@nongnu.org/msg723252.html


The use case mainly comes from people working with tools to customize
their designs, such as SiFive Core Designer
(https://scs.sifive.com/core-designer). This kind of tools may allow
creation or customization of a whole SoC, from the number of cores, to
the memory and IRQ mapping of peripherals etc.

The ultimate goal would be to be able to create any kind of machine on
the command line. However we are aware that this is a substantial amount
of changes in QEMU.

Is the command line really the right abstraction level here? Wouldn't it
make more sense to have a QOM / <scripting language> bridge that allows
you to create and connect QOM objects using for example Python?
Yes, after some discussions with the community, we are now working on
improving QMP to achieve this. We first started with the idea of the
command line because it seems to be the place where we had "almost"
everything we needed already. In either cases we are planning to use a
front-end script to go from e.g. a DTB to whatever QEMU interface we
will end up using.


You could then have machine descriptions in a script, which could be
generated by the SoC customization tools.
Yes, most likely a DTB in our case.

So, something like this?

    https://github.com/Xilinx/qemu/blob/master/hw/arm/arm_generic_fdt.c

I'm not sure how DTB would translate 1:1 into qom properties for a reeal generic mechanism? And how easy it would be to extract target device specifics, such as interrupt descriptors or PCI ranges properties.

If you want to make this fully generic, try to ensure that you can model weird beasts such as the q35 machine model.

Either way, the idea has come up multiple times before. I don't know of anyone who successfully managed to push it upstream yet, but I definitely hope we will be at a point where you can describe machine models in something different than C.


Alex



Amazon Development Center Germany GmbH
Krausenstr. 38
10117 Berlin
Geschaeftsfuehrung: Christian Schlaeger, Jonathan Weiss
Eingetragen am Amtsgericht Charlottenburg unter HRB 149173 B
Sitz: Berlin
Ust-ID: DE 289 237 879



reply via email to

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