[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 07/20] dma-helpers: allow including from target-inde
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PATCH 07/20] dma-helpers: allow including from target-independent code |
Date: |
Tue, 20 Sep 2011 13:11:39 +0200 |
From: Paolo Bonzini <address@hidden>
Target-independent code cannot construct sglists, but it can take
them from the outside as a black box. Allow this.
Signed-off-by: Paolo Bonzini <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
dma.h | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/dma.h b/dma.h
index b222346..2bdc236 100644
--- a/dma.h
+++ b/dma.h
@@ -15,10 +15,13 @@
#include "hw/hw.h"
#include "block.h"
-typedef struct {
+typedef struct ScatterGatherEntry ScatterGatherEntry;
+
+#if defined(TARGET_PHYS_ADDR_BITS)
+struct ScatterGatherEntry {
target_phys_addr_t base;
target_phys_addr_t len;
-} ScatterGatherEntry;
+};
struct QEMUSGList {
ScatterGatherEntry *sg;
@@ -31,6 +34,7 @@ void qemu_sglist_init(QEMUSGList *qsg, int alloc_hint);
void qemu_sglist_add(QEMUSGList *qsg, target_phys_addr_t base,
target_phys_addr_t len);
void qemu_sglist_destroy(QEMUSGList *qsg);
+#endif
typedef BlockDriverAIOCB *DMAIOFunc(BlockDriverState *bs, int64_t sector_num,
QEMUIOVector *iov, int nb_sectors,
--
1.7.6.2
- [Qemu-devel] [PULL 00/20] Block patches, Kevin Wolf, 2011/09/20
- [Qemu-devel] [PATCH 03/20] nbd: support NBD_SET_FLAGS ioctl, Kevin Wolf, 2011/09/20
- [Qemu-devel] [PATCH 01/20] nbd: support feature negotiation, Kevin Wolf, 2011/09/20
- [Qemu-devel] [PATCH 02/20] nbd: sync API definitions with upstream, Kevin Wolf, 2011/09/20
- [Qemu-devel] [PATCH 08/20] dma-helpers: rewrite completion/cancellation, Kevin Wolf, 2011/09/20
- [Qemu-devel] [PATCH 05/20] scsi-generic: do not disable FUA, Kevin Wolf, 2011/09/20
- [Qemu-devel] [PATCH 07/20] dma-helpers: allow including from target-independent code,
Kevin Wolf <=
- [Qemu-devel] [PATCH 06/20] dma-helpers: rename is_write to to_dev, Kevin Wolf, 2011/09/20
- [Qemu-devel] [PATCH 11/20] VMDK: fix leak of extent_file, Kevin Wolf, 2011/09/20
- [Qemu-devel] [PATCH 09/20] scsi-disk: commonize iovec creation between reads and writes, Kevin Wolf, 2011/09/20
- [Qemu-devel] [PATCH 04/20] raw-posix: Fix bdrv_flush error return values, Kevin Wolf, 2011/09/20
- [Qemu-devel] [PATCH 12/20] posix-aio-compat: Removed unused offset variable, Kevin Wolf, 2011/09/20
- [Qemu-devel] [PATCH 10/20] scsi-disk: lazily allocate bounce buffer, Kevin Wolf, 2011/09/20
- [Qemu-devel] [PATCH 16/20] rbd: call flush, if available, Kevin Wolf, 2011/09/20
- [Qemu-devel] [PATCH 13/20] AHCI Port Interrupt Enable register cleaning on soft reset, Kevin Wolf, 2011/09/20
- [Qemu-devel] [PATCH 14/20] rbd: ignore failures when reading from default conf location, Kevin Wolf, 2011/09/20
- [Qemu-devel] [PATCH 18/20] block: avoid SIGUSR2, Kevin Wolf, 2011/09/20