From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49253) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YFwH1-0003Q5-Uw for qemu-devel@nongnu.org; Mon, 26 Jan 2015 21:53:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YFwGy-0002fy-OE for qemu-devel@nongnu.org; Mon, 26 Jan 2015 21:53:03 -0500 Message-ID: <54C6FD48.8000204@huawei.com> Date: Tue, 27 Jan 2015 10:51:52 +0800 From: Gonglei MIME-Version: 1.0 References: <1422316341-28983-1-git-send-email-dvaleev@suse.de> <1422316341-28983-3-git-send-email-dvaleev@suse.de> In-Reply-To: <1422316341-28983-3-git-send-email-dvaleev@suse.de> Content-Type: text/plain; charset="GB2312" Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 2/2] bootdevice: update boot_order in MachineState List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "dvaleev@suse.de" Cc: "armbru@redhat.com" , Dinar Valeev , "qemu-ppc@nongnu.org" , "qemu-devel@nongnu.org" , Alexander Graf On 2015/1/27 7:52, dvaleev@suse.de wrote: > From: Dinar Valeev > > on sPAPR we need to update boot_order in MachineState in case it > got changed on reset. > > Signed-off-by: Dinar Valeev > --- > bootdevice.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/bootdevice.c b/bootdevice.c > index 5914417..4f11a06 100644 > --- a/bootdevice.c > +++ b/bootdevice.c > @@ -26,6 +26,7 @@ > #include "qapi/visitor.h" > #include "qemu/error-report.h" > #include "hw/hw.h" > +#include "hw/boards.h" > > typedef struct FWBootEntry FWBootEntry; > > @@ -50,6 +51,8 @@ void qemu_register_boot_set(QEMUBootSetHandler *func, void *opaque) > void qemu_boot_set(const char *boot_order, Error **errp) > { > Error *local_err = NULL; > + MachineState *machine = MACHINE(qdev_get_machine()); > + machine->boot_order = boot_order; > > if (!boot_set_handler) { > error_setg(errp, "no function defined to set boot device list for" Have you registered boot set handler on ppc/sPAPR platform by calling qemu_register_boot_set()? Otherwise qemu_boot_set function will return error. Regards, -Gonglei