qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [RFC PATCH qemu] qmp: Add qom-list-properties to list Q


From: Alexey Kardashevskiy
Subject: Re: [Qemu-devel] [RFC PATCH qemu] qmp: Add qom-list-properties to list QOM object properties
Date: Fri, 19 Jan 2018 17:22:57 +1100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

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 <address@hidden>
>>
>> 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

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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