qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v3 4/4] bootdevice: update boot_order in Machine


From: Markus Armbruster
Subject: Re: [Qemu-devel] [PATCH v3 4/4] bootdevice: update boot_order in MachineState
Date: Thu, 12 Feb 2015 11:21:49 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

<address@hidden> writes:

> From: Dinar Valeev <address@hidden>
>
> on sPAPR we need to update boot_order in MachineState in case it
> got changed on reset.
>
> Signed-off-by: Dinar Valeev <address@hidden>
> Reviewed-by: Alexey Kardashevskiy <address@hidden>
> Signed-off-by: Gonglei <address@hidden>
> ---
>  bootdevice.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/bootdevice.c b/bootdevice.c
> index d3d4277..ac586b1 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,7 @@ 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());
>  
>      validate_bootdevices(boot_order, &local_err);
>      if (local_err) {
> @@ -57,6 +59,8 @@ void qemu_boot_set(const char *boot_order, Error **errp)
>          return;
>      }
>  
> +    machine->boot_order = boot_order;
> +
>      if (boot_set_handler) {
>          boot_set_handler(boot_set_opaque, boot_order, errp);
>      }

Looks harmless enough, but I'm afraid I don't quite understand why we
need this.  Can you explain it to me real slow?  :)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]