aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/kvm
diff options
context:
space:
mode:
authorMichael S. Tsirkin <mst@redhat.com>2012-09-05 14:47:45 -0400
committerRusty Russell <rusty@rustcorp.com.au>2012-09-28 01:35:15 -0400
commit6457f126c888b3481fdae6f702e616cd0c79646e (patch)
treeeae794db0b3983d2a901ecf6471eda6e3f9ff26f /drivers/s390/kvm
parent75a0a52be3c27b58654fbed2c8f2ff401482b9a4 (diff)
virtio: support reserved vqs
virtio network device multiqueue support reserves vq 3 for future use (useful both for future extensions and to make it pretty - this way receive vqs have even and transmit - odd numbers). Make it possible to skip initialization for specific vq numbers by specifying NULL for name. Document this usage as well as (existing) NULL callback. Drivers using this not coded up yet, so I simply tested with virtio-pci and verified that this patch does not break existing drivers. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Diffstat (limited to 'drivers/s390/kvm')
-rw-r--r--drivers/s390/kvm/kvm_virtio.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/s390/kvm/kvm_virtio.c b/drivers/s390/kvm/kvm_virtio.c
index 5565af20592f..7dabef624da3 100644
--- a/drivers/s390/kvm/kvm_virtio.c
+++ b/drivers/s390/kvm/kvm_virtio.c
@@ -190,6 +190,9 @@ static struct virtqueue *kvm_find_vq(struct virtio_device *vdev,
190 if (index >= kdev->desc->num_vq) 190 if (index >= kdev->desc->num_vq)
191 return ERR_PTR(-ENOENT); 191 return ERR_PTR(-ENOENT);
192 192
193 if (!name)
194 return NULL;
195
193 config = kvm_vq_config(kdev->desc)+index; 196 config = kvm_vq_config(kdev->desc)+index;
194 197
195 err = vmem_add_mapping(config->address, 198 err = vmem_add_mapping(config->address,