[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CALCETrXFFOz_PDtqcWgBa3dMziAYgVjWJ4AWmK3VbLsmBO8qZw@mail.gmail.com>
Date: Tue, 26 Apr 2016 19:27:07 -0700
From: Andy Lutomirski <luto@...nel.org>
To: Sudeep Dutt <sudeep.dutt@...el.com>,
Ashutosh Dixit <ashutosh.dixit@...el.com>,
"Michael S. Tsirkin" <mst@...hat.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Please consider using __vring_new_virtqueue in mic_virtio
mic_virtio has a big hack to set up a custom ring, like this:
/*
* To reassign the used ring here we are directly accessing
* struct vring_virtqueue which is a private data structure
* in virtio_ring.c. At the minimum, a BUILD_BUG_ON() in
* vring_new_virtqueue() would ensure that
* (&vq->vring == (struct vring *) (&vq->vq + 1));
*/
vr = (struct vring *)(vq + 1);
vr->used = used;\
I added a more flexible API __vring_new_virtqueue that you might be
able to use to clean this up in:
commit 2a2d1382fe9dccfce6f9c60a9c9fd2f0fe5bcf2b
Author: Andy Lutomirski <luto@...nel.org>
Date: Tue Feb 2 21:46:37 2016 -0800
virtio: Add improved queue allocation API
Please consider either using it or trying to use
vring_create_virtqueue and updating it to fit your needs if
appropriate.
I didn't btry to do it myself because I don't have the hardware.
Thanks,
Andy
Powered by blists - more mailing lists