summaryrefslogtreecommitdiff
path: root/qemu
diff options
context:
space:
mode:
authorThomas Penteker <tek@serverop.de>2014-08-28 20:18:59 +0200
committerThomas Penteker <tek@serverop.de>2014-08-28 20:18:59 +0200
commit32c2168e1fa84a3b6ea18524bb33a2f8cfa1572b (patch)
treef431887b04291c22498ac9d54df05b513c72dc3d /qemu
parentd025294eb7f5529053ac55c0664adb75b459ddc3 (diff)
downloadopt-32c2168e1fa84a3b6ea18524bb33a2f8cfa1572b.tar.gz
opt-32c2168e1fa84a3b6ea18524bb33a2f8cfa1572b.tar.xz
qemu: include fix for TRIM passthrough for IDE devices
Diffstat (limited to 'qemu')
-rw-r--r--qemu/.md5sum1
-rw-r--r--qemu/Pkgfile6
-rw-r--r--qemu/fix-trim-ide.patch14
3 files changed, 19 insertions, 2 deletions
diff --git a/qemu/.md5sum b/qemu/.md5sum
index 1db3d6de5..132400b10 100644
--- a/qemu/.md5sum
+++ b/qemu/.md5sum
@@ -1 +1,2 @@
+4d032f7e42c4f75dc71701f92077a85a fix-trim-ide.patch
6726977292b448cbc7f89998fac6983b qemu-2.1.0.tar.bz2
diff --git a/qemu/Pkgfile b/qemu/Pkgfile
index bd5672fbe..cfdeac1f7 100644
--- a/qemu/Pkgfile
+++ b/qemu/Pkgfile
@@ -7,12 +7,14 @@
name=qemu
version=2.1.0
-release=1
-source=(http://wiki.qemu.org/download/qemu-$version.tar.bz2)
+release=2
+source=(http://wiki.qemu.org/download/qemu-$version.tar.bz2 fix-trim-ide.patch)
build() {
cd $name-$version
+ # fix TRIM passthrough for IDE devices
+ patch -p1 -i $SRC/fix-trim-ide.patch
./configure --prefix=/usr \
--cc="${CC:=gcc}" \
diff --git a/qemu/fix-trim-ide.patch b/qemu/fix-trim-ide.patch
new file mode 100644
index 000000000..65714e0ca
--- /dev/null
+++ b/qemu/fix-trim-ide.patch
@@ -0,0 +1,14 @@
+diff --git a/hw/ide/core.c b/hw/ide/core.c
+index db191a6..7256592 100644
+--- a/hw/ide/core.c
++++ b/hw/ide/core.c
+@@ -688,7 +688,8 @@ void ide_dma_cb(void *opaque, int ret)
+ sector_num, n, s->dma_cmd);
+ #endif
+
+- if (!ide_sect_range_ok(s, sector_num, n)) {
++ if ((s->dma_cmd == IDE_DMA_READ || s->dma_cmd == IDE_DMA_WRITE) &&
++ !ide_sect_range_ok(s, sector_num, n)) {
+ dma_buf_commit(s);
+ ide_dma_error(s);
+ return;

Generated by cgit