[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] pci: fix requester id with PCI bridges

From: Peter Xu
Subject: Re: [Qemu-devel] [PATCH] pci: fix requester id with PCI bridges
Date: Wed, 11 May 2016 14:53:18 +0800
User-agent: Mutt/1.5.24 (2015-08-30)

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


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 
         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) {
             return 1;


This should be able to be applied directly onto IR v6 patchset as


-- peterx

reply via email to

[Prev in Thread] Current Thread [Next in Thread]