diff options
author | Markus Armbruster <armbru@redhat.com> | 2013-08-16 13:13:50 +0200 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2013-08-28 10:16:47 +0300 |
commit | c16547326988cc321c9bff43ed91cbe753e52892 (patch) | |
tree | cb1365697706891bb2d6c9dc30cf225f370fd362 /hw/i386/pc_q35.c | |
parent | 3bf4dfdd1110de84ca0cecff0679cf7da90bfbfe (diff) |
hw: Clean up bogus default boot order
We set default boot order "cad" in every single machine definition
except "pseries" and "moxiesim", even though very few boards actually
care for boot order, and "cad" makes sense for even fewer.
Machines that care:
* pc and its variants
Accept up to three letters 'a', 'b' (undocumented alias for 'a'),
'c', 'd' and 'n'. Reject all others (fatal with -boot).
* nseries (n800, n810)
Check whether order starts with 'n'. Silently ignored otherwise.
* prep, g3beige, mac99
Extract the first character the machine understands (subset of
'a'..'f'). Silently ignored otherwise.
* spapr
Accept an arbitrary string (vl.c restricts it to contain only
'a'..'p', no duplicates).
* sun4[mdc]
Use the first character. Silently ignored otherwise.
Strip characters these machines ignore from their default boot order.
For all other machines, remove the unused default boot order
alltogether.
Note that my rename of QEMUMachine member boot_order to
default_boot_order and QEMUMachineInitArgs member boot_device to
boot_order has a welcome side effect: it makes every use of boot
orders visible in this patch, for easy review.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'hw/i386/pc_q35.c')
-rw-r--r-- | hw/i386/pc_q35.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 198c7851b3..291ad97c5f 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -200,7 +200,7 @@ static void pc_q35_init(QEMUMachineInitArgs *args) 0xb100), 8, NULL, 0); - pc_cmos_init(below_4g_mem_size, above_4g_mem_size, args->boot_device, + pc_cmos_init(below_4g_mem_size, above_4g_mem_size, args->boot_order, floppy, idebus[0], idebus[1], rtc_state); /* the rest devices to which pci devfn is automatically assigned */ @@ -260,7 +260,7 @@ static QEMUMachine pc_q35_machine_v1_6 = { .init = pc_q35_init_1_6, .hot_add_cpu = pc_hot_add_cpu, .max_cpus = 255, - DEFAULT_MACHINE_OPTIONS, + .default_boot_order = "cad", }; static QEMUMachine pc_q35_machine_v1_5 = { @@ -269,11 +269,11 @@ static QEMUMachine pc_q35_machine_v1_5 = { .init = pc_q35_init_1_5, .hot_add_cpu = pc_hot_add_cpu, .max_cpus = 255, + .default_boot_order = "cad", .compat_props = (GlobalProperty[]) { PC_COMPAT_1_5, { /* end of list */ } }, - DEFAULT_MACHINE_OPTIONS, }; static QEMUMachine pc_q35_machine_v1_4 = { @@ -281,11 +281,11 @@ static QEMUMachine pc_q35_machine_v1_4 = { .desc = "Standard PC (Q35 + ICH9, 2009)", .init = pc_q35_init_1_4, .max_cpus = 255, + .default_boot_order = "cad", .compat_props = (GlobalProperty[]) { PC_COMPAT_1_4, { /* end of list */ } }, - DEFAULT_MACHINE_OPTIONS, }; static void pc_q35_machine_init(void) |