SHA256
1
0
forked from pool/qemu
qemu/qemu-0.9.0-kvm-bios.patch

56 lines
1.8 KiB
Diff

2007-03-14 Gwenole Beauchesne <gbeauchesne@mandriva.com>
* hw/pc.c (pc_init1): Use the KVM specific BIOS for now.
================================================================================
--- qemu-0.9.0/Makefile
+++ qemu-0.9.0/Makefile
@@ -77,7 +77,7 @@
mkdir -p "$(DESTDIR)$(bindir)"
$(INSTALL) -m 755 -s $(TOOLS) "$(DESTDIR)$(bindir)"
mkdir -p "$(DESTDIR)$(datadir)"
- for x in bios.bin vgabios.bin vgabios-cirrus.bin ppc_rom.bin \
+ for x in bios.bin kvm_bios.bin vgabios.bin vgabios-cirrus.bin ppc_rom.bin \
video.x openbios-sparc32 linux_boot.bin pxe-ne2k_pci.bin \
pxe-rtl8139.bin pxe-pcnet.bin; do \
$(INSTALL) -m 644 $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(datadir)"; \
@@ -157,6 +157,7 @@
$(bindir)/qemu-mipsel \
$(bindir)/qemu-img \
$(datadir)/bios.bin \
+ $(datadir)/kvm_bios.bin \
$(datadir)/vgabios.bin \
$(datadir)/vgabios-cirrus.bin \
$(datadir)/ppc_rom.bin \
--- qemu-0.9.0/hw/pc.c
+++ qemu-0.9.0/hw/pc.c
@@ -27,6 +27,7 @@
//#define DEBUG_BIOS
#define BIOS_FILENAME "bios.bin"
+#define KVM_BIOS_FILENAME "kvm_bios.bin"
#define VGABIOS_FILENAME "vgabios.bin"
#define VGABIOS_CIRRUS_FILENAME "vgabios-cirrus.bin"
#define LINUX_BOOT_FILENAME "linux_boot.bin"
@@ -460,6 +461,7 @@
int piix3_devfn = -1;
CPUState *env;
NICInfo *nd;
+ const char *bios_filename = BIOS_FILENAME;
linux_boot = (kernel_filename != NULL);
@@ -486,7 +488,11 @@
bios_offset = ram_size + vga_ram_size;
vga_bios_offset = bios_offset + 256 * 1024;
- snprintf(buf, sizeof(buf), "%s/%s", bios_dir, BIOS_FILENAME);
+#ifdef USE_KVM
+ if (kvm_allowed)
+ bios_filename = KVM_BIOS_FILENAME;
+#endif
+ snprintf(buf, sizeof(buf), "%s/%s", bios_dir, bios_filename);
bios_size = get_image_size(buf);
if (bios_size <= 0 ||
(bios_size % 65536) != 0 ||