summaryrefslogtreecommitdiffstats
path: root/src/include/ipxe/virtio-ring.h
diff options
context:
space:
mode:
authorAaron Young2021-10-28 01:05:43 +0200
committerMichael Brown2021-10-28 14:19:30 +0200
commitf24a2794e1b527e45efbbcad1c272f176f3d9df0 (patch)
tree1bb4cc38e3e7059259fe37f3a7716a864f55eb13 /src/include/ipxe/virtio-ring.h
parent[readline] Extend maximum read line length to 1024 characters (diff)
downloadipxe-f24a2794e1b527e45efbbcad1c272f176f3d9df0.tar.gz
ipxe-f24a2794e1b527e45efbbcad1c272f176f3d9df0.tar.xz
ipxe-f24a2794e1b527e45efbbcad1c272f176f3d9df0.zip
[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;
};