qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] about kvmclock QOM


From: Andreas Färber
Subject: Re: [Qemu-devel] about kvmclock QOM
Date: Tue, 13 Mar 2012 15:36:48 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.2) Gecko/20120215 Thunderbird/10.0.2

Am 13.03.2012 15:11, schrieb Zhi Yong Wu:
> On Tue, Mar 13, 2012 at 9:52 PM, Jan Kiszka <address@hidden> wrote:
>> On 2012-03-13 14:40, Zhi Yong Wu wrote:
>>> On Tue, Mar 13, 2012 at 9:36 PM, Jan Kiszka <address@hidden> wrote:
>>>> On 2012-03-13 13:57, Zhi Yong Wu wrote:
>>>>> HI, Jan
>>>>>
>>>>> Why can i not see kvmclock device in the output of qom-list? Since it
>>>>> has been converted to QOM.
>>>>
>>>> qom-list, like all QMP/ scripts, are currently broken for me, can't test
>>>> therefore. Please post any findings to the list while I'm digging into
>>> I can see other devices such emulated nics via qom-list, but didn't
>>> see kvmclock device in its output.
>>> what is kvmclock's path if it can work normally?
>>> My qemu command line is
>>>
>>> address@hidden qemu]# x86_64-softmmu/qemu-system-x86_64 -m 512 -drive
>>> file=/home/zwu/work/misc/image/rh6.1.img,if=ide,cache=none -enable-kvm
>>> -qmp unix:/tmp/server.sock,server,nowait -netdev type=user,id=net
>>> -device virtio-net-pci,netdev=net,id=net -net user,vlan=1 -device
>>> virtio-net-pci,id=net2,vlan=1 -chardev id=stdio,backend=stdio -device
>>> isa-serial,chardev=stdio,id=serial
>>
>> Ah, now it works again (forgot mode="control" for -mon).
>>
>>>
>>> address@hidden qemu]# QMP/qom-list -s /tmp/server.sock /
>>> vga/
>>> i440fx/
>>> peripheral/
>>> peripheral-anon/
>>> address@hidden qemu]# QMP/qom-list -s /tmp/server.sock /peripheral
>>> serial/
>>> net2/
>>> net/
>>>
>>
>> kvmclock (like many devices) is not yet linked to some parent device, so
> static TypeInfo kvmclock_info = {
>     .name          = "kvmclock",
>     .parent        = TYPE_SYS_BUS_DEVICE,
> It seems to be linked from here

No. This specifies the parent class (base or super class).

What you are looking for is the "parent" property which gets set up by
adding a child property to some object. Many devices are not yet wired
up as such and can only be inspected by info qtree monitor command.

>     .instance_size = sizeof(KVMClockState),
>     .class_init    = kvmclock_class_init,
> };
> 
> I also checked other devices which can be seen in the output of
> qom-list. I have not seen kvmclock QOM is different from other
> devices.
> So i am very surprised that why kvmclock device can not be seen in
> qom-list output.
> 
>> it's not present in that tree. This also happens to auto-created
>> isa-serial, e.g. (just leave out -device isa-serial)
> Yeah, i can see it in qom-list output.

Devices created by -device should be listed in the "/anon-peripheral"
(or so) container. Check qom-list / for its child nodes.

Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg



reply via email to

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