Commit d151f63f authored by Shuah Khan's avatar Shuah Khan Committed by Marcelo Tosatti

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: default avatarShuah Khan <shuah.khan@hp.com>
Signed-off-by: default avatarMarcelo Tosatti <mtosatti@redhat.com>
parent b6785def
...@@ -168,11 +168,7 @@ int kvm_assign_device(struct kvm *kvm, ...@@ -168,11 +168,7 @@ int kvm_assign_device(struct kvm *kvm,
r = iommu_attach_device(domain, &pdev->dev); r = iommu_attach_device(domain, &pdev->dev);
if (r) { if (r) {
printk(KERN_ERR "assign device %x:%x:%x.%x failed", dev_err(&pdev->dev, "kvm assign device failed ret %d", r);
pci_domain_nr(pdev->bus),
pdev->bus->number,
PCI_SLOT(pdev->devfn),
PCI_FUNC(pdev->devfn));
return r; return r;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment