On 19/01/18 17:15, Alexey Kardashevskiy wrote: > On 19/01/18 16:19, David Gibson wrote: >> On Fri, Jan 19, 2018 at 04:09:06PM +1100, Alexey Kardashevskiy wrote: >>> There is already 'device-list-properties' which does most of the job, >>> however it does not handle everything returned by qom-list-types such >>> as machines as they inherit directly from TYPE_OBJECT and not TYPE_DEVICE. >>> >>> This adds a new qom-list-properties command which prints properties >>> of a specific class and its instance. It is pretty much a simplified copy >>> of the device-list-properties handler. >>> >>> Since it creates an object instance, device properties should appear >>> in the output as they are copied to QOM properties at the instance_init >>> hook. >>> >>> Signed-off-by: Alexey Kardashevskiy <a...@ozlabs.ru> >> >> I think the existing qom-list interface does this already. > > Nope, it does not. It takes path, not a type, so running with "-machine > none" won't help. > >> This won't solve the libvirt problem we were discussing, because it >> needs an existing instance of the object. libvirt wants to know the >> machine properties *without* instantiating an instance. > > My patch works with types, it creates an instance for a short time itself, > this is why it does not do a thing for "pseries" as it is not a type and > prints properties for the "pseries-2.12-machine" type.
This is what I mean by "none": ./qemu-system-ppc64 -machine none -nodefaults -nographic -chardev socket,id=SOCKET0,server,nowait,host=localhost,port=40000 -mon chardev=SOCKET0,mode=control {"arguments": {"typename": "pseries-2.11-machine"}, "execute": "qom-list-properties"} still returns expected result on the 'none' machine. -- Alexey
signature.asc
Description: OpenPGP digital signature