[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v2 07/28] x86_iommu: move the kernel-irqchip check in
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] [PULL v2 07/28] x86_iommu: move the kernel-irqchip check in common code |
Date: |
Wed, 24 Oct 2018 20:53:11 -0400 |
From: "Singh, Brijesh" <address@hidden>
Interrupt remapping needs kernel-irqchip={off|split} on both Intel and AMD
platforms. Move the check in common place.
Signed-off-by: Brijesh Singh <address@hidden>
Reviewed-by: Peter Xu <address@hidden>
Cc: Peter Xu <address@hidden>
Cc: "Michael S. Tsirkin" <address@hidden>
Cc: Paolo Bonzini <address@hidden>
Cc: Richard Henderson <address@hidden>
Cc: Eduardo Habkost <address@hidden>
Cc: Marcel Apfelbaum <address@hidden>
Cc: Tom Lendacky <address@hidden>
Cc: Suravee Suthikulpanit <address@hidden>
Reviewed-by: Michael S. Tsirkin <address@hidden>
Signed-off-by: Michael S. Tsirkin <address@hidden>
---
hw/i386/intel_iommu.c | 7 -------
hw/i386/x86-iommu.c | 9 +++++++++
2 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c
index f24ebfca1c..015a6fc492 100644
--- a/hw/i386/intel_iommu.c
+++ b/hw/i386/intel_iommu.c
@@ -3262,13 +3262,6 @@ static bool vtd_decide_config(IntelIOMMUState *s, Error
**errp)
{
X86IOMMUState *x86_iommu = X86_IOMMU_DEVICE(s);
- /* Currently Intel IOMMU IR only support "kernel-irqchip={off|split}" */
- if (x86_iommu->intr_supported && kvm_irqchip_in_kernel() &&
- !kvm_irqchip_is_split()) {
- error_setg(errp, "Intel Interrupt Remapping cannot work with "
- "kernel-irqchip=on, please use 'split|off'.");
- return false;
- }
if (s->intr_eim == ON_OFF_AUTO_ON && !x86_iommu->intr_supported) {
error_setg(errp, "eim=on cannot be selected without intremap=on");
return false;
diff --git a/hw/i386/x86-iommu.c b/hw/i386/x86-iommu.c
index 8a01a2dd25..7440cb8d60 100644
--- a/hw/i386/x86-iommu.c
+++ b/hw/i386/x86-iommu.c
@@ -25,6 +25,7 @@
#include "qapi/error.h"
#include "qemu/error-report.h"
#include "trace.h"
+#include "sysemu/kvm.h"
void x86_iommu_iec_register_notifier(X86IOMMUState *iommu,
iec_notify_fn fn, void *data)
@@ -94,6 +95,14 @@ static void x86_iommu_realize(DeviceState *dev, Error **errp)
return;
}
+ /* Both Intel and AMD IOMMU IR only support "kernel-irqchip={off|split}" */
+ if (x86_iommu->intr_supported && kvm_irqchip_in_kernel() &&
+ !kvm_irqchip_is_split()) {
+ error_setg(errp, "Interrupt Remapping cannot work with "
+ "kernel-irqchip=on, please use 'split|off'.");
+ return;
+ }
+
if (x86_class->realize) {
x86_class->realize(dev, errp);
}
--
MST
- [Qemu-devel] [PULL v2 00/28] pci, pc, virtio: fixes, features, Michael S. Tsirkin, 2018/10/24
- [Qemu-devel] [PULL v2 02/28] intel_iommu: introduce vtd_reset_caches(), Michael S. Tsirkin, 2018/10/24
- [Qemu-devel] [PULL v2 01/28] virtio-blk: fix comment for virtio_blk_rw_complete, Michael S. Tsirkin, 2018/10/24
- [Qemu-devel] [PULL v2 03/28] intel_iommu: better handling of dmar state switch, Michael S. Tsirkin, 2018/10/24
- [Qemu-devel] [PULL v2 04/28] intel_iommu: move ce fetching out when sync shadow, Michael S. Tsirkin, 2018/10/24
- [Qemu-devel] [PULL v2 05/28] intel_iommu: handle invalid ce for shadow sync, Michael S. Tsirkin, 2018/10/24
- [Qemu-devel] [PULL v2 06/28] vhost-user-blk: start vhost when guest kicks, Michael S. Tsirkin, 2018/10/24
- [Qemu-devel] [PULL v2 08/28] x86_iommu: move vtd_generate_msi_message in common file, Michael S. Tsirkin, 2018/10/24
- [Qemu-devel] [PULL v2 07/28] x86_iommu: move the kernel-irqchip check in common code,
Michael S. Tsirkin <=
- [Qemu-devel] [PULL v2 09/28] x86_iommu/amd: remove V=1 check from amdvi_validate_dte(), Michael S. Tsirkin, 2018/10/24
- [Qemu-devel] [PULL v2 10/28] x86_iommu/amd: make the address space naming consistent with intel-iommu, Michael S. Tsirkin, 2018/10/24
- [Qemu-devel] [PULL v2 11/28] x86_iommu/amd: Prepare for interrupt remap support, Michael S. Tsirkin, 2018/10/24
- [Qemu-devel] [PULL v2 12/28] x86_iommu/amd: Add interrupt remap support when VAPIC is not enabled, Michael S. Tsirkin, 2018/10/24
- [Qemu-devel] [PULL v2 13/28] i386: acpi: add IVHD device entry for IOAPIC, Michael S. Tsirkin, 2018/10/24
- [Qemu-devel] [PULL v2 14/28] x86_iommu/amd: Add interrupt remap support when VAPIC is enabled, Michael S. Tsirkin, 2018/10/24
- [Qemu-devel] [PULL v2 15/28] x86_iommu/amd: Enable Guest virtual APIC support, Michael S. Tsirkin, 2018/10/24
- [Qemu-devel] [PULL v2 16/28] MAINTAINERS: list "tests/acpi-test-data" files in ACPI/SMBIOS section, Michael S. Tsirkin, 2018/10/24
- [Qemu-devel] [PULL v2 17/28] pci-testdev: add optional memory bar, Michael S. Tsirkin, 2018/10/24
- [Qemu-devel] [PULL v2 18/28] hw/pci-host/x86: extract get_pci_hole64_start_value() helpers, Michael S. Tsirkin, 2018/10/24