From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49021) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XMEuS-0001vj-OU for qemu-devel@nongnu.org; Tue, 26 Aug 2014 07:27:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XMEuL-0007dT-K8 for qemu-devel@nongnu.org; Tue, 26 Aug 2014 07:27:32 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38324) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XMEuL-0007dG-CR for qemu-devel@nongnu.org; Tue, 26 Aug 2014 07:27:25 -0400 From: Markus Armbruster 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> Date: Tue, 26 Aug 2014 13:24:37 +0200 In-Reply-To: <1409047233.8727.27.camel@nilsson.home.kraxel.org> (Gerd Hoffmann's message of "Tue, 26 Aug 2014 12:00:33 +0200") Message-ID: <87oav7a3yi.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain 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: Gerd Hoffmann Cc: "chenliang (T)" , "Huangweidong (C)" , "mst@redhat.com" , "aik@ozlabs.ru" , "hutao@cn.fujitsu.com" , "qemu-devel@nongnu.org" , "lcapitulino@redhat.com" , "akong@redhat.com" , "agraf@suse.de" , "Gonglei (Arei)" , "aliguori@amazon.com" , "gaowanlong@cn.fujitsu.com" , "ehabkost@redhat.com" , Luonengjun , "Huangpeng (Peter)" , "hani@linux.com" , "stefanha@redhat.com" , "pbonzini@redhat.com" , "kwolf@redhat.com" , "peter.crosthwaite@xilinx.com" , "afaerber@suse.de" , "imammedo@redhat.com" Gerd Hoffmann writes: > 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. 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.