[Top][All Lists]

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

Re: [Qemu-devel] [PATCH v5 0/8] modify boot order of guest, and take eff

From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [PATCH v5 0/8] modify boot order of guest, and take effect after rebooting
Date: Wed, 27 Aug 2014 16:23:08 +0200


> 1. Does have ready-to-wear interface to get QOM path by qdev id,?

You can simply use the id directly.  Try this:

qemu-system-x86_64 \
   -qmp unix:/tmp/qmp,server,nowait \
   -device virtio-scsi-pci,id=scsi \
   -drive if=none,id=cdrom,media=cdrom \
   -device scsi-cd,id=testcd,drive=cdrom &

export QMP_SOCKET=/tmp/qmp
scripts/qmp/qom-list testcd
scripts/qmp/qom-get testcd.bootindex

Builtin devices without ID are a bit more tricky.  But you can also
reference busses by name, which simplifies it a bit.  Floppy for example
is here:

scripts/qmp/qom-list isa.0/child[11]

[ Side note: The full path for this one is 
  "/machine/i440fx/pci.0/child[1]/isa.0/child[11]" ]

I have my doubts that "11" is guaranteed to be stable.  But you can walk
all isa.0 children and check the type this way to figure:

scripts/qmp/qom-get isa.0/child[11].type

> 2. Can I make bootindex property in QDEV coexist with in QOM? I think this 
> meathod
> will be good for compatibility with previous. 

qdev properties are just some compatibility fluff around qom properties
these days.  You can remove the qdev property, add a qom property with
the same name and things will continue to work just fine.  And you now
can use qom features which are not supported by the qdev property
compatibility bits.


reply via email to

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