mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
virtio: add names to virtqueue struct, mapping from devices to queues.
Add a linked list of all virtqueues for a virtio device: this helps for debugging and is also needed for upcoming interface change. Also, add a "name" field for clearer debug messages. Signed-off-by: Rusty Russell <[email protected]>
This commit is contained in:
parent
ef688e151c
commit
9499f5e7ed
14 changed files with 56 additions and 31 deletions
|
|
@ -173,8 +173,9 @@ static void kvm_notify(struct virtqueue *vq)
|
|||
* this device and sets it up.
|
||||
*/
|
||||
static struct virtqueue *kvm_find_vq(struct virtio_device *vdev,
|
||||
unsigned index,
|
||||
void (*callback)(struct virtqueue *vq))
|
||||
unsigned index,
|
||||
void (*callback)(struct virtqueue *vq),
|
||||
const char *name)
|
||||
{
|
||||
struct kvm_device *kdev = to_kvmdev(vdev);
|
||||
struct kvm_vqconfig *config;
|
||||
|
|
@ -194,7 +195,7 @@ static struct virtqueue *kvm_find_vq(struct virtio_device *vdev,
|
|||
|
||||
vq = vring_new_virtqueue(config->num, KVM_S390_VIRTIO_RING_ALIGN,
|
||||
vdev, (void *) config->address,
|
||||
kvm_notify, callback);
|
||||
kvm_notify, callback, name);
|
||||
if (!vq) {
|
||||
err = -ENOMEM;
|
||||
goto unmap;
|
||||
|
|
|
|||
Loading…
Reference in a new issue