[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH 2/2] bootdevice: update boot_order in MachineState
From: |
Dinar Valeev |
Subject: |
Re: [Qemu-ppc] [PATCH 2/2] bootdevice: update boot_order in MachineState |
Date: |
Tue, 27 Jan 2015 09:57:18 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 |
On 01/27/2015 03:51 AM, Gonglei wrote:
> On 2015/1/27 7:52, address@hidden wrote:
>
>> 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>
>> ---
>> 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.
No, I set boot_order on each machine reset. My tests are showing it works
without an error.
Previous patch was using qemu_register_boot_set, but Alexender Graf, suggested
me to use MachineState and simply update on each guest reset.
>
> Regards,
> -Gonglei
>
- [Qemu-ppc] Update boot_order on reset for sPAPR, dvaleev, 2015/01/26
- [Qemu-ppc] [PATCH 1/2] sPAPR: reread boot_device on reset, dvaleev, 2015/01/26
- [Qemu-ppc] [PATCH 2/2] bootdevice: update boot_order in MachineState, dvaleev, 2015/01/26
- Re: [Qemu-ppc] [PATCH 2/2] bootdevice: update boot_order in MachineState, Gonglei, 2015/01/26
- Re: [Qemu-ppc] [PATCH 2/2] bootdevice: update boot_order in MachineState,
Dinar Valeev <=
- Re: [Qemu-ppc] [PATCH 2/2] bootdevice: update boot_order in MachineState, Gonglei, 2015/01/27
- Re: [Qemu-ppc] [PATCH 2/2] bootdevice: update boot_order in MachineState, Dinar Valeev, 2015/01/27
- Re: [Qemu-ppc] [PATCH 2/2] bootdevice: update boot_order in MachineState, Dinar Valeev, 2015/01/27
- Re: [Qemu-ppc] [PATCH 2/2] bootdevice: update boot_order in MachineState, Gonglei, 2015/01/27
- Re: [Qemu-ppc] [PATCH 2/2] bootdevice: update boot_order in MachineState, Dinar Valeev, 2015/01/28
- Re: [Qemu-ppc] [PATCH 2/2] bootdevice: update boot_order in MachineState, Gonglei, 2015/01/28
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 2/2] bootdevice: update boot_order in MachineState, Markus Armbruster, 2015/01/29
- Re: [Qemu-ppc] [Qemu-devel] [PATCH 2/2] bootdevice: update boot_order in MachineState, Alexander Graf, 2015/01/29
- Re: [Qemu-ppc] [PATCH 2/2] bootdevice: update boot_order in MachineState, Alexander Graf, 2015/01/29
- Re: [Qemu-ppc] [PATCH 2/2] bootdevice: update boot_order in MachineState, Gonglei, 2015/01/29