aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/kvm
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2009-06-13 00:16:35 -0400
committerRusty Russell <rusty@rustcorp.com.au>2009-06-12 08:46:36 -0400
commit9499f5e7ed5224c40706f0cec6542a9916bc7606 (patch)
tree3e4e1b36d3d549ea356e88e6e44359a887c6ee01 /drivers/s390/kvm
parentef688e151c00e5d529703be9a04fd506df8bc54e (diff)
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 <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers/s390/kvm')
-rw-r--r--drivers/s390/kvm/kvm_virtio.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/s390/kvm/kvm_virtio.c b/drivers/s390/kvm/kvm_virtio.c
index cbc8566fab70..ba8995fbf041 100644
--- a/drivers/s390/kvm/kvm_virtio.c
+++ b/drivers/s390/kvm/kvm_virtio.c
@@ -173,8 +173,9 @@ static void kvm_notify(struct virtqueue *vq)
173 * this device and sets it up. 173 * this device and sets it up.
174 */ 174 */
175static struct virtqueue *kvm_find_vq(struct virtio_device *vdev, 175static struct virtqueue *kvm_find_vq(struct virtio_device *vdev,
176 unsigned index, 176 unsigned index,
177 void (*callback)(struct virtqueue *vq)) 177 void (*callback)(struct virtqueue *vq),
178 const char *name)
178{ 179{
179 struct kvm_device *kdev = to_kvmdev(vdev); 180 struct kvm_device *kdev = to_kvmdev(vdev);
180 struct kvm_vqconfig *config; 181 struct kvm_vqconfig *config;
@@ -194,7 +195,7 @@ static struct virtqueue *kvm_find_vq(struct virtio_device *vdev,
194 195
195 vq = vring_new_virtqueue(config->num, KVM_S390_VIRTIO_RING_ALIGN, 196 vq = vring_new_virtqueue(config->num, KVM_S390_VIRTIO_RING_ALIGN,
196 vdev, (void *) config->address, 197 vdev, (void *) config->address,
197 kvm_notify, callback); 198 kvm_notify, callback, name);
198 if (!vq) { 199 if (!vq) {
199 err = -ENOMEM; 200 err = -ENOMEM;
200 goto unmap; 201 goto unmap;