From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58628) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YH6q5-0005hd-Bl for qemu-devel@nongnu.org; Fri, 30 Jan 2015 03:22:06 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YH6q2-0003dj-6l for qemu-devel@nongnu.org; Fri, 30 Jan 2015 03:22:05 -0500 Received: from szxga02-in.huawei.com ([119.145.14.65]:41903) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YH6q1-0003cy-IE for qemu-devel@nongnu.org; Fri, 30 Jan 2015 03:22:02 -0500 Message-ID: <54CB3ED0.2070209@huawei.com> Date: Fri, 30 Jan 2015 16:20:32 +0800 From: Gonglei MIME-Version: 1.0 References: <1422538193-13648-1-git-send-email-arei.gonglei@huawei.com> <1422538193-13648-3-git-send-email-arei.gonglei@huawei.com> <54CA59EB.5040005@suse.de> <54CAD48A.5020709@huawei.com> <87386syamf.fsf@blackfin.pond.sub.org> In-Reply-To: <87386syamf.fsf@blackfin.pond.sub.org> Content-Type: text/plain; charset="GB2312" Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/2] bootdevice: add check in restore_boot_order() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Markus Armbruster Cc: "Huangpeng (Peter)" , "dvaleev@suse.de" , Alexander Graf , "qemu-devel@nongnu.org" On 2015/1/30 15:46, Markus Armbruster wrote: > Gonglei writes: > >> On 2015/1/30 0:03, Alexander Graf wrote: >> >>> >>> >>> On 29.01.15 14:29, arei.gonglei@huawei.com wrote: >>>> From: Gonglei >>>> >>>> If boot order is invaild or is set failed, >>>> exit qemu. >>>> >>>> Signed-off-by: Gonglei >>> >>> Do we really want to kill the machine only because the boot device >>> string doesn't validate? >>> >> >> Not all of the situation. If people want to change boot order by qmp/hmp >> command, it just report an error, please see do_boot_set(). But if the boot >> order is set in qemu command line, it will exit qemu if the boot device string >> is invalidate, as this patch's situation, which follow the original processing >> way (commit ef3adf68). > > I think Alex isn't concerned about the monitor command, but what happens > when boot order "once" is reset to "order" on system reset. > > -boot errors should have been detected during command line processing > (strongly preferred) or initial startup (acceptable). Detecting Yes, and it had done it just like that, please see main() of vl.c. So, actually it wouldn't fail in the check of restore_boot_order function's calling. The only possible fails will happen to call boot_set_handler(). Take x86 pc machine example, set_boot_dev() callback may return errors. > configuration errors during operation is nasty. In cases where we can't > avoid it (and I'm not sure this is one), we need to consider very > carefully whether the error should be fatal. Indeed, maybe we only need to set boot order failed and report an error message in this scenario, do you agree? Regards, -Gonglei