From: Shuah Khan <shuah.khan@hp.com>
To: avi@redhat.com, mtosatti@redhat.com
Cc: kvm@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
shuahkhan@gmail.com
Subject: [PATCH] virt/kvm: change kvm_assign_device() to print return value when iommu_attach_device() fails
Date: Mon, 08 Oct 2012 18:36:11 -0600 [thread overview]
Message-ID: <1349742971.2674.75.camel@lorien2> (raw)
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>
---
virt/kvm/iommu.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/virt/kvm/iommu.c b/virt/kvm/iommu.c
index 037cb67..18e1e30 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;
}
--
1.7.9.5
next reply other threads:[~2012-10-09 0:36 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-09 0:36 Shuah Khan [this message]
2012-10-10 16:51 ` [PATCH] virt/kvm: change kvm_assign_device() to print return value when iommu_attach_device() fails Marcelo Tosatti
2012-10-10 18:20 ` Shuah Khan
2012-10-10 18:45 ` Marcelo Tosatti
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1349742971.2674.75.camel@lorien2 \
--to=shuah.khan@hp.com \
--cc=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mtosatti@redhat.com \
--cc=shuahkhan@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox