Commit e4ada29e authored by Avik Sil's avatar Avik Sil Committed by Anthony Liguori
Browse files

Make default boot order machine specific



This patch makes default boot order machine specific instead of
set globally. The default boot order can be set per machine in
QEMUMachine boot_order. This also allows a machine to receive a
NULL boot order when -boot isn't used and take an appropriate action
accordingly. This helps machine boots from the devices as set in
guest's non-volatile memory location in case no boot order is
provided by the user.

Reviewed-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
Signed-off-by: default avatarAvik Sil <aviksil@linux.vnet.ibm.com>
Signed-off-by: default avatarAnthony Liguori <aliguori@us.ibm.com>
parent 038794cf
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -171,6 +171,7 @@ static QEMUMachine clipper_machine = {
    .init = clipper_init,
    .max_cpus = 4,
    .is_default = 1,
    DEFAULT_MACHINE_OPTIONS,
};

static void clipper_machine_init(void)
+1 −0
Original line number Diff line number Diff line
@@ -86,6 +86,7 @@ static QEMUMachine an5206_machine = {
    .name = "an5206",
    .desc = "Arnewsh 5206",
    .init = an5206_init,
    DEFAULT_MACHINE_OPTIONS,
};

static void an5206_machine_init(void)
+1 −0
Original line number Diff line number Diff line
@@ -355,6 +355,7 @@ static QEMUMachine axisdev88_machine = {
    .desc = "AXIS devboard 88",
    .init = axisdev88_init,
    .is_default = 1,
    DEFAULT_MACHINE_OPTIONS,
};

static void axisdev88_machine_init(void)
+4 −0
Original line number Diff line number Diff line
@@ -6,6 +6,9 @@
#include "sysemu/blockdev.h"
#include "qdev.h"

#define DEFAULT_MACHINE_OPTIONS \
    .boot_order = "cad"

typedef struct QEMUMachineInitArgs {
    ram_addr_t ram_size;
    const char *boot_device;
@@ -35,6 +38,7 @@ typedef struct QEMUMachine {
        no_sdcard:1;
    int is_default;
    const char *default_machine_opts;
    const char *boot_order;
    GlobalProperty *compat_props;
    struct QEMUMachine *next;
    const char *hw_version;
+1 −0
Original line number Diff line number Diff line
@@ -62,6 +62,7 @@ static QEMUMachine collie_machine = {
    .name = "collie",
    .desc = "Collie PDA (SA-1110)",
    .init = collie_init,
    DEFAULT_MACHINE_OPTIONS,
};

static void collie_machine_init(void)
Loading