aboutsummaryrefslogtreecommitdiffstats
path: root/main/qemu
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-05-04 13:29:36 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2011-05-04 13:29:36 +0000
commit0d95e358e189f366f6610cbd0bfc227b44d00826 (patch)
treeed2ec92ad737559f87c44c3c27207493fd68fbf1 /main/qemu
parente5055ad583bb78dba75d943bcef5921f19e0d63d (diff)
downloadaports-0d95e358e189f366f6610cbd0bfc227b44d00826.tar.bz2
aports-0d95e358e189f366f6610cbd0bfc227b44d00826.tar.xz
main/qemu: add patch for vhost and remove unused patches
Diffstat (limited to 'main/qemu')
-rw-r--r--main/qemu/APKBUILD4
-rw-r--r--main/qemu/kqemu.patch32
-rw-r--r--main/qemu/qemu-0.10.3-nopl-fix.patch32
-rw-r--r--main/qemu/qemu-vhost-fix-dirty-page-handling.patch31
4 files changed, 34 insertions, 65 deletions
diff --git a/main/qemu/APKBUILD b/main/qemu/APKBUILD
index 8d9d4ac229..abf3c855a7 100644
--- a/main/qemu/APKBUILD
+++ b/main/qemu/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=qemu
pkgver=0.14.0
-pkgrel=0
+pkgrel=1
pkgdesc="QEMU is a generic machine emulator and virtualizer"
url="http://www.nongnu.org/qemu/"
arch="all"
@@ -30,6 +30,7 @@ $pkgname-img
"
source="http://savannah.nongnu.org/download/$pkgname/$pkgname-$pkgver.tar.gz
qemu-libm.patch
+ qemu-vhost-fix-dirty-page-handling.patch
80-kvm.rules
"
@@ -107,4 +108,5 @@ img() {
md5sums="f9d145d5c09de9f0984ffe9bd1229970 qemu-0.14.0.tar.gz
70a4336c31600ce00838b056f0d08452 qemu-libm.patch
+07ac0525259a8a5a98c441cbbdceceef qemu-vhost-fix-dirty-page-handling.patch
66660f143235201249dc0648b39b86ee 80-kvm.rules"
diff --git a/main/qemu/kqemu.patch b/main/qemu/kqemu.patch
deleted file mode 100644
index 337a356ce1..0000000000
--- a/main/qemu/kqemu.patch
+++ /dev/null
@@ -1,32 +0,0 @@
---- a/kqemu.c 2009-07-17 00:56:23.000000000 +0000
-+++ b/kqemu.c 2009-08-22 13:20:00.000000000 +0000
-@@ -93,9 +93,9 @@
- int qpi_io_memory;
- uint32_t kqemu_comm_base; /* physical address of the QPI communication page */
-
--#define cpuid(index, eax, ebx, ecx, edx) \
-+#define cpuid(index, eax, ecx, edx) \
- asm volatile ("cpuid" \
-- : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx) \
-+ : "=a" (eax), "=c" (ecx), "=d" (edx) \
- : "0" (index))
-
- #ifdef __x86_64__
-@@ -125,7 +125,7 @@
- static void kqemu_update_cpuid(CPUState *env)
- {
- int critical_features_mask, features, ext_features, ext_features_mask;
-- uint32_t eax, ebx, ecx, edx;
-+ uint32_t eax, ecx, edx;
-
- /* the following features are kept identical on the host and
- target cpus because they are important for user code. Strictly
-@@ -140,7 +140,7 @@
- features = 0;
- ext_features = 0;
- } else {
-- cpuid(1, eax, ebx, ecx, edx);
-+ cpuid(1, eax, ecx, edx);
- features = edx;
- ext_features = ecx;
- }
diff --git a/main/qemu/qemu-0.10.3-nopl-fix.patch b/main/qemu/qemu-0.10.3-nopl-fix.patch
deleted file mode 100644
index bdef0efc35..0000000000
--- a/main/qemu/qemu-0.10.3-nopl-fix.patch
+++ /dev/null
@@ -1,32 +0,0 @@
---- i386-dis.c 2009-03-22 00:05:48.000000000 +0100
-+++ i386-dis_new.c 2009-04-21 08:31:08.000000000 +0200
-@@ -784,13 +784,13 @@
- { "movhpX", EX, XM, SIMD_Fixup, 'l' },
- /* 18 */
- { GRP14 },
-- { "(bad)", XX, XX, XX },
-- { "(bad)", XX, XX, XX },
-- { "(bad)", XX, XX, XX },
-- { "(bad)", XX, XX, XX },
-- { "(bad)", XX, XX, XX },
-- { "(bad)", XX, XX, XX },
-- { "(bad)", XX, XX, XX },
-+ { "nopQ", Ev, XX, XX },
-+ { "nopQ", Ev, XX, XX },
-+ { "nopQ", Ev, XX, XX },
-+ { "nopQ", Ev, XX, XX },
-+ { "nopQ", Ev, XX, XX },
-+ { "nopQ", Ev, XX, XX },
-+ { "nopQ", Ev, XX, XX },
- /* 20 */
- { "movL", Rm, Cm, XX },
- { "movL", Rm, Dm, XX },
-@@ -1072,7 +1072,7 @@
- /* 0 1 2 3 4 5 6 7 8 9 a b c d e f */
- /* ------------------------------- */
- /* 00 */ 1,1,1,1,0,0,0,0,0,0,0,0,0,1,0,1, /* 0f */
-- /* 10 */ 1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0, /* 1f */
-+ /* 10 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 1f */
- /* 20 */ 1,1,1,1,1,0,1,0,1,1,1,1,1,1,1,1, /* 2f */
- /* 30 */ 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 3f */
- /* 40 */ 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, /* 4f */
diff --git a/main/qemu/qemu-vhost-fix-dirty-page-handling.patch b/main/qemu/qemu-vhost-fix-dirty-page-handling.patch
new file mode 100644
index 0000000000..e3fabb74aa
--- /dev/null
+++ b/main/qemu/qemu-vhost-fix-dirty-page-handling.patch
@@ -0,0 +1,31 @@
+vhost was passing a physical address to cpu_physical_memory_set_dirty,
+which is wrong: we need to translate to ram address first.
+
+Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
+
+Note: this lead to crashes during migration, so the patch
+is needed on the stable branch too.
+
+---
+ hw/vhost.c | 4 +++-
+ 1 files changed, 3 insertions(+), 1 deletions(-)
+
+diff --git a/hw/vhost.c b/hw/vhost.c
+index aaa34e4..97a1299 100644
+--- a/hw/vhost.c
++++ b/hw/vhost.c
+@@ -49,8 +49,10 @@ static void vhost_dev_sync_region(struct vhost_dev *dev,
+ log = __sync_fetch_and_and(from, 0);
+ while ((bit = sizeof(log) > sizeof(int) ?
+ ffsll(log) : ffs(log))) {
++ ram_addr_t ram_addr;
+ bit -= 1;
+- cpu_physical_memory_set_dirty(addr + bit * VHOST_LOG_PAGE);
++ ram_addr = cpu_get_physical_page_desc(addr + bit * VHOST_LOG_PAGE);
++ cpu_physical_memory_set_dirty(ram_addr);
+ log &= ~(0x1ull << bit);
+ }
+ addr += VHOST_LOG_CHUNK;
+--
+1.7.3.2.91.g446ac
+