diff options
author | Ladi Prosek <lprosek@redhat.com> | 2016-04-11 11:26:58 +0200 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2016-04-15 17:41:26 +0100 |
commit | 8a055a2a707f8cb92e7b62512391e03b4e25cae2 (patch) | |
tree | 368a64a84a3fdd8a3519d650f638df0bc6e4543e /src/include/ipxe/virtio-ring.h | |
parent | 7b499f849edc79f30b27dfe8143c04e90e3154c9 (diff) | |
download | ipxe-8a055a2a707f8cb92e7b62512391e03b4e25cae2.tar.gz |
[virtio] Add virtio 1.0 PCI support
This commit adds support for driving virtio 1.0 PCI devices. In
addition to various helpers, a number of vpm_ functions are introduced
to be used instead of their legacy vp_ counterparts when accessing
virtio 1.0 (aka modern) devices.
Signed-off-by: Ladi Prosek <lprosek@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Modified-by: Michael Brown <mcb30@ipxe.org>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/include/ipxe/virtio-ring.h')
-rw-r--r-- | src/include/ipxe/virtio-ring.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/include/ipxe/virtio-ring.h b/src/include/ipxe/virtio-ring.h index e44d13c05..6ba550b5a 100644 --- a/src/include/ipxe/virtio-ring.h +++ b/src/include/ipxe/virtio-ring.h @@ -1,6 +1,8 @@ #ifndef _VIRTIO_RING_H_ # define _VIRTIO_RING_H_ +#include <ipxe/virtio-pci.h> + /* Status byte for guest to report progress, and synchronize features. */ /* We have seen device and processed generic fields (VIRTIO_CONFIG_F_VIRTIO) */ #define VIRTIO_CONFIG_S_ACKNOWLEDGE 1 @@ -79,6 +81,7 @@ struct vring_virtqueue { void *vdata[MAX_QUEUE_NUM]; /* PCI */ int queue_index; + struct virtio_pci_region notification; }; struct vring_list { @@ -142,6 +145,7 @@ void *vring_get_buf(struct vring_virtqueue *vq, unsigned int *len); void vring_add_buf(struct vring_virtqueue *vq, struct vring_list list[], unsigned int out, unsigned int in, void *index, int num_added); -void vring_kick(unsigned int ioaddr, struct vring_virtqueue *vq, int num_added); +void vring_kick(struct virtio_pci_modern_device *vdev, unsigned int ioaddr, + struct vring_virtqueue *vq, int num_added); #endif /* _VIRTIO_RING_H_ */ |