qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 00/18] qom: dynamic properties and composition t


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH 00/18] qom: dynamic properties and composition tree
Date: Wed, 30 Nov 2011 16:54:24 -0600
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.21) Gecko/20110831 Lightning/1.0b2 Thunderbird/3.1.13

On 11/30/2011 03:03 PM, Anthony Liguori wrote:
This is a follow up to my previous series to get us started in the QOM
direction.  A few things are different this time around.  Most notably:

  1) Devices no longer have names.  Instead, path names are always used to
     identify devices.

  2) In order to support (1), dynamic properties are now supported.

  3) The concept of a "root device" has been introduced.  The root device is
     roughly modelling the motherboard of a machine.  This type is a container
     type and it's best to think of it as something like a PCB board I guess.

To try it out, here's an example session:

Launch:

address@hidden:~/build/qemu$ x86_64-softmmu/qemu-system-x86_64 -hda 
~/images/linux.img -snapshot -device virtio-balloon-pci,id=foo -qmp 
unix:/tmp/server.sock,server,nowait

Explore the object model:

address@hidden:~/git/qemu/QMP$ ./qom-list /
peripheral/
i440fx/
address@hidden:~/git/qemu/QMP$ ./qom-list /i440fx/
piix3/
address@hidden:~/git/qemu/QMP$ ./qom-list /i440fx/piix3
rtc/
address@hidden:~/git/qemu/QMP$ ./qom-list /i440fx/piix3/rtc
date
base_year
address@hidden:~/git/qemu/QMP$ ./qom-get /i440fx/piix3/rtc.date
tm_sec: 33
tm_hour: 21
tm_mday: 30
tm_year: 111
tm_mon: 10
tm_min: 2
address@hidden:~/git/qemu/QMP$ ./qom-get rtc.date
tm_sec: 38
tm_hour: 21
tm_mday: 30
tm_year: 111
tm_mon: 10
tm_min: 2

It's probably worth adding that this is the short form. The full path for rtc is /i440fx/piix4/rtc. If user did -device virtio-pci-blk,id=rtc, then that device would have a full path for /peripheral/rtc.

If you did that, then just saying 'rtc.date' would through an error because the relative path 'rtc' is ambiguous.

The purpose of this is to give stable, unambiguous paths while still making it easy to use for a command line user.

Regards,

Anthony Liguori




reply via email to

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