[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 00/10] SCSI scatter/gather support
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH 00/10] SCSI scatter/gather support |
Date: |
Thu, 11 Aug 2011 08:57:40 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Thu, Aug 04, 2011 at 07:14:38PM +0200, Paolo Bonzini wrote:
> Hi,
>
> this is the version of SCSI scatter/gather based on the existing
> DMA helpers infrastructure.
>
> The infrastructure required a little update because I need to
> know the residual amount of data upon short transfers. To this
> end, my choice was to make QEMUSGList mutable and track the
> current position in there. Any other ideas are welcome, the
> reason for this choice is explained in patch 2.
>
> The patches are quite self-contained, but they depend on the
> changes I posted yesterday.
>
> Patch 11 is the sample vmw_pvscsi device model that I used to
> test the code.
This is a good opportunity to rename is_write in dma-helpers because it
is confusing.
The problem is that bdrv_*() is_write indicates whether the I/O request
is a read or write. But in cpu_physical_memory_map() is_write indicates
whether we are writing to target memory.
These two is_write use cases actually have opposite meanings, therefore
the confusing code in dma-helpers.c today:
mem = cpu_physical_memory_map(cur_addr, &cur_len, !dbs->is_write);
^^^^^^^^^^^^^^
Please use a DMA direction instead of is_write:
DMA-to-device means target->device memory transfer
DMA-from-device means device->target memory transfer
This patch series is a good place to do the rename because it adds more
instances of !dbs->is_write.
Stefan
- Re: [Qemu-devel] [PATCH 05/10] dma-helpers: add dma_buf_read and dma_buf_write, (continued)
[Qemu-devel] [PATCH 06/10] scsi: pass residual amount to command_complete, Paolo Bonzini, 2011/08/04
[Qemu-devel] [PATCH 07/10] scsi: add scatter/gather functionality, Paolo Bonzini, 2011/08/04
[Qemu-devel] [PATCH 09/10] scsi-disk: lazily allocate bounce buffer, Paolo Bonzini, 2011/08/04
[Qemu-devel] [PATCH 08/10] scsi-disk: commonize iovec creation between reads and writes, Paolo Bonzini, 2011/08/04
[Qemu-devel] [PATCH 10/10] scsi-disk: enable scatter/gather functionality, Paolo Bonzini, 2011/08/04
[Qemu-devel] [PATCH 11/11] sample pvscsi driver with s/g support, Paolo Bonzini, 2011/08/04
Re: [Qemu-devel] [PATCH 00/10] SCSI scatter/gather support,
Stefan Hajnoczi <=