@@ -171,10 +171,8 @@ int mptable__init(struct kvm *kvm)
nentries++;
/*
- * IRQ sources.
- * Also note we use PCI irqs here, no for ISA bus yet.
+ * PCI IRQ sources.
*/
-
dev_hdr = device__first_dev(DEVICE_BUS_PCI);
while (dev_hdr) {
unsigned char srcbusirq;
@@ -189,6 +187,23 @@ int mptable__init(struct kvm *kvm)
dev_hdr = device__next_dev(dev_hdr);
}
+ /*
+ * ISA IRQ sources.
+ */
+ for (i = 0; i < 16; i++) {
+ if (i == 2)
+ continue;
+
+ mpc_intsrc = last_addr;
+ if (i == 0)
+ mptable_add_irq_src(mpc_intsrc, isabusid, i, ioapicid, 2);
+ else
+ mptable_add_irq_src(mpc_intsrc, isabusid, i, ioapicid, i);
+
+ last_addr = (void *)&mpc_intsrc[1];
+ nentries++;
+ }
+
/*
* Local IRQs assignment (LINT0, LINT1)
*/
According to Intel MultiProcessor Specification: "There is one entry for each I/O APIC interrupt input that is connected." Missing this will cause the guest kernel to report some warnings or errors when enabling the io apic. Fixes: 0c7c14a7 ("kvm tools: Add MP tables support") Signed-off-by: Dongli Si <sidongli1997@gmail.com> --- x86/mptable.c | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-)