[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 68/79] virtio-scsi: finalize IOMMU support
From: |
Michael Roth |
Subject: |
[Qemu-devel] [PATCH 68/79] virtio-scsi: finalize IOMMU support |
Date: |
Mon, 28 Aug 2017 19:14:43 -0500 |
From: Jason Wang <address@hidden>
After converting to use DMA api for virtio devices, we should use
dma_as instead of address_space_memory. Otherwise it won't work if
IOMMU is enabled.
Fixes: commit 8607f5c3072c ("virtio: convert to use DMA api")
Cc: address@hidden
Signed-off-by: Jason Wang <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
(cherry picked from commit 025bdeab3c163aee9604a60b2332a5fcbcc00f8d)
Signed-off-by: Michael Roth <address@hidden>
---
hw/scsi/virtio-scsi.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c
index cb1c123..3915c2e 100644
--- a/hw/scsi/virtio-scsi.c
+++ b/hw/scsi/virtio-scsi.c
@@ -43,12 +43,13 @@ static inline SCSIDevice
*virtio_scsi_device_find(VirtIOSCSI *s, uint8_t *lun)
void virtio_scsi_init_req(VirtIOSCSI *s, VirtQueue *vq, VirtIOSCSIReq *req)
{
+ VirtIODevice *vdev = VIRTIO_DEVICE(s);
const size_t zero_skip =
offsetof(VirtIOSCSIReq, resp_iov) + sizeof(req->resp_iov);
req->vq = vq;
req->dev = s;
- qemu_sglist_init(&req->qsgl, DEVICE(s), 8, &address_space_memory);
+ qemu_sglist_init(&req->qsgl, DEVICE(s), 8, vdev->dma_as);
qemu_iovec_init(&req->resp_iov, 1);
memset((uint8_t *)req + zero_skip, 0, sizeof(*req) - zero_skip);
}
--
2.7.4
- [Qemu-devel] [PATCH 66/79] hid: Reset kbd modifiers on reset, (continued)
- [Qemu-devel] [PATCH 66/79] hid: Reset kbd modifiers on reset, Michael Roth, 2017/08/28
- [Qemu-devel] [PATCH 60/79] commit: Fix completion with extra reference, Michael Roth, 2017/08/28
- [Qemu-devel] [PATCH 59/79] nbd: Fix regression on resiliency to port scan, Michael Roth, 2017/08/28
- [Qemu-devel] [PATCH 71/79] virtio-net: fix offload ctrl endian, Michael Roth, 2017/08/28
- [Qemu-devel] [PATCH 06/79] block: An empty filename counts as no filename, Michael Roth, 2017/08/28
- [Qemu-devel] [PATCH 72/79] input: limit kbd queue depth, Michael Roth, 2017/08/28
- [Qemu-devel] [PATCH 74/79] qemu-iotests: Test automatic commit job cancel on hot unplug, Michael Roth, 2017/08/28
- [Qemu-devel] [PATCH 05/79] qemu-img/convert: Move bs_n > 1 && -B check down, Michael Roth, 2017/08/28
- [Qemu-devel] [PATCH 64/79] block: Do not strcmp() with NULL uri->scheme, Michael Roth, 2017/08/28
- [Qemu-devel] [PATCH 69/79] commit: Add NULL check for overlay_bs, Michael Roth, 2017/08/28
- [Qemu-devel] [PATCH 68/79] virtio-scsi: finalize IOMMU support,
Michael Roth <=
- [Qemu-devel] [PATCH 73/79] input: Decrement queue count on kbd delay, Michael Roth, 2017/08/28
- [Qemu-devel] [PATCH 75/79] block: Skip implicit nodes in query-block/blockstats, Michael Roth, 2017/08/28
- [Qemu-devel] [PATCH 76/79] cpu: don't allow negative core id, Michael Roth, 2017/08/28
- [Qemu-devel] [PATCH 78/79] block/nfs: fix mutex assertion in nfs_file_close(), Michael Roth, 2017/08/28
- [Qemu-devel] [PATCH 07/79] iotests/051: Add test for empty filename, Michael Roth, 2017/08/28
- [Qemu-devel] [PATCH 70/79] spapr: fix memory leak in spapr_core_pre_plug(), Michael Roth, 2017/08/28
- [Qemu-devel] [PATCH 79/79] 9pfs: local: fix fchmodat_nofollow() limitations, Michael Roth, 2017/08/28
- [Qemu-devel] [PATCH 08/79] migration: setup bi-directional I/O channel for exec: protocol, Michael Roth, 2017/08/28
- [Qemu-devel] [PATCH 77/79] hw/i386: allow SHPC for Q35 machine, Michael Roth, 2017/08/28
- Re: [Qemu-devel] [PATCH 00/79] Patch Round-up for stable 2.9.1, freeze on 2017-09-04, Michael Roth, 2017/08/28