aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
authorEduardo Habkost <ehabkost@redhat.com>2010-04-06 19:22:07 -0300
committerAurelien Jarno <aurelien@aurel32.net>2010-04-11 12:33:21 +0200
commit69ff4e9dbde494b1e8752606b0820f04344caeb1 (patch)
treea42344f686e049cdcfa0b0075f513b3f8860b3d7 /vl.c
parentqcow2: Remove request from in-flight list after error (diff)
downloadqemu-kvm-69ff4e9dbde494b1e8752606b0820f04344caeb1.tar.gz
qemu-kvm-69ff4e9dbde494b1e8752606b0820f04344caeb1.tar.bz2
qemu-kvm-69ff4e9dbde494b1e8752606b0820f04344caeb1.zip
net: remove broken net_set_boot_mask() boot device validation
There are many problems with net_set_boot_mask(): 1) It is broken when using the device model instead of "-net nic". Example: $ qemu-system-x86_64 -device rtl8139,vlan=0,id=net0,mac=52:54:00:82:41:fd,bus=pci.0,addr=0x4 -net user,vlan=0,name=hostnet0 -vnc 0.0.0.0:0 -boot n Cannot boot from non-existent NIC $ 2) The mask was previously used to set which boot ROMs were supposed to be loaded, but this was changed long time ago. Now all ROM images are loaded, and SeaBIOS takes care of jumping to the right boot entry point depending on the boot settings. 3) Interpretation and validation of the boot parameter letters is done on the machine type code. Examples: PC accepts only a,b,c,d,n as valid boot device letters. mac99 accepts only a,b,c,d,e,f. As a side-effect of this change, qemu-kvm won't abort anymore if using "-boot n" on a machine with no network devices. Checking if the requested boot device is valid is now a task for the BIOS or the machine-type code. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Acked-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> (cherry-picked from da1fcfda59a6bcbdf58d49243fbced455f2bf78a)
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/vl.c b/vl.c
index 425bb4b6f..6b6e86d69 100644
--- a/vl.c
+++ b/vl.c
@@ -4851,7 +4851,7 @@ int main(int argc, char **argv, char **envp)
const char *gdbstub_dev = NULL;
uint32_t boot_devices_bitmap = 0;
int i;
- int snapshot, linux_boot, net_boot;
+ int snapshot, linux_boot;
const char *initrd_filename;
const char *kernel_filename, *kernel_cmdline;
char boot_devices[33] = "cad"; /* default to HD->floppy->CD-ROM */
@@ -5850,9 +5850,6 @@ int main(int argc, char **argv, char **envp)
exit(1);
}
- net_boot = (boot_devices_bitmap >> ('n' - 'a')) & 0xF;
- net_set_boot_mask(net_boot);
-
/* init the bluetooth world */
if (foreach_device_config(DEV_BT, bt_parse))
exit(1);