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>
This commit is contained in:
Shuah Khan 2012-10-08 18:36:11 -06:00 committed by Marcelo Tosatti
parent b6785def83
commit d151f63f20
1 changed files with 1 additions and 5 deletions

View File

@ -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;
}