From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41364) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XMSid-0001Hv-NQ for qemu-devel@nongnu.org; Tue, 26 Aug 2014 22:12:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XMSiX-0003H3-Iq for qemu-devel@nongnu.org; Tue, 26 Aug 2014 22:12:15 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:10027) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XMSiW-0003Gu-Pg for qemu-devel@nongnu.org; Tue, 26 Aug 2014 22:12:09 -0400 From: "Gonglei (Arei)" Date: Wed, 27 Aug 2014 02:11:44 +0000 Message-ID: <33183CC9F5247A488A2544077AF1902086D9825D@SZXEMA503-MBS.china.huawei.com> References: <1407156382-2836-1-git-send-email-arei.gonglei@huawei.com> <1409034979.8727.12.camel@nilsson.home.kraxel.org> <33183CC9F5247A488A2544077AF1902086D95E7A@SZXEMA503-MBS.china.huawei.com> <1409047233.8727.27.camel@nilsson.home.kraxel.org> <87oav7a3yi.fsf@blackfin.pond.sub.org> In-Reply-To: <87oav7a3yi.fsf@blackfin.pond.sub.org> Content-Language: zh-CN Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH v5 0/8] modify boot order of guest, and take effect after rebooting List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster , Gerd Hoffmann Cc: "kwolf@redhat.com" , "chenliang (T)" , "peter.crosthwaite@xilinx.com" , "Huangweidong (C)" , "ehabkost@redhat.com" , "afaerber@suse.de" , "mst@redhat.com" , "aik@ozlabs.ru" , "hutao@cn.fujitsu.com" , Luonengjun , "qemu-devel@nongnu.org" , "agraf@suse.de" , "hani@linux.com" , "aliguori@amazon.com" , "imammedo@redhat.com" , "lcapitulino@redhat.com" , "pbonzini@redhat.com" , "Huangpeng (Peter)" , "akong@redhat.com" , "stefanha@redhat.com" , "gaowanlong@cn.fujitsu.com" > From: Markus Armbruster [mailto:armbru@redhat.com] > Sent: Tuesday, August 26, 2014 7:25 PM > Subject: Re: [Qemu-devel] [PATCH v5 0/8] modify boot order of guest, and = take > effect after rebooting >=20 > Gerd Hoffmann writes: >=20 > > On Di, 2014-08-26 at 09:07 +0000, Gonglei (Arei) wrote: > >> Hi, Gerd > >> > >> Nice to meet you again in maillist. :) > >> > >> > -----Original Message----- > >> > From: Gerd Hoffmann [mailto:kraxel@redhat.com] > >> > Sent: Tuesday, August 26, 2014 2:36 PM > >> > Subject: Re: [PATCH v5 0/8] modify boot order of guest, and take eff= ect > after > >> > rebooting > >> > > >> > > The patchsets add one qmp interface, and add an > fw_cfg_machine_reset() > >> > > to achieve it. > >> > > >> > > (qemu) set-bootindex ide0-0-1 1 > >> > > The bootindex 1 has already been used > >> > > >> > What happened to the idea to use qom-set instead? I liked that > >> > suggestion. Solves the suffix issue in a nice way. > >> > > >> I have discussed with Makus about qom-set in pervious confabulation. > >> The main problem is that qom-set's function is simple, which just chan= ge > >> a device's property value, but not can do any other logic. In my case, > >> I should change global fw_boot_orde for devices's bootindex taking eff= ect. > > > > Two options (also mentioned in the thread): > > > > (1) Set/update bootindex on reset instead of realize/init. > > (2) Switch the property from qdev to qom, then use the set > > callback to also update the fw_cfg file. >=20 > Yes, please. Even if it should make the implementation a bit more > complex. Avoiding new ways to name things in external interfaces, such > as the suffix here, is worth some complication. OK, thanks, guys. I will work for this.=20 And I have two questions: 1. Does have ready-to-wear interface to get QOM path by qdev id,? 2. Can I make bootindex property in QDEV coexist with in QOM? I think this = meathod will be good for compatibility with previous.=20 Thanks for any suggestions! Best regards, -Gonglei