BALATON Zoltan <[email protected]> writes: > On Mon, 16 Mar 2026, Markus Armbruster wrote: >>> More generally anything we can do to bring qdev & qom closer together >>> feels desirable. I dream of a future where -device/device_add are >>> obsolete.... >> >> That would be lovely. > > How would normal people add devices from the command line then? Do you expect > us to use -object or something like that with JSON instead? That's very > impractical so some command line UI should remain.
-object and HMP object-add support key=value,... syntax. I don't want to get rid of the command line. It's good for doing simple things, and many things should be (made) simple. > Also is it practical to force people to learn some QEMU specific language to > be able to write device models? Otherwise what advantage this gives over > doing it in C? I think these are questions to answer before getting into the > design. That boat sailed long ago. I wasn't a fan of QAPI when it was added to QEMU. But it has become an integral part, with tentacles almost everywhere. Moreover, what's worse than a less than ideal way to define an interface? Two less than ideal ways: QAPI and QOM. People already have to learn basic QAPI to do lots of things in QEMU, including device models once they have complex properties. QAPI basics are easy enough to pick up: find something similar and imitate. I doubt it's any harder than learning the C interfaces for QOM. It is harder to screw up than in C.
