[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v2 12/16] pc: Require IRQ remapping and EIM if there
From: |
Eduardo Habkost |
Subject: |
[Qemu-devel] [PULL v2 12/16] pc: Require IRQ remapping and EIM if there could be x2APIC CPUs |
Date: |
Mon, 24 Oct 2016 17:52:21 -0200 |
From: Igor Mammedov <address@hidden>
It would prevent starting guest with incorrect configs
where interrupts couldn't be delivered to CPUs with
APIC IDs > 255.
Signed-off-by: Igor Mammedov <address@hidden>
Reviewed-by: Radim Krčmář <address@hidden>
Reviewed-by: Eduardo Habkost <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
---
hw/i386/pc.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index f9f85bf..f56ea0f 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -68,6 +68,7 @@
#include "qapi-visit.h"
#include "qom/cpu.h"
#include "hw/nmi.h"
+#include "hw/i386/intel_iommu.h"
/* debug PC/ISA interrupts */
//#define DEBUG_IRQ
@@ -1273,6 +1274,19 @@ void pc_machine_done(Notifier *notifier, void *data)
sizeof(pcms->boot_cpus_le));
}
}
+
+ if (pcms->apic_id_limit > 255) {
+ IntelIOMMUState *iommu = INTEL_IOMMU_DEVICE(x86_iommu_get_default());
+
+ if (!iommu || !iommu->x86_iommu.intr_supported ||
+ iommu->intr_eim != ON_OFF_AUTO_ON) {
+ error_report("current -smp configuration requires "
+ "Extended Interrupt Mode enabled. "
+ "You can add an IOMMU using: "
+ "-device intel-iommu,intremap=on,eim=on");
+ exit(EXIT_FAILURE);
+ }
+ }
}
void pc_guest_info_init(PCMachineState *pcms)
--
2.7.4
- [Qemu-devel] [PULL v2 03/16] acpi: cphp: Force switch to modern cpu hotplug if APIC ID > 254, (continued)
- [Qemu-devel] [PULL v2 03/16] acpi: cphp: Force switch to modern cpu hotplug if APIC ID > 254, Eduardo Habkost, 2016/10/24
- [Qemu-devel] [PULL v2 04/16] pc: Leave max apic_id_limit only in legacy cpu hotplug code, Eduardo Habkost, 2016/10/24
- [Qemu-devel] [PULL v2 06/16] pc: apic_common: Restore APIC ID to initial ID on reset, Eduardo Habkost, 2016/10/24
- [Qemu-devel] [PULL v2 05/16] pc: apic_common: Extend APIC ID property to 32bit, Eduardo Habkost, 2016/10/24
- [Qemu-devel] [PULL v2 08/16] pc: kvm_apic: Pass APIC ID depending on xAPIC/x2APIC mode, Eduardo Habkost, 2016/10/24
- [Qemu-devel] [PULL v2 07/16] pc: apic_common: Reset APIC ID to initial ID when switching into x2APIC mode, Eduardo Habkost, 2016/10/24
- [Qemu-devel] [PULL v2 09/16] pc: Clarify FW_CFG_MAX_CPUS usage comment, Eduardo Habkost, 2016/10/24
- [Qemu-devel] [PULL v2 10/16] Increase MAX_CPUMASK_BITS from 255 to 288, Eduardo Habkost, 2016/10/24
- [Qemu-devel] [PULL v2 11/16] pc: Add 'etc/boot-cpus' fw_cfg file for machine with more than 255 CPUs, Eduardo Habkost, 2016/10/24
- [Qemu-devel] [PULL v2 13/16] pc: q35: Bump max_cpus to 288, Eduardo Habkost, 2016/10/24
- [Qemu-devel] [PULL v2 12/16] pc: Require IRQ remapping and EIM if there could be x2APIC CPUs,
Eduardo Habkost <=
- [Qemu-devel] [PULL v2 14/16] exec: split cpu_exec_init(), Eduardo Habkost, 2016/10/24
- [Qemu-devel] [PULL v2 16/16] exec: call cpu_exec_exit() from a CPU unrealize common function, Eduardo Habkost, 2016/10/24
- [Qemu-devel] [PULL v2 15/16] exec: move cpu_exec_init() calls to realize functions, Eduardo Habkost, 2016/10/24
- Re: [Qemu-devel] [PULL v2 00/16] x86 and CPU queue, 2016-10-24, Peter Maydell, 2016/10/25