[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <be94a982-69c9-534a-77a1-3026a93bfb63@linux.intel.com>
Date: Tue, 21 Jan 2020 13:03:17 +0800
From: "Liu, Jing2" <jing2.liu@...ux.intel.com>
To: "Michael S. Tsirkin" <mst@...hat.com>,
Zha Bin <zhabin@...ux.alibaba.com>
Cc: linux-kernel@...r.kernel.org, jasowang@...hat.com, slp@...hat.com,
virtio-dev@...ts.oasis-open.org, gerry@...ux.alibaba.com,
jing2.liu@...el.com, chao.p.peng@...el.com
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
Powered by blists - more mailing lists