From: Dongli Si <dongli.si.linux@gmail.com>
To: kvm@vger.kernel.org
Cc: will@kernel.org, julien.thierry.kdev@gmail.com
Subject: [PATCH kvmtool] x86: mptable: Fix PCI device number in source bus IRQ
Date: Wed, 11 Nov 2026 20:31:33 +0800 [thread overview]
Message-ID: <20261111123133.1228125-1-dongli.si.linux@gmail.com> (raw)
For PCI interrupts, bits 6:2 of srcbusirq identify the source device.
Use dev_hdr->dev_num to populate those bits.
Fixes: f83cd1611d4b ("kvm tools: irq: replace the x86 irq rbtree with the PCI device tree")
Signed-off-by: Dongli Si <dongli.si.linux@gmail.com>
---
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.56.0
reply other threads:[~2026-11-11 12:32 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20261111123133.1228125-1-dongli.si.linux@gmail.com \
--to=dongli.si.linux@gmail.com \
--cc=julien.thierry.kdev@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=will@kernel.org \
/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