[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 05/25] ide: only constrain read/write requests to dr
From: |
Michael Roth |
Subject: |
[Qemu-devel] [PATCH 05/25] ide: only constrain read/write requests to drive size, not other types |
Date: |
Wed, 27 Aug 2014 12:36:02 -0500 |
From: Michael Tokarev <address@hidden>
Commit 58ac321135a introduced a check to ide dma processing which
constrains all requests to drive size. However, apparently, some
valid requests (like TRIM) does not fit in this constraint, and
fails in 2.1. So check the range only for reads and writes.
Cc: address@hidden
Signed-off-by: Michael Tokarev <address@hidden>
Signed-off-by: Markus Armbruster <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
(cherry picked from commit d66168ed687325aa6d338ce3a3cff18ce3098ed6)
Signed-off-by: Michael Roth <address@hidden>
---
hw/ide/core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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;
--
1.9.1
- [Qemu-devel] Patch Round-up for stable 2.1.1, freeze on 2014-09-03, Michael Roth, 2014/08/27
- [Qemu-devel] [PATCH 03/25] vfio: Fix MSI-X vector expansion, Michael Roth, 2014/08/27
- [Qemu-devel] [PATCH 04/25] l2tpv3 (configure): it is linux-specific, Michael Roth, 2014/08/27
- [Qemu-devel] [PATCH 07/25] hw:i386: typo fix: MEMORY_HOPTLUG_DEVICE -> MEMORY_HOTPLUG_DEVICE, Michael Roth, 2014/08/27
- [Qemu-devel] [PATCH 02/25] qdev-monitor: include QOM properties in -device FOO, help output, Michael Roth, 2014/08/27
- [Qemu-devel] [PATCH 05/25] ide: only constrain read/write requests to drive size, not other types,
Michael Roth <=
- [Qemu-devel] [PATCH 08/25] pc-dimm: validate node property, Michael Roth, 2014/08/27
- [Qemu-devel] [PATCH 10/25] numa: show hex number in error message for consistency and prefix them with 0x, Michael Roth, 2014/08/27
- [Qemu-devel] [PATCH 09/25] pc-dimm: fix up error message, Michael Roth, 2014/08/27
- [Qemu-devel] [PATCH 06/25] pci: Use bus master address space for delivering MSI/MSI-X messages, Michael Roth, 2014/08/27
- [Qemu-devel] [PATCH 12/25] virtio-blk: fix reference a pointer which might be freed, Michael Roth, 2014/08/27
- [Qemu-devel] [PATCH 13/25] target-arm: Fix return address for A64 BRK instructions, Michael Roth, 2014/08/27
- [Qemu-devel] [PATCH 11/25] acpi: align RSDP, Michael Roth, 2014/08/27
- [Qemu-devel] [PATCH 16/25] block/iscsi: fix memory corruption on iscsi resize, Michael Roth, 2014/08/27