[ipxe-devel] [PATCH v2 3/4] [virtio] Add virtio 1.0 PCI support

Stefan Hajnoczi stefanha at redhat.com
Tue Mar 15 17:54:35 UTC 2016


On Mon, Mar 14, 2016 at 03:48:24PM +0100, Ladi Prosek wrote:
> @@ -130,7 +131,11 @@ void vring_kick(unsigned int ioaddr, struct vring_virtqueue *vq, int num_added)
>     vr->avail->idx += num_added;
>  
>     mb();
> -   if (!(vr->used->flags & VRING_USED_F_NO_NOTIFY))
> -           vp_notify(ioaddr, vq->queue_index);
> +   if (!(vr->used->flags & VRING_USED_F_NO_NOTIFY)) {
> +           if (ioaddr) {

It would be nice to add /* Legacy virtio */ and /* VIRTIO 1.0 */
comments here so it's clear that ioaddr is distinguishing between the
virtio versions.

> diff --git a/src/include/ipxe/virtio-ring.h b/src/include/ipxe/virtio-ring.h
> index e44d13c..3f7478b 100644
> --- a/src/include/ipxe/virtio-ring.h
> +++ b/src/include/ipxe/virtio-ring.h
> @@ -79,6 +79,7 @@ struct vring_virtqueue {
>     void *vdata[MAX_QUEUE_NUM];
>     /* PCI */
>     int queue_index;
> +   struct virtio_pci_region notification;

virtio-ring.h should #include "virtio-pci.h" if it uses this struct or
is there some kind of circular dependency problem?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://lists.ipxe.org/pipermail/ipxe-devel/attachments/20160315/2cb81ee8/attachment.sig>


More information about the ipxe-devel mailing list