[PATCH kvmtool 1/4] x86: Set the correct srcbusirq of pci irq mptable

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

 



The srcbusirq should be pci device number where the
interrupt originates.   Fix it.

Fixes: f83cd16 ("kvm tools: irq: replace the x86 irq rbtree with the PCI device tree")
Signed-off-by: Dongli Si <sidongli1997@xxxxxxxxx>
---
 x86/mptable.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/x86/mptable.c b/x86/mptable.c
index f13cf0f..f4753bd 100644
--- a/x86/mptable.c
+++ b/x86/mptable.c
@@ -180,7 +180,7 @@ int mptable__init(struct kvm *kvm)
 		unsigned char srcbusirq;
 		struct pci_device_header *pci_hdr = dev_hdr->data;
 
-		srcbusirq = (pci_hdr->subsys_id << 2) | (pci_hdr->irq_pin - 1);
+		srcbusirq = (dev_hdr->dev_num << 2) | (pci_hdr->irq_pin - 1);
 		mpc_intsrc = last_addr;
 		mptable_add_irq_src(mpc_intsrc, pcibusid, srcbusirq, ioapicid, pci_hdr->irq_line);
 
-- 
2.44.0





[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux