From: Peter Xu <peterx@redhat.com>
To: qemu-devel@nongnu.org
Cc: rkrcmar@redhat.com, mst@redhat.com, alex.williamson@redhat.com,
jan.kiszka@web.de, pbonzini@redhat.com
Subject: Re: [Qemu-devel] [PATCH] pci: fix requester id with PCI bridges
Date: Wed, 11 May 2016 14:53:18 +0800 [thread overview]
Message-ID: <20160511065318.GA13293@pxdev.xzpeter.org> (raw)
In-Reply-To: <1462948831-931-1-git-send-email-peterx@redhat.com>
On Wed, May 11, 2016 at 02:40:30PM +0800, Peter Xu wrote:
> Recently I encountered issue when debugging Intel IOMMU IR codes,
> that interrupts are not working correctly with PCI bridges (reported
> by Radim). This patch fixes the problem. I assume requester ID
> should be the devfn on root PCI bus (that's how I understand it
> before, and also in guest kernel, IRTE entry SID is filled in that
> way), however I failed to find any good document to confirm
> this. Please let me know if this is correct (or I made any
> mistake).
One thing to mention is that, this patch does *not* fix the problem
if directly applied, because IR patchset introduced another patch
that also need a similar fix. In case if there is someone (Radim?)
who would like to try this patch, we need to apply this patch as
well:
---8<---
diff --git a/target-i386/kvm.c b/target-i386/kvm.c
index 80b3251..0876a1c 100644
--- a/target-i386/kvm.c
+++ b/target-i386/kvm.c
@@ -3342,7 +3342,8 @@ int kvm_arch_fixup_msi_route(struct kvm_irq_routing_entry *route,
src.data = route->u.msi.data;
ret = class->int_remap(iommu, &src, &dst, dev ? \
- pci_requester_id(dev) : X86_IOMMU_SID_INVALID);
+ pci_requester_id_recursive(dev) : \
+ X86_IOMMU_SID_INVALID);
if (ret) {
trace_kvm_x86_fixup_msi_error(route->gsi);
return 1;
--->8---
This should be able to be applied directly onto IR v6 patchset as
well.
Thanks,
-- peterx
next prev parent reply other threads:[~2016-05-11 6:53 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-11 6:40 [Qemu-devel] [PATCH] pci: fix requester id with PCI bridges Peter Xu
2016-05-11 6:40 ` [Qemu-devel] [PATCH] pci: fix requester id to be the one on root bus Peter Xu
2016-05-11 13:53 ` Michael S. Tsirkin
2016-05-12 2:40 ` Peter Xu
2016-05-12 3:22 ` Alex Williamson
2016-05-12 4:43 ` Peter Xu
2016-05-11 6:53 ` Peter Xu [this message]
2016-05-12 7:11 ` [Qemu-devel] [PATCH] pci: fix requester id with PCI bridges Michael S. Tsirkin
2016-05-12 7:32 ` Peter Xu
2016-05-12 7:51 ` Michael S. Tsirkin
2016-05-16 7:23 ` Peter Xu
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=20160511065318.GA13293@pxdev.xzpeter.org \
--to=peterx@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=jan.kiszka@web.de \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rkrcmar@redhat.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;
as well as URLs for NNTP newsgroup(s).