On 03/28/2014 11:57 AM, Greg Kurz wrote:
From: Rusty Russell <[email protected]>
This is based on a simpler patch by Anthony Liguouri, which only handled
the vring accesses. We also need some drivers to access these helpers,
eg. for data which contains headers.
Signed-off-by: Rusty Russell <[email protected]>
[ ldq_phys() API change,
use per-device needs_byteswap flag,
Greg Kurz <[email protected]> ]
Signed-off-by: Greg Kurz <[email protected]>
---
hw/virtio/virtio.c | 93 ++++++++++++++++++++++++++++++----------------------
1 file changed, 53 insertions(+), 40 deletions(-)
diff --git a/hw/virtio/virtio.c b/hw/virtio/virtio.c
index 24b565f..1877b46 100644
--- a/hw/virtio/virtio.c
+++ b/hw/virtio/virtio.c
@@ -102,53 +102,57 @@ static void virtqueue_init(VirtQueue *vq)
vq->vring.align);
}
-static inline uint64_t vring_desc_addr(hwaddr desc_pa, int i)
+static inline uint64_t vring_desc_addr(hwaddr desc_pa, int i,
+ struct VirtIODevice *vdev)
The logical ordering for helper is usually to have the device as the
first parameter (it's basically the self object). Could you please order
it accordingly?
Alex