Skip to content

Commit

Permalink
KVM: change kvm_assign_device() to print return value when iommu_atta…
Browse files Browse the repository at this point in the history
…ch_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 <[email protected]>
Signed-off-by: Marcelo Tosatti <[email protected]>
  • Loading branch information
Shuah Khan authored and matosatti committed Oct 10, 2012
1 parent b6785de commit d151f63
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions virt/kvm/iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit d151f63

Please sign in to comment.