From: | "Doug Goldstein (cardoe)" <cardoe@g.o> |
---|---|
To: | gentoo-commits@l.g.o |
Subject: | [gentoo-commits] gentoo-x86 commit in app-emulation/qemu-kvm/files: qemu-kvm-0.12.2-virtio-large-iovecs.patch |
Date: | Wed, 03 Feb 2010 05:41:19 |
Message-Id: | E1NcXzJ-0006Yt-4O@stork.gentoo.org |
1 | cardoe 10/02/03 05:41:17 |
2 | |
3 | Added: qemu-kvm-0.12.2-virtio-large-iovecs.patch |
4 | Log: |
5 | upstream fix for virtio and certain use cases. Fixes issues people have seen with Ubuntu 10.04 guests and other distros |
6 | (Portage version: 2.1.7.16/cvs/Linux x86_64) |
7 | |
8 | Revision Changes Path |
9 | 1.1 app-emulation/qemu-kvm/files/qemu-kvm-0.12.2-virtio-large-iovecs.patch |
10 | |
11 | file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-emulation/qemu-kvm/files/qemu-kvm-0.12.2-virtio-large-iovecs.patch?rev=1.1&view=markup |
12 | plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/app-emulation/qemu-kvm/files/qemu-kvm-0.12.2-virtio-large-iovecs.patch?rev=1.1&content-type=text/plain |
13 | |
14 | Index: qemu-kvm-0.12.2-virtio-large-iovecs.patch |
15 | =================================================================== |
16 | Index: qemu/block.c |
17 | =================================================================== |
18 | --- qemu.orig/block.c 2010-01-26 10:59:39.757004445 +0100 |
19 | +++ qemu/block.c 2010-01-26 11:01:38.056023231 +0100 |
20 | @@ -1689,6 +1689,10 @@ static int multiwrite_merge(BlockDriverS |
21 | merge = bs->drv->bdrv_merge_requests(bs, &reqs[outidx], &reqs[i]); |
22 | } |
23 | |
24 | + if (reqs[outidx].qiov->niov + reqs[i].qiov->niov + 1 > IOV_MAX) { |
25 | + merge = 0; |
26 | + } |
27 | + |
28 | if (merge) { |
29 | size_t size; |
30 | QEMUIOVector *qiov = qemu_mallocz(sizeof(*qiov)); |
31 | Index: qemu/qemu-common.h |
32 | =================================================================== |
33 | --- qemu.orig/qemu-common.h 2010-01-26 14:41:40.894254285 +0100 |
34 | +++ qemu/qemu-common.h 2010-01-26 14:42:27.267275698 +0100 |
35 | @@ -54,6 +54,10 @@ struct iovec { |
36 | void *iov_base; |
37 | size_t iov_len; |
38 | }; |
39 | +/* |
40 | + * Use the same value as Linux for now. |
41 | + */ |
42 | +#define IOV_MAX 1024 |
43 | #else |
44 | #include <sys/uio.h> |
45 | #endif |