diff options
-rw-r--r-- | include/linux/kvm_host.h | 1 | ||||
-rw-r--r-- | virt/kvm/assigned-dev.c | 11 |
2 files changed, 7 insertions, 5 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 9fe7fefe76b1..4bd663d6443d 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
@@ -489,6 +489,7 @@ struct kvm_assigned_dev_kernel { | |||
489 | struct pci_dev *dev; | 489 | struct pci_dev *dev; |
490 | struct kvm *kvm; | 490 | struct kvm *kvm; |
491 | spinlock_t intx_lock; | 491 | spinlock_t intx_lock; |
492 | char irq_name[32]; | ||
492 | }; | 493 | }; |
493 | 494 | ||
494 | struct kvm_irq_mask_notifier { | 495 | struct kvm_irq_mask_notifier { |
diff --git a/virt/kvm/assigned-dev.c b/virt/kvm/assigned-dev.c index 1d77ce16360a..7623408dbc81 100644 --- a/virt/kvm/assigned-dev.c +++ b/virt/kvm/assigned-dev.c | |||
@@ -231,8 +231,7 @@ static int assigned_device_enable_host_intx(struct kvm *kvm, | |||
231 | * are going to be long delays in accepting, acking, etc. | 231 | * are going to be long delays in accepting, acking, etc. |
232 | */ | 232 | */ |
233 | if (request_threaded_irq(dev->host_irq, NULL, kvm_assigned_dev_thread, | 233 | if (request_threaded_irq(dev->host_irq, NULL, kvm_assigned_dev_thread, |
234 | IRQF_ONESHOT, "kvm_assigned_intx_device", | 234 | IRQF_ONESHOT, dev->irq_name, (void *)dev)) |
235 | (void *)dev)) | ||
236 | return -EIO; | 235 | return -EIO; |
237 | return 0; | 236 | return 0; |
238 | } | 237 | } |
@@ -251,7 +250,7 @@ static int assigned_device_enable_host_msi(struct kvm *kvm, | |||
251 | 250 | ||
252 | dev->host_irq = dev->dev->irq; | 251 | dev->host_irq = dev->dev->irq; |
253 | if (request_threaded_irq(dev->host_irq, NULL, kvm_assigned_dev_thread, | 252 | if (request_threaded_irq(dev->host_irq, NULL, kvm_assigned_dev_thread, |
254 | 0, "kvm_assigned_msi_device", (void *)dev)) { | 253 | 0, dev->irq_name, (void *)dev)) { |
255 | pci_disable_msi(dev->dev); | 254 | pci_disable_msi(dev->dev); |
256 | return -EIO; | 255 | return -EIO; |
257 | } | 256 | } |
@@ -278,8 +277,7 @@ static int assigned_device_enable_host_msix(struct kvm *kvm, | |||
278 | for (i = 0; i < dev->entries_nr; i++) { | 277 | for (i = 0; i < dev->entries_nr; i++) { |
279 | r = request_threaded_irq(dev->host_msix_entries[i].vector, | 278 | r = request_threaded_irq(dev->host_msix_entries[i].vector, |
280 | NULL, kvm_assigned_dev_thread, | 279 | NULL, kvm_assigned_dev_thread, |
281 | 0, "kvm_assigned_msix_device", | 280 | 0, dev->irq_name, (void *)dev); |
282 | (void *)dev); | ||
283 | if (r) | 281 | if (r) |
284 | goto err; | 282 | goto err; |
285 | } | 283 | } |
@@ -336,6 +334,9 @@ static int assign_host_irq(struct kvm *kvm, | |||
336 | if (dev->irq_requested_type & KVM_DEV_IRQ_HOST_MASK) | 334 | if (dev->irq_requested_type & KVM_DEV_IRQ_HOST_MASK) |
337 | return r; | 335 | return r; |
338 | 336 | ||
337 | snprintf(dev->irq_name, sizeof(dev->irq_name), "kvm:%s", | ||
338 | pci_name(dev->dev)); | ||
339 | |||
339 | switch (host_irq_type) { | 340 | switch (host_irq_type) { |
340 | case KVM_DEV_IRQ_HOST_INTX: | 341 | case KVM_DEV_IRQ_HOST_INTX: |
341 | r = assigned_device_enable_host_intx(kvm, dev); | 342 | r = assigned_device_enable_host_intx(kvm, dev); |