lkml.org 
[lkml]   [2020]   [Jan]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [virtio-dev] Re: [PATCH v1 2/2] virtio-mmio: add features for virtio-mmio specification version 3
From
Date

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

\
 
 \ /
  Last update: 2020-01-21 06:03    [W:0.108 / U:5.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site