OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

virtio-dev message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [virtio-dev] Re: [PATCH v1 2/2] virtio-mmio: add features for virtio-mmio specification version 3



On 1/5/2020 7:04 PM, Michael S. Tsirkin wrote:

struct virtio_mmio_vq_info {
@@ -101,6 +107,8 @@ struct virtio_mmio_vq_info {
  };
+static void vm_free_msi_irqs(struct virtio_device *vdev);
+static int vm_request_msi_vectors(struct virtio_device *vdev, int nirqs);
/* Configuration interface */ @@ -273,12 +281,28 @@ static bool vm_notify(struct virtqueue *vq)
  {
  	struct virtio_mmio_device *vm_dev = to_virtio_mmio_device(vq->vdev);
+ if (vm_dev->version == 3) {
+		int offset = vm_dev->doorbell_base +
+			     vm_dev->doorbell_scale * vq->index;
+		writel(vq->index, vm_dev->base + offset);
+	} else
  	/* We write the queue's selector into the notification register to
  	 * signal the other end */
-	writel(vq->index, vm_dev->base + VIRTIO_MMIO_QUEUE_NOTIFY);
+		writel(vq->index, vm_dev->base + VIRTIO_MMIO_QUEUE_NOTIFY);
+
  	return true;
  }
You might want to support VIRTIO_F_NOTIFICATION_DATA too.

Yes, the feature is new in virtio1.1 and the kernel has not defined and implemented it yet.

To implement it for both PCI and MMIO, maybe it would be good to work a separate patch set later?

BTW, we are working on v2 and will send out later.

Thanks,

Jing



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]