[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v3 44/44] x86-iommu: turn on IR by default if proper
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL v3 44/44] x86-iommu: turn on IR by default if proper |
Date: |
Thu, 20 Dec 2018 13:40:23 -0500 |
From: Peter Xu <address@hidden>
When the user didn't specify "intremap" for the IOMMU device, we turn
it on by default if it is supported. This will turn IR on for the
default Q35 platform as long as the IOMMU device is specified on new
kernels.
Signed-off-by: Peter Xu <address@hidden>
Acked-by: Paolo Bonzini <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
hw/i386/x86-iommu.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/hw/i386/x86-iommu.c b/hw/i386/x86-iommu.c
index 61ee0f1eaa..d1534c1ae0 100644
--- a/hw/i386/x86-iommu.c
+++ b/hw/i386/x86-iommu.c
@@ -112,6 +112,7 @@ static void x86_iommu_realize(DeviceState *dev, Error
**errp)
PCMachineState *pcms =
PC_MACHINE(object_dynamic_cast(OBJECT(ms), TYPE_PC_MACHINE));
QLIST_INIT(&x86_iommu->iec_notifiers);
+ bool irq_all_kernel = kvm_irqchip_in_kernel() && !kvm_irqchip_is_split();
if (!pcms || !pcms->bus) {
error_setg(errp, "Machine-type '%s' not supported by IOMMU",
@@ -121,12 +122,12 @@ static void x86_iommu_realize(DeviceState *dev, Error
**errp)
/* If the user didn't specify IR, choose a default value for it */
if (x86_iommu->intr_supported == ON_OFF_AUTO_AUTO) {
- x86_iommu->intr_supported = ON_OFF_AUTO_OFF;
+ x86_iommu->intr_supported = irq_all_kernel ?
+ ON_OFF_AUTO_OFF : ON_OFF_AUTO_ON;
}
/* Both Intel and AMD IOMMU IR only support "kernel-irqchip={off|split}" */
- if (x86_iommu_ir_supported(x86_iommu) && kvm_irqchip_in_kernel() &&
- !kvm_irqchip_is_split()) {
+ if (x86_iommu_ir_supported(x86_iommu) && irq_all_kernel) {
error_setg(errp, "Interrupt Remapping cannot work with "
"kernel-irqchip=on, please use 'split|off'.");
return;
--
MST
- [Qemu-devel] [PULL v3 26/44] hw: arm: Convert the RSDP build to the buid_append_foo() API, (continued)
- [Qemu-devel] [PULL v3 26/44] hw: arm: Convert the RSDP build to the buid_append_foo() API, Michael S. Tsirkin, 2018/12/20
- [Qemu-devel] [PULL v3 37/44] pci/pcie: perform unplug via the hotplug handler, Michael S. Tsirkin, 2018/12/20
- [Qemu-devel] [PULL v3 36/44] pci/pcihp: perform unplug via the hotplug handler, Michael S. Tsirkin, 2018/12/20
- [Qemu-devel] [PULL v3 30/44] hw/i386: Remove deprecated machines pc-0.10 and pc-0.11, Michael S. Tsirkin, 2018/12/20
- [Qemu-devel] [PULL v3 35/44] pci/pcihp: overwrite hotplug handler recursively from the start, Michael S. Tsirkin, 2018/12/20
- [Qemu-devel] [PULL v3 34/44] pci/pcihp: perform check for bus capability in pre_plug handler, Michael S. Tsirkin, 2018/12/20
- [Qemu-devel] [PULL v3 39/44] pci/shpc: perform unplug via the hotplug handler, Michael S. Tsirkin, 2018/12/20
- [Qemu-devel] [PULL v3 40/44] spapr_pci: perform unplug via the hotplug handler, Michael S. Tsirkin, 2018/12/20
- [Qemu-devel] [PULL v3 38/44] pci: Reuse pci-bridge hotplug handler handlers for pcie-pci-bridge, Michael S. Tsirkin, 2018/12/20
- [Qemu-devel] [PULL v3 41/44] pci: Adjust PCI config limit based on bus topology, Michael S. Tsirkin, 2018/12/20
- [Qemu-devel] [PULL v3 44/44] x86-iommu: turn on IR by default if proper,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL v3 43/44] x86-iommu: switch intr_supported to OnOffAuto type, Michael S. Tsirkin, 2018/12/20
- [Qemu-devel] [PULL v3 42/44] q35: set split kernel irqchip as default, Michael S. Tsirkin, 2018/12/20
- Re: [Qemu-devel] [PULL v3 00/44] pci, pc, virtio: fixes, features, Peter Maydell, 2018/12/21
- Re: [Qemu-devel] [PULL v3 00/44] pci, pc, virtio: fixes, features, no-reply, 2018/12/26