qemu-kvm: Remove extboot support
PATCH v2 1/1 qemu-kvm: Remove extboot support
Except for booting from SCSI via the LSI controller, SeaBIOS has native support for mass storage interfaces now. And SCSI can be worked around via [1] - or someone finally adds the necessary bits to SeaBIOS if there is a real need.
As there might be still scripts around that append "boot=on", continue to parse it, but ignore it and issue a deprecation warning instead.
[1] http://thread.gmane.org/gmane.comp.emulators.qemu/78467
---
Changes in v2:
- restore accidentally removed VAPIC option ROM installation
- continue to parse boot=on|off
.gitignore | 1 - Makefile | 1 - Makefile.target | 1 - blockdev.c | 15 +- blockdev.h | 2 - hw/extboot.c | 123 -------- hw/pc.c | 18 -- hw/pc.h | 4 - pc-bios/optionrom/Makefile | 2 +- pc-bios/optionrom/extboot.S | 691 ------------------------------------------- qemu-config.c | 2 +- qemu-options.hx | 4 +- 12 files changed, 7 insertions(+), 857 deletions(-) delete mode 100644 hw/extboot.c delete mode 100644 pc-bios/optionrom/extboot.S
.gitignore +0 -1
@@ -66,7 +66,6 @@ pc-bios/vgabios-pq/status pc-bios/optionrom/linuxboot.bin pc-bios/optionrom/multiboot.bin pc-bios/optionrom/multiboot.raw -pc-bios/optionrom/extboot.bin pc-bios/optionrom/vapic.bin .stgit-* cscope.*
Makefile +0 -1
@@ -252,7 +252,6 @@ mpc8544ds.dtb \ multiboot.bin linuxboot.bin \ s390-zipl.rom \ spapr-rtas.bin slof.bin -BLOBS += extboot.bin BLOBS += vapic.bin else BLOBS=
Makefile.target +0 -1
@@ -229,7 +229,6 @@ obj-i386-y += mc146818rtc.o i8259.o pc.o obj-i386-y += cirrus_vga.o sga.o apic.o ioapic.o piix_pci.o obj-i386-y += vmport.o obj-i386-y += device-hotplug.o pci-hotplug.o smbios.o wdt_ib700.o -obj-i386-y += extboot.o obj-i386-y += debugcon.o multiboot.o obj-i386-y += pc_piix.o obj-i386-$(CONFIG_KVM) += kvmclock.o
blockdev.c +4 -11
@@ -16,8 +16,6 @@#include "sysemu.h" #include "block_int.h" -DriveInfo *extboot_drive =NULL ; - static QTAILQ_HEAD(drivelist, DriveInfo) drives = QTAILQ_HEAD_INITIALIZER(drives);static const char *const if_name[IF_COUNT ] = {
@@ -237,7 +235,6 @@ DriveInfo *drive_init(QemuOpts *opts, int default_to_scsi)int on_read_error, on_write_error;const char *devaddr;DriveInfo *dinfo; -int is_extboot =0 ;int snapshot =0 ;int ret;
@@ -356,10 +353,10 @@ DriveInfo *drive_init(QemuOpts *opts, int default_to_scsi) } } - is_extboot =qemu_opt_get_bool (opts,"boot" ,0 ); -if (is_extboot && extboot_drive) { -fprintf (stderr,"qemu: two bootable drives specified\n" ); -return NULL ; +if (qemu_opt_get (opts,"boot" ) !=NULL ) { +fprintf (stderr,"qemu-kvm: boot=on|off is deprecated and will be " +"ignored. Future versions will reject this parameter. Please " +"update your scripts.\n" ); } on_write_error =BLOCK_ERR_STOP_ENOSPC ;
@@ -467,10 +464,6 @@ DriveInfo *drive_init(QemuOpts *opts, int default_to_scsi)strncpy (dinfo->serial, serial,sizeof (dinfo->serial) -1 );QTAILQ_INSERT_TAIL (&drives, dinfo, next); -if (is_extboot) { - extboot_drive = dinfo; - } -bdrv_set_on_error (dinfo->bdrv, on_read_error, on_write_error);switch (type) {
blockdev.h +0 -2
@@ -66,6 +66,4 @@ int do_drive_del(Monitor *mon, const QDict *qdict, QObject **ret_data);int do_snapshot_blkdev (Monitor *mon,const QDict *qdict,QObject **ret_data);int do_block_resize (Monitor *mon,const QDict *qdict,QObject **ret_data); -extern DriveInfo *extboot_drive; -#endif
hw/extboot.c deleted +0 -123
123 lines not on this page · raw message
hw/pc.c +0 -18
@@ -59,7 +59,6 @@#endif #define BIOS_FILENAME "bios.bin" -#define EXTBOOT_FILENAME "extboot.bin"#define VAPIC_FILENAME "vapic.bin"#define PC_MAX_BIOS_SIZE (4 * 1024 * 1024)
@@ -1050,11 +1049,6 @@ void pc_memory_init(MemoryRegion *system_memory, (uint32_t )(-bios_size), bios); -if (extboot_drive) { - option_rom[nb_option_roms].name =g_strdup (EXTBOOT_FILENAME ); - option_rom[nb_option_roms].bootindex =0 ; - nb_option_roms++; - } option_rom[nb_option_roms].name =g_strdup (VAPIC_FILENAME ); option_rom[nb_option_roms].bootindex =-1 ; nb_option_roms++;
@@ -1206,16 +1200,4 @@ void pc_pci_device_init(PCIBus *pci_bus)for (bus =0 ; bus <= max_bus; bus++) {pci_create_simple (pci_bus,-1 ,"lsi53c895a" ); } - -if (extboot_drive) { -DriveInfo *info = extboot_drive; -int cyls, heads, secs; - -if (info->type !=IF_IDE && info->type !=IF_VIRTIO ) { -bdrv_guess_geometry (info->bdrv, &cyls, &heads, &secs); -bdrv_set_geometry_hint (info->bdrv, cyls, heads, secs); - } - -extboot_init (info->bdrv); - } }
hw/pc.h +0 -4
@@ -252,10 +252,6 @@ static inline bool isa_ne2000_init(int base, int irq, NICInfo *nd)return true; } -/* extboot.c */ - -void extboot_init (BlockDriverState *bs); -/* e820 types */ #define E820_RAM 1#define E820_RESERVED 2
pc-bios/optionrom/Makefile +1 -1
@@ -16,7 +16,7 @@ QEMU_CFLAGS = $(CFLAGS) build-all: multiboot.bin linuxboot.bin -build-all: extboot.bin vapic.bin +build-all: vapic.bin %.img: %.o $(call quiet-command,$(LD) -Ttext 0 -e _start -s -o $@ $<," Building $(TARGET_DIR)$@")
pc-bios/optionrom/extboot.S deleted +0 -691
691 lines not on this page · raw message
qemu-config.c +1 -1
@@ -88,7 +88,7 @@ static QemuOptsList qemu_drive_opts = { },{ .name = "boot", .type = QEMU_OPT_BOOL, - .help = "make this a boot drive", + .help = "(deprecated, ignored)", }, {/* end of list */ } },
qemu-options.hx +1 -3
@@ -135,7 +135,7 @@ DEF("drive", HAS_ARG, QEMU_OPTION_drive, " [,cyls=c,heads=h,secs=s[,trans=t]][,snapshot=on|off]\n" " [,cache=writethrough|writeback|none|directsync|unsafe][,format=f]\n" " [,serial=s][,addr=A][,id=name][,aio=threads|native]\n" - " [,readonly=on|off][,boot=on|off]\n" + " [,readonly=on|off]\n" " use 'file' as a drive image\n", QEMU_ARCH_ALL) STEXI @item -drive @var{option}[,@var{option}[,@var{option}[,...]]]
@@ -183,8 +183,6 @@ host disk is full; report the error to the guest otherwise). The default setting is @option{werror=enospc} and @option{rerror=report}. @item readonly Open drive @option{file} as read-only. Guest write attempts will fail. -@item boot=@var{boot} -@var{boot} is "on" or "off" and allows for booting from non-traditional interfaces, such as virtio. @end table By default, writethrough caching is used for all block device. This means that
Signature · 1 line
1.7.3.4
PATCH 1/1 qemu-kvm: Deprecate drive parameter boot=on|off
Quoted 8 lines · Jan Kiszka
Except for booting from SCSI via the LSI controller, SeaBIOS has native support for mass storage interfaces now. And SCSI can be worked around via [1] - or someone finally adds the necessary bits to SeaBIOS if there is a real need.
As there might be still scripts around that append "boot=on", continue to parse it, but ignore it and issue a deprecation warning instead.
Quoted 8 lines
[1] http://thread.gmane.org/gmane.comp.emulators.qemu/78467
Signed-off-by Jan Kiszka <[email protected]>---
Changes in v2:
- restore accidentally removed VAPIC option ROM installation
- continue to parse boot=on|off
As a different version was merged now, here is the required delta patch:
-----8<-----
From: Jan Kiszka <[email protected]>
We do not want to maintain this option forever. It will be removed after a grace period of a few releases. So warn the user that this option has no effect and will become invalid soon.
--- blockdev.c | 6 ++++++ qemu-config.c | 2 +- 2 files changed, 7 insertions(+), 1 deletions(-)
blockdev.c +6 -0
@@ -353,6 +353,12 @@ DriveInfo *drive_init(QemuOpts *opts, int default_to_scsi) } } +if (qemu_opt_get (opts,"boot" ) !=NULL ) { +fprintf (stderr,"qemu-kvm: boot=on|off is deprecated and will be " +"ignored. Future versions will reject this parameter. Please " +"update your scripts.\n" ); + } + on_write_error =BLOCK_ERR_STOP_ENOSPC ;if ((buf =qemu_opt_get (opts,"werror" )) !=NULL ) {if (type !=IF_IDE && type !=IF_SCSI && type !=IF_VIRTIO && type !=IF_NONE ) {
qemu-config.c +1 -1
@@ -88,7 +88,7 @@ static QemuOptsList qemu_drive_opts = { },{ .name = "boot", .type = QEMU_OPT_BOOL, - .help = "make this a boot drive", + .help = "(deprecated, ignored)", }, {/* end of list */ } },
Avi Kivity
AppliedRe: [PATCH] qemu-kvm: Deprecate drive parameter boot=on|off
Quoted 5 lines · Jan Kiszka
We do not want to maintain this option forever. It will be removed after a grace period of a few releases. So warn the user that this option has no effect and will become invalid soon.
Thanks, applied.
Signature · 1 line
error compiling committee.c: too many arguments to function