All of lore.kernel.org
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: "Gonglei (Arei)" <arei.gonglei@huawei.com>
Cc: "chenliang (T)" <chenliang88@huawei.com>,
	"Huangweidong (C)" <weidong.huang@huawei.com>,
	"mst@redhat.com" <mst@redhat.com>,
	"aik@ozlabs.ru" <aik@ozlabs.ru>,
	"hutao@cn.fujitsu.com" <hutao@cn.fujitsu.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"agraf@suse.de" <agraf@suse.de>,
	"akong@redhat.com" <akong@redhat.com>,
	Markus Armbruster <armbru@redhat.com>,
	"aliguori@amazon.com" <aliguori@amazon.com>,
	"gaowanlong@cn.fujitsu.com" <gaowanlong@cn.fujitsu.com>,
	"ehabkost@redhat.com" <ehabkost@redhat.com>,
	Luonengjun <luonengjun@huawei.com>,
	"Huangpeng (Peter)" <peter.huangpeng@huawei.com>,
	"hani@linux.com" <hani@linux.com>,
	"stefanha@redhat.com" <stefanha@redhat.com>,
	"pbonzini@redhat.com" <pbonzini@redhat.com>,
	"lcapitulino@redhat.com" <lcapitulino@redhat.com>,
	"kwolf@redhat.com" <kwolf@redhat.com>,
	"peter.crosthwaite@xilinx.com" <peter.crosthwaite@xilinx.com>,
	"afaerber@suse.de" <afa.erber@suse.de>,
	"imammedo@redhat.com" <imammedo@redhat.com>
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	[thread overview]
Message-ID: <1409149388.8045.12.camel@nilsson.home.kraxel.org> (raw)
In-Reply-To: <33183CC9F5247A488A2544077AF1902086D9825D@SZXEMA503-MBS.china.huawei.com>

  Hi,

> 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.

HTH,
  Gerd

  reply	other threads:[~2014-08-27 14:26 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-04 12:46 [Qemu-devel] [PATCH v5 0/8] modify boot order of guest, and take effect after rebooting arei.gonglei
2014-08-04 12:46 ` [Qemu-devel] [PATCH v5 1/8] bootindex: add modify_boot_device_path function arei.gonglei
2014-08-04 12:46 ` [Qemu-devel] [PATCH v5 2/8] bootindex: add del_boot_device_path function arei.gonglei
2014-08-04 12:46 ` [Qemu-devel] [PATCH v5 3/8] fw_cfg: add fw_cfg_machine_reset function arei.gonglei
2014-08-04 12:46 ` [Qemu-devel] [PATCH v5 4/8] bootindex: delete bootindex when device is removed arei.gonglei
2014-08-04 12:46 ` [Qemu-devel] [PATCH v5 5/8] qmp: add set-bootindex command arei.gonglei
2014-08-04 12:46 ` [Qemu-devel] [PATCH v5 6/8] qemu-monitor: HMP set-bootindex wrapper arei.gonglei
2014-08-04 12:46 ` [Qemu-devel] [PATCH v5 7/8] qmp: add query-bootindex command arei.gonglei
2014-08-04 12:46 ` [Qemu-devel] [PATCH v5 8/8] qemu-monitor: add HMP "info-bootindex" command arei.gonglei
2014-08-04 12:53 ` [Qemu-devel] [PATCH v5 0/8] modify boot order of guest, and take effect after rebooting Gonglei (Arei)
2014-08-07 11:50 ` Gonglei (Arei)
2014-08-07 12:57   ` Paolo Bonzini
2014-08-07 13:01     ` Gonglei (Arei)
2014-08-26  6:36 ` Gerd Hoffmann
2014-08-26  9:07   ` Gonglei (Arei)
2014-08-26 10:00     ` Gerd Hoffmann
2014-08-26 11:24       ` Markus Armbruster
2014-08-27  2:11         ` Gonglei (Arei)
2014-08-27 14:23           ` Gerd Hoffmann [this message]
2014-08-28  4:50             ` Gonglei (Arei)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1409149388.8045.12.camel@nilsson.home.kraxel.org \
    --to=kraxel@redhat.com \
    --cc=afa.erber@suse.de \
    --cc=agraf@suse.de \
    --cc=aik@ozlabs.ru \
    --cc=akong@redhat.com \
    --cc=aliguori@amazon.com \
    --cc=arei.gonglei@huawei.com \
    --cc=armbru@redhat.com \
    --cc=chenliang88@huawei.com \
    --cc=ehabkost@redhat.com \
    --cc=gaowanlong@cn.fujitsu.com \
    --cc=hani@linux.com \
    --cc=hutao@cn.fujitsu.com \
    --cc=imammedo@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=lcapitulino@redhat.com \
    --cc=luonengjun@huawei.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.crosthwaite@xilinx.com \
    --cc=peter.huangpeng@huawei.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=weidong.huang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.