summaryrefslogtreecommitdiffstats
path: root/virt/kvm
diff options
context:
space:
mode:
authorShuah Khan <shuah.khan@hp.com>2012-10-08 18:36:11 -0600
committerMarcelo Tosatti <mtosatti@redhat.com>2012-10-10 15:45:40 -0300
commitd151f63f20133aef9dbda209faddebcddbfccf31 (patch)
treec947a9f69b2cbeafdc5c994da1b5d12ec826b480 /virt/kvm
parentb6785def8368f9a69505797fcbd9f280d91b673e (diff)
KVM: change kvm_assign_device() to print return value when iommu_attach_device() fails
Change existing kernel error message to include return value from iommu_attach_device() when it fails. This will help debug device assignment failures more effectively. Signed-off-by: Shuah Khan <shuah.khan@hp.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'virt/kvm')
-rw-r--r--virt/kvm/iommu.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/virt/kvm/iommu.c b/virt/kvm/iommu.c
index 037cb6730e6..18e1e30019e 100644
--- a/virt/kvm/iommu.c
+++ b/virt/kvm/iommu.c
@@ -168,11 +168,7 @@ int kvm_assign_device(struct kvm *kvm,
r = iommu_attach_device(domain, &pdev->dev);
if (r) {
- printk(KERN_ERR "assign device %x:%x:%x.%x failed",
- pci_domain_nr(pdev->bus),
- pdev->bus->number,
- PCI_SLOT(pdev->devfn),
- PCI_FUNC(pdev->devfn));
+ dev_err(&pdev->dev, "kvm assign device failed ret %d", r);
return r;
}