diff --git a/kvm-upstream-ppc.patch b/kvm-upstream-ppc.patch index bc3189f..5423ebe 100644 --- a/kvm-upstream-ppc.patch +++ b/kvm-upstream-ppc.patch @@ -1,7 +1,7 @@ -From 796d42657fb238cf23a78620051f533662557e2b Mon Sep 17 00:00:00 2001 +From b16ca7f06c09f46cc6dda7c49a31edc9a3325956 Mon Sep 17 00:00:00 2001 From: Glauber Costa -Date: Fri, 13 Feb 2009 13:00:31 -0500 -Subject: [PATCH] use KVM_UPSTREAM for ppc. +Date: Wed, 24 Jun 2009 14:22:57 +0100 +Subject: [PATCH 1/7] use KVM_UPSTREAM for ppc. ppc should compile with upstream qemu code, so, put these defines in ppc specific code that references kvm functions. @@ -11,17 +11,18 @@ files (like vl.c) that includes both kvm.h and qemu-kvm.h, and would break compilation. Signed-off-by: Glauber Costa +Signed-off-by: Mark McLoughlin --- hw/ppc440.c | 1 + hw/ppc440_bamboo.c | 1 + hw/ppce500_mpc8544ds.c | 1 + - target-ppc/helper.c | 2 +- - 4 files changed, 4 insertions(+), 1 deletion(-) + target-ppc/helper.c | 1 + + 4 files changed, 4 insertions(+), 0 deletions(-) -Index: qemu-kvm-0.10.4/hw/ppc440.c -=================================================================== ---- qemu-kvm-0.10.orig/qemu/hw/ppc440.c -+++ qemu-kvm-0.10.4/hw/ppc440.c +diff --git a/hw/ppc440.c b/hw/ppc440.c +index 00d82e4..164c326 100644 +--- a/hw/ppc440.c ++++ b/hw/ppc440.c @@ -18,6 +18,7 @@ #include "ppc440.h" #include "ppc405.h" @@ -30,10 +31,10 @@ Index: qemu-kvm-0.10.4/hw/ppc440.c #include "kvm.h" #define PPC440EP_PCI_CONFIG 0xeec00000 -Index: qemu-kvm-0.10.4/hw/ppc440_bamboo.c -=================================================================== ---- qemu-kvm-0.10.orig/qemu/hw/ppc440_bamboo.c -+++ qemu-kvm-0.10.4/hw/ppc440_bamboo.c +diff --git a/hw/ppc440_bamboo.c b/hw/ppc440_bamboo.c +index 6963309..cf5b35b 100644 +--- a/hw/ppc440_bamboo.c ++++ b/hw/ppc440_bamboo.c @@ -21,6 +21,7 @@ #include "boards.h" #include "sysemu.h" @@ -42,10 +43,10 @@ Index: qemu-kvm-0.10.4/hw/ppc440_bamboo.c #include "kvm.h" #include "kvm_ppc.h" #include "device_tree.h" -Index: qemu-kvm-0.10.4/hw/ppce500_mpc8544ds.c -=================================================================== ---- qemu-kvm-0.10.orig/qemu/hw/ppce500_mpc8544ds.c -+++ qemu-kvm-0.10.4/hw/ppce500_mpc8544ds.c +diff --git a/hw/ppce500_mpc8544ds.c b/hw/ppce500_mpc8544ds.c +index d946f03..4692c96 100644 +--- a/hw/ppce500_mpc8544ds.c ++++ b/hw/ppce500_mpc8544ds.c @@ -16,6 +16,7 @@ #include @@ -54,10 +55,10 @@ Index: qemu-kvm-0.10.4/hw/ppce500_mpc8544ds.c #include "config.h" #include "qemu-common.h" #include "net.h" -Index: qemu-kvm-0.10.4/target-ppc/helper.c -=================================================================== ---- qemu-kvm-0.10.orig/qemu/target-ppc/helper.c -+++ qemu-kvm-0.10.4/target-ppc/helper.c +diff --git a/target-ppc/helper.c b/target-ppc/helper.c +index db765e3..721d467 100644 +--- a/target-ppc/helper.c ++++ b/target-ppc/helper.c @@ -29,6 +29,7 @@ #include "exec-all.h" #include "helper_regs.h" @@ -66,3 +67,6 @@ Index: qemu-kvm-0.10.4/target-ppc/helper.c #include "kvm.h" //#define DEBUG_MMU +-- +1.6.2.2 + diff --git a/qemu-add-cache-utils-to-block-objs.patch b/qemu-add-cache-utils-to-block-objs.patch deleted file mode 100644 index 530d5ac..0000000 --- a/qemu-add-cache-utils-to-block-objs.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff -up qemu-kvm-devel-85/qemu/Makefile.add-cache-utils-to-block-objs qemu-kvm-devel-85/qemu/Makefile ---- qemu-kvm-devel-85/qemu/Makefile.add-cache-utils-to-block-objs 2009-04-27 15:54:16.000000000 +0100 -+++ qemu-kvm-devel-85/qemu/Makefile 2009-04-27 15:53:51.000000000 +0100 -@@ -49,7 +49,7 @@ recurse-all: $(SUBDIR_RULES) - ####################################################################### - # BLOCK_OBJS is code used by both qemu system emulation and qemu-img - --BLOCK_OBJS=cutils.o qemu-malloc.o -+BLOCK_OBJS=cutils.o cache-utils.o qemu-malloc.o - BLOCK_OBJS+=block-cow.o block-qcow.o aes.o block-vmdk.o block-cloop.o - BLOCK_OBJS+=block-dmg.o block-bochs.o block-vpc.o block-vvfat.o - BLOCK_OBJS+=block-qcow2.o block-parallels.o block-nbd.o diff --git a/qemu-avoid-harmless-msr-warnings.patch b/qemu-avoid-harmless-msr-warnings.patch index 76ed787..6e4fbc7 100644 --- a/qemu-avoid-harmless-msr-warnings.patch +++ b/qemu-avoid-harmless-msr-warnings.patch @@ -1,7 +1,7 @@ -From d283d5a65a2bdcc570065267be21848bd6fe3d78 Mon Sep 17 00:00:00 2001 +From 3084ee6394248dd27946acb609c758d0778d7b9a Mon Sep 17 00:00:00 2001 From: Marcelo Tosatti -Date: Thu, 7 May 2009 15:48:48 -0300 -Subject: [PATCH 1/1] Avoid harmless unhandled wrmsr 0xc0010117 messages +Date: Wed, 24 Jun 2009 14:38:34 +0100 +Subject: [PATCH 6/7] Avoid harmless unhandled wrmsr 0xc0010117 messages Olders kernel which don't contain kvm.git commit 61a6bd672bda3b9468bf5895c1be085c4e481138 display the following message: @@ -15,12 +15,13 @@ how MSR_STAR is handled. Signed-off-by: Marcelo Tosatti Signed-off-by: Avi Kivity +Signed-off-by: Mark McLoughlin --- qemu-kvm-x86.c | 15 +++++++++++---- 1 files changed, 11 insertions(+), 4 deletions(-) diff --git a/qemu-kvm-x86.c b/qemu-kvm-x86.c -index 98aa530..1096e65 100644 +index 856b70c..505cc4c 100644 --- a/qemu-kvm-x86.c +++ b/qemu-kvm-x86.c @@ -25,6 +25,7 @@ @@ -69,5 +70,5 @@ index 98aa530..1096e65 100644 if (lm_capable_kernel) { msrs[n++].index = MSR_CSTAR; -- -1.6.0.6 +1.6.2.2 diff --git a/qemu-bios-bigger-roms.patch b/qemu-bios-bigger-roms.patch index de544a1..bef763a 100644 --- a/qemu-bios-bigger-roms.patch +++ b/qemu-bios-bigger-roms.patch @@ -1,8 +1,31 @@ +From 3a9288fab031a820afa7be96e355c28ded1546bf Mon Sep 17 00:00:00 2001 +From: Glauber Costa +Date: Wed, 24 Jun 2009 14:31:41 +0100 +Subject: [PATCH 2/7] compute checksum for roms bigger than a segment + +Some option roms (e1000 provided by gpxe project as an example) +are bigger than a segment. The current algorithm to compute the +checksum fails in such case. To proper compute the checksum, this +patch deals with the possibility of the rom's size crossing a +segment border. + +We don't need to worry about it crossing more than one segment +border, since the option roms format only save one byte to store +the image size (thus, maximum size = 0xff = 128k = 2 segments) + +[ including improvements suggested by malc ] + +Signed-off-by: Glauber Costa +Signed-off-by: Mark McLoughlin +--- + kvm/bios/rombios.c | 33 +++++++++++++++++++++++++++------ + 1 files changed, 27 insertions(+), 6 deletions(-) + diff --git a/kvm/bios/rombios.c b/kvm/bios/rombios.c -index c4f6ccd..c4bfe60 100644 +index 6186199..fc289c0 100644 --- a/kvm/bios/rombios.c +++ b/kvm/bios/rombios.c -@@ -10196,22 +10196,43 @@ no_serial: +@@ -10170,22 +10170,43 @@ no_serial: ret rom_checksum: @@ -50,3 +73,8 @@ index c4f6ccd..c4bfe60 100644 + pop ds + popa ret + + +-- +1.6.2.2 + diff --git a/qemu-disable-preadv.patch b/qemu-disable-preadv.patch index 32e4dbe..184a052 100644 --- a/qemu-disable-preadv.patch +++ b/qemu-disable-preadv.patch @@ -1,7 +1,20 @@ -diff -up qemu-kvm-devel-86/configure.disable-preadv qemu-kvm-devel-86/configure ---- qemu-kvm-devel-86/configure.disable-preadv 2009-04-27 16:09:05.000000000 +0100 -+++ qemu-kvm-devel-86/configure 2009-04-27 16:09:36.000000000 +0100 -@@ -1189,9 +1189,9 @@ cat > $TMPC < +Date: Wed, 24 Jun 2009 16:34:48 +0100 +Subject: [PATCH 4/7] Disable preadv()/pwritev() until bug corruption is fixed + +See https://bugzilla.redhat.com/497429 + +Signed-off-by: Mark McLoughlin +--- + configure | 6 +++--- + 1 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/configure b/configure +index dcb9ff9..3463ec2 100755 +--- a/configure ++++ b/configure +@@ -1264,9 +1264,9 @@ cat > $TMPC < Date: Mon, 27 Apr 2009 10:18:14 +0100 -Subject: [PATCH] kvm: qemu: framebuffer: build fix for target-arm +Subject: [PATCH 3/7] kvm: qemu: framebuffer: build fix for target-arm Include qemu-kvm.h for non-KVM_UPSTREAM building and surround the kvm code with USE_KVM guards. @@ -41,5 +42,5 @@ index 1086ba9..e2d7604 100644 pd2 = cpu_get_physical_page_desc(base + src_len - 1); /* We should reall check that this is a continuous ram region. -- -1.6.0.6 +1.6.2.2 diff --git a/qemu-fix-cpuid-trimming.patch b/qemu-fix-cpuid-trimming.patch index a52ea53..0abe407 100644 --- a/qemu-fix-cpuid-trimming.patch +++ b/qemu-fix-cpuid-trimming.patch @@ -1,10 +1,14 @@ +From 5ce45fee67cca7b2a7dc240f71898cbfab0ab917 Mon Sep 17 00:00:00 2001 From: Mark McLoughlin -Subject: [PATCH] Work around supported cpuid ioctl() brokenness +Date: Tue, 12 May 2009 12:42:42 +0100 +Subject: [PATCH 7/7] Work around supported cpuid ioctl() brokenness KVM_GET_SUPPORTED_CPUID has been known to fail to return -E2BIG when it runs out of entries. Detect this by always trying again with a bigger table if the ioctl() fills the table. +(cherry picked from commit 8fa3b3ce6ed2a12062422b75d5b4ab9eab0ae4e9) + Signed-off-by: Mark McLoughlin Signed-off-by: Avi Kivity --- @@ -25,5 +29,5 @@ index a2f6320..4f9539a 100644 if (r == -E2BIG) { free(cpuid); -- -1.6.0.6 +1.6.2.2 diff --git a/qemu-prevent-cdrom-media-eject-while-device-is-locked.patch b/qemu-prevent-cdrom-media-eject-while-device-is-locked.patch index 0142ec8..b1ee1a0 100644 --- a/qemu-prevent-cdrom-media-eject-while-device-is-locked.patch +++ b/qemu-prevent-cdrom-media-eject-while-device-is-locked.patch @@ -1,5 +1,7 @@ +From b9052762b5ae94ff7027f0fd0916b1c289bfffef Mon Sep 17 00:00:00 2001 From: Mark McLoughlin -Subject: [PATCH] Prevent CD-ROM media eject while device is locked +Date: Wed, 27 May 2009 10:06:11 +0100 +Subject: [PATCH 5/7] Prevent CD-ROM media eject while device is locked Section 10.8.25 ("START/STOP UNIT Command") of SFF-8020i states that if the device is locked we should refuse to eject if the device is @@ -13,7 +15,10 @@ if the drive has been previously locked. See also https://bugzilla.redhat.com/501412 +(cherry picked from commit aea2a33c73f28ecd8f10b242ecadddcc79c1c28b) + Signed-off-by: Mark McLoughlin +Signed-off-by: Anthony Liguori --- block.c | 9 ++++++++- block.h | 2 +- @@ -21,10 +26,10 @@ Signed-off-by: Mark McLoughlin 3 files changed, 27 insertions(+), 10 deletions(-) diff --git a/block.c b/block.c -index 9a2873f..863897a 100644 +index acb8976..b619147 100644 --- a/block.c +++ b/block.c -@@ -1591,11 +11591,15 @@ int bdrv_media_changed(BlockDriverState *bs) +@@ -1591,11 +1591,15 @@ int bdrv_media_changed(BlockDriverState *bs) /** * If eject_flag is TRUE, eject the media. Otherwise, close the tray */ @@ -41,7 +46,7 @@ index 9a2873f..863897a 100644 if (!drv || !drv->bdrv_eject) { ret = -ENOTSUP; } else { -@@ -1604,7 +1604,10 @@ void bdrv_eject(BlockDriverState *bs, int eject_flag) +@@ -1604,7 +1608,10 @@ void bdrv_eject(BlockDriverState *bs, int eject_flag) if (ret == -ENOTSUP) { if (eject_flag) bdrv_close(bs); @@ -53,7 +58,7 @@ index 9a2873f..863897a 100644 int bdrv_is_locked(BlockDriverState *bs) diff --git a/block.h b/block.h -index 979781a..e1070e9 100644 +index 5aef076..a4789b2 100644 --- a/block.h +++ b/block.h @@ -136,7 +136,7 @@ int bdrv_is_inserted(BlockDriverState *bs); @@ -66,7 +71,7 @@ index 979781a..e1070e9 100644 void (*change_cb)(void *opaque), void *opaque); void bdrv_get_format(BlockDriverState *bs, char *buf, int buf_size); diff --git a/hw/ide.c b/hw/ide.c -index 6ad1d08..9b93e7f 100644 +index b2a1288..2c918df 100644 --- a/hw/ide.c +++ b/hw/ide.c @@ -359,6 +359,7 @@ @@ -77,7 +82,7 @@ index 6ad1d08..9b93e7f 100644 #define CFA_NO_ERROR 0x00 #define CFA_MISC_ERROR 0x09 -@@ -1822,18 +1822,27 @@ static void ide_atapi_cmd(IDEState *s) +@@ -1822,18 +1823,27 @@ static void ide_atapi_cmd(IDEState *s) break; case GPCMD_START_STOP_UNIT: {