libvirt/libvirt-qemu-Enable-I-O-APIC-if-needed.patch
Jiri Denemark 733f87f1f7 libvirt-10.10.0-2.el10
- util: Fix typo in virNetDevOpenvswitchInterfaceSetQos (RHEL-69840)
- qemu: tpm: do not update profile name for transient domains (RHEL-69774)
- qemu: Enable I/O APIC if needed (RHEL-71414)
- cpu_map: Sort data files in meson.build (RHEL-70129)
- sync_qemu_models_i386: Update meson.build (RHEL-70129)
- sync_qemu_models_i386: Generate missing -v1 variants (RHEL-70129)
- cpu_map: Add 486-v1 CPU model (RHEL-70129)
- cpu_map: Add pentium-v1 CPU model (RHEL-70129)
- cpu_map: Add pentium2-v1 CPU model (RHEL-70129)
- cpu_map: Add pentium3-v1 CPU model (RHEL-70129)
- cpu_map: Add coreduo-v1 CPU model (RHEL-70129)
- cpu_map: Add n270-v1 CPU model (RHEL-70129)
- cpu_map: Add core2duo-v1 CPU model (RHEL-70129)
- cpu_map: Add qemu32-v1 CPU model (RHEL-70129)
- cpu_map: Add kvm32-v1 CPU model (RHEL-70129)
- cpu_map: Add qemu64-v1 CPU model (RHEL-70129)
- cpu_map: Add kvm64-v1 CPU model (RHEL-70129)
- cpu_map: Add Conroe-v1 CPU model (RHEL-70129)
- cpu_map: Add Penryn-v1 CPU model (RHEL-70129)
- cpu_map: Add KnightsMill-v1 CPU model (RHEL-70129)
- cpu_map: Add athlon-v1 CPU model (RHEL-70129)
- cpu_map: Add phenom-v1 CPU model (RHEL-70129)
- cpu_map: Add Opteron_G1-v1 CPU model (RHEL-70129)
- cpu_map: Add Opteron_G2-v1 CPU model (RHEL-70129)
- cpu_map: Add Opteron_G3-v1 CPU model (RHEL-70129)
- cpu_map: Add Opteron_G4-v1 CPU model (RHEL-70129)
- cpu_map: Add Opteron_G5-v1 CPU model (RHEL-70129)
- cpu_map: Add EPYC-Genoa-v1 CPU model (RHEL-70129)

Resolves: RHEL-69774, RHEL-69840, RHEL-70129, RHEL-71414
2024-12-17 10:59:14 +01:00

62 lines
2.4 KiB
Diff

From c00e8d5fd4268a119e6a09962220d766ecaf5b30 Mon Sep 17 00:00:00 2001
Message-ID: <c00e8d5fd4268a119e6a09962220d766ecaf5b30.1734429553.git.jdenemar@redhat.com>
From: Michal Privoznik <mprivozn@redhat.com>
Date: Thu, 12 Dec 2024 10:02:43 +0100
Subject: [PATCH] qemu: Enable I/O APIC if needed
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This is a follow up of my previous commits. If the number of
vCPUs exceeds some arbitrary value (255) then QEMU requires IOMMU
with EIM and intremap enabled. But in turn, intremap IOMMU
requires split I/O APIC (per virDomainDefIOMMUValidate()). Since
after my previous commits (e.g. v10.10.0-rc1~183) IOMMU is added
automagically, the I/O APIC can be also enabled automagically.
Relates to: https://issues.redhat.com/browse/RHEL-65844
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
(cherry picked from commit 2d222ecf6e73614a400b830ac56e9aaa1bc55ecc)
https://issues.redhat.com/browse/RHEL-71414
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---
src/qemu/qemu_postparse.c | 7 +++++++
tests/qemuxmlconfdata/intel-iommu-eim-autoadd.xml | 3 ---
2 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/qemu/qemu_postparse.c b/src/qemu/qemu_postparse.c
index 03b5ef825a..f48f172c37 100644
--- a/src/qemu/qemu_postparse.c
+++ b/src/qemu/qemu_postparse.c
@@ -1547,6 +1547,13 @@ qemuDomainDefEnableDefaultFeatures(virDomainDef *def,
* capabilities, we still want to enable this */
def->features[VIR_DOMAIN_FEATURE_GIC] = VIR_TRISTATE_SWITCH_ON;
}
+
+ /* IOMMU with intremap requires split I/O APIC */
+ if (def->iommu &&
+ def->iommu->intremap == VIR_TRISTATE_SWITCH_ON &&
+ def->features[VIR_DOMAIN_FEATURE_IOAPIC] == VIR_DOMAIN_IOAPIC_NONE) {
+ def->features[VIR_DOMAIN_FEATURE_IOAPIC] = VIR_DOMAIN_IOAPIC_QEMU;
+ }
}
diff --git a/tests/qemuxmlconfdata/intel-iommu-eim-autoadd.xml b/tests/qemuxmlconfdata/intel-iommu-eim-autoadd.xml
index fa3aaf0d44..5abc40e566 100644
--- a/tests/qemuxmlconfdata/intel-iommu-eim-autoadd.xml
+++ b/tests/qemuxmlconfdata/intel-iommu-eim-autoadd.xml
@@ -8,9 +8,6 @@
<type arch='x86_64' machine='q35'>hvm</type>
<boot dev='hd'/>
</os>
- <features>
- <ioapic driver='qemu'/>
- </features>
<cpu mode='custom' match='exact' check='none'>
<model fallback='forbid'>qemu64</model>
</cpu>
--
2.47.1