Direct memory access for devices
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest5 patches 58 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | Add target memory mapping APIcpu-all.h exec.c | +98 | 54 replies | |
| 2/5 | Add map client retry notificationcpu-all.h exec.c | +41 | 1 reply | |
| 3/5 | Vectored block device APIblock.c block.h | +99 | 2 replies | |
| 4/5 | I/O vector helpersqemu-common.h vl.c | +35 | 0 replies | |
| 5/5 | Convert IDE to directly access guest memoryhw/ | +113 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [Qemu-devel] [PATCH 0/5] Direct memory access for devices
One of the deficiencies of the current device layer is that it can only access guest RAM via cpu_physical_memory_rw(). This means that the device emulation code must copy the memory to or from a temporary buffer, even though the host offers APIs which allow direct access to memory. This reduces efficiency on DMA capable devices, especially disks.
This patchset introduces a complement to the read/write API, cpu_physical_memory_map() which allows device emulation code to map guest memory directly. The API bounces memory regions which cannot be mapped (such as mmio regions) using an internal buffer.
As an example, IDE emulation is converted to use the new API. This exposes another deficiency: lack of scatter/gather support in the block layer. To work around this, a vectored block API is introduced, currently emulated by bouncing. Additional work is needed to convert all block format drivers to use the vectored API.
Avi Kivity (5):
Add target memory mapping API
Add map client retry notification
Vectored block device API
I/O vector helpers
Convert IDE to directly access guest memory
block.c | 92 ++++++++++++++++++++++++++++++++++++++++ block.h | 7 +++ cpu-all.h | 8 ++++ exec.c | 131 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ hw/ide.c | 127 +++++++++++++++++++++++++++++++++++++++++++++++++------ qemu-common.h | 10 ++++ vl.c | 25 +++++++++++ 7 files changed, 386 insertions(+), 14 deletions(-)