aboutsummaryrefslogtreecommitdiffstats
path: root/src/include/ipxe/virtio-ring.h
diff options
context:
space:
mode:
authorAaron Young <Aaron.Young@oracle.com>2021-10-27 16:05:43 -0700
committerMichael Brown <mcb30@ipxe.org>2021-10-28 13:19:30 +0100
commitf24a2794e1b527e45efbbcad1c272f176f3d9df0 (patch)
tree1bb4cc38e3e7059259fe37f3a7716a864f55eb13 /src/include/ipxe/virtio-ring.h
parent2265a65191d76ce367913a61c97752ab88ab1a59 (diff)
downloadipxe-f24a2794e1b527e45efbbcad1c272f176f3d9df0.tar.gz
[virtio] Update driver to use DMA API
Signed-off-by: Aaron Young <aaron.young@oracle.com>
Diffstat (limited to 'src/include/ipxe/virtio-ring.h')
-rw-r--r--src/include/ipxe/virtio-ring.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/include/ipxe/virtio-ring.h b/src/include/ipxe/virtio-ring.h
index 852769f29..d082139e9 100644
--- a/src/include/ipxe/virtio-ring.h
+++ b/src/include/ipxe/virtio-ring.h
@@ -2,6 +2,7 @@
# define _VIRTIO_RING_H_
#include <ipxe/virtio-pci.h>
+#include <ipxe/dma.h>
/* Status byte for guest to report progress, and synchronize features. */
/* We have seen device and processed generic fields (VIRTIO_CONFIG_F_VIRTIO) */
@@ -74,17 +75,21 @@ struct vring {
struct vring_virtqueue {
unsigned char *queue;
+ size_t queue_size;
+ struct dma_mapping map;
+ struct dma_device *dma;
struct vring vring;
u16 free_head;
u16 last_used_idx;
void **vdata;
+ struct virtio_net_hdr_modern *empty_header;
/* PCI */
int queue_index;
struct virtio_pci_region notification;
};
struct vring_list {
- char *addr;
+ physaddr_t addr;
unsigned int length;
};