[Top][All Lists]

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

Re: About creating machines on the command line

From: Luc Michel
Subject: Re: About creating machines on the command line
Date: Sat, 13 Feb 2021 14:58:39 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0

On 2/10/21 1:13 PM, Alexander Graf wrote:

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:

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.

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?


Yes, but we specifically want to avoid embedding the part that will parse and translate the DTB into QEMU.

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.
I think there is no such 1:1 mapping. That's why we believe the tool(s) that parses the DTB and translate it into QMP commands must stay out of QEMU.

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.
We'll try an go step by step, to not raise all the issues at the same time hopefully.




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]