From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60537) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XMDZ2-0005Lv-9d for qemu-devel@nongnu.org; Tue, 26 Aug 2014 06:01:26 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XMDYw-00054z-4U for qemu-devel@nongnu.org; Tue, 26 Aug 2014 06:01:20 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53943) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XMDYv-00054i-Sf for qemu-devel@nongnu.org; Tue, 26 Aug 2014 06:01:14 -0400 Message-ID: <1409047233.8727.27.camel@nilsson.home.kraxel.org> From: Gerd Hoffmann Date: Tue, 26 Aug 2014 12:00:33 +0200 In-Reply-To: <33183CC9F5247A488A2544077AF1902086D95E7A@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> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit 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: "Gonglei (Arei)" Cc: "chenliang (T)" , "Huangweidong (C)" , "mst@redhat.com" , "aik@ozlabs.ru" , "hutao@cn.fujitsu.com" , "qemu-devel@nongnu.org" , "armbru@redhat.com" , "akong@redhat.com" , "agraf@suse.de" , "aliguori@amazon.com" , "gaowanlong@cn.fujitsu.com" , "ehabkost@redhat.com" , Luonengjun , "Huangpeng (Peter)" , "hani@linux.com" , "stefanha@redhat.com" , "pbonzini@redhat.com" , "lcapitulino@redhat.com" , "kwolf@redhat.com" , "peter.crosthwaite@xilinx.com" , "imammedo@redhat.com" , "afaerber@suse.de" 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 effect 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 change > 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 effect. 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. cheers, Gerd