Blame SOURCES/virt-manager-cli-add-ioapic.driver-to-features.patch

7c1349
From fa5f5f8f9b2b00b7580cb55f82c17e66e54b438d Mon Sep 17 00:00:00 2001
7c1349
From: Jonathon Jongsma <jjongsma@redhat.com>
7c1349
Date: Tue, 11 Jan 2022 11:21:39 -0600
7c1349
Subject: [PATCH] cli: add 'ioapic.driver' to --features
7c1349
7c1349
Add the ability to set the ioapic driver using the --features argument:
7c1349
7c1349
    $ virt-install --features ioapic.driver=qemu ...
7c1349
7c1349
This results in the following xml:
7c1349
7c1349
  <features>
7c1349
    ...
7c1349
    <ioapic driver="qemu"/>
7c1349
  </features>
7c1349
7c1349
This is required in order to install a guest with >255 cpus. Such a
7c1349
configuration requires an iommu with extended interrupt mode enabled,
7c1349
which in turn requires IOMMU interrupt remapping to be enabled, which in
7c1349
turn requires a split I/O APIC.
7c1349
7c1349
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
7c1349
(cherry picked from commit 9766beea0432faad7cded9e0285d05851659020e)
7c1349
7c1349
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2037202
7c1349
7c1349
Signed-off-by: Jonathon Jongsma <jjongsma@redhat.com>
7c1349
---
7c1349
 tests/data/cli/compare/virt-install-singleton-config-3.xml | 1 +
7c1349
 tests/data/xmlparse/change-guest-out.xml                   | 1 +
7c1349
 tests/test_cli.py                                          | 2 +-
7c1349
 tests/test_xmlparse.py                                     | 1 +
7c1349
 virtinst/cli.py                                            | 1 +
7c1349
 virtinst/domain/features.py                                | 1 +
7c1349
 6 files changed, 6 insertions(+), 1 deletion(-)
7c1349
7c1349
diff --git a/tests/data/cli/compare/virt-install-singleton-config-3.xml b/tests/data/cli/compare/virt-install-singleton-config-3.xml
7c1349
index d2e7a363..a36c7bf2 100644
7c1349
--- a/tests/data/cli/compare/virt-install-singleton-config-3.xml
7c1349
+++ b/tests/data/cli/compare/virt-install-singleton-config-3.xml
7c1349
@@ -73,6 +73,7 @@
7c1349
     <pvspinlock state="off"/>
7c1349
     <smm state="off"/>
7c1349
     <vmcoreinfo state="on"/>
7c1349
+    <ioapic driver="qemu"/>
7c1349
   </features>
7c1349
   <cpu>
7c1349
     <topology sockets="1" cores="3" threads="2"/>
7c1349
diff --git a/tests/data/xmlparse/change-guest-out.xml b/tests/data/xmlparse/change-guest-out.xml
7c1349
index 17af0826..3faf8783 100644
7c1349
--- a/tests/data/xmlparse/change-guest-out.xml
7c1349
+++ b/tests/data/xmlparse/change-guest-out.xml
7c1349
@@ -32,6 +32,7 @@
7c1349
       <hidden state="on"/>
7c1349
     </kvm>
7c1349
     <pvspinlock state="on"/>
7c1349
+    <ioapic driver="qemu"/>
7c1349
   </features>
7c1349
   <numatune>
7c1349
     <memory nodeset="2,4,6"/>
7c1349
diff --git a/tests/test_cli.py b/tests/test_cli.py
7c1349
index 9f0cdfe9..75a891f0 100644
7c1349
--- a/tests/test_cli.py
7c1349
+++ b/tests/test_cli.py
7c1349
@@ -558,7 +558,7 @@ c.add_compare("""
7c1349
 --vcpus vcpu.current=3,maxvcpus=4,vcpu.placement=auto
7c1349
 --memory hotplugmemorymax=2048,hotplugmemoryslots=2
7c1349
 --disk none
7c1349
---features apic.eoi=off,hap=on,hyperv.synic.state=on,hyperv.reset.state=off,hyperv.spinlocks.state=on,hyperv.spinlocks.retries=5678,pae=on,pmu.state=on,pvspinlock.state=off,smm.state=off,viridian=on,vmcoreinfo.state=on,vmport.state=off,kvm.hidden.state=on,hyperv.vapic.state=off,hyperv.relaxed.state=off,gic.version=host,kvm.hint-dedicated.state=on
7c1349
+--features apic.eoi=off,hap=on,hyperv.synic.state=on,hyperv.reset.state=off,hyperv.spinlocks.state=on,hyperv.spinlocks.retries=5678,pae=on,pmu.state=on,pvspinlock.state=off,smm.state=off,viridian=on,vmcoreinfo.state=on,vmport.state=off,kvm.hidden.state=on,hyperv.vapic.state=off,hyperv.relaxed.state=off,gic.version=host,kvm.hint-dedicated.state=on,ioapic.driver=qemu
7c1349
 --clock rtc_present=no,pit_present=yes,pit_tickpolicy=catchup,tsc_present=no,platform_present=no,hypervclock_present=no,platform_tickpolicy=foo,hpet_tickpolicy=bar,tsc_tickpolicy=wibble,kvmclock_tickpolicy=wobble,hypervclock_tickpolicy=woo
7c1349
 --boot bios.useserial=no,bios.rebootTimeout=60,cmdline=root=/foo,smbios.mode=host,bootmenu.enable=yes,loader_ro=yes,loader.type=rom,loader=/tmp/foo
7c1349
 --memorybacking access.mode=shared,source.type=anonymous,hugepages=on
7c1349
diff --git a/tests/test_xmlparse.py b/tests/test_xmlparse.py
7c1349
index 6d1aaddb..ac2fb38d 100644
7c1349
--- a/tests/test_xmlparse.py
7c1349
+++ b/tests/test_xmlparse.py
7c1349
@@ -160,6 +160,7 @@ def testAlterGuest():
7c1349
     check("kvm_hidden", None, True)
7c1349
     check("pvspinlock", None, True)
7c1349
     check("gic_version", None, False)
7c1349
+    check("ioapic_driver", None, "qemu")
7c1349
 
7c1349
     check = _make_checker(guest.cpu)
7c1349
     check("match", "exact", "strict")
7c1349
diff --git a/virtinst/cli.py b/virtinst/cli.py
7c1349
index e1a988f9..dbd4a545 100644
7c1349
--- a/virtinst/cli.py
7c1349
+++ b/virtinst/cli.py
7c1349
@@ -2777,6 +2777,7 @@ class ParserFeatures(VirtCLIParser):
7c1349
 
7c1349
         cls.add_arg("smm.state", "smm", is_onoff=True)
7c1349
         cls.add_arg("vmcoreinfo.state", "vmcoreinfo", is_onoff=True)
7c1349
+        cls.add_arg("ioapic.driver", "ioapic_driver")
7c1349
 
7c1349
 
7c1349
 ###################
7c1349
diff --git a/virtinst/domain/features.py b/virtinst/domain/features.py
7c1349
index 246839f2..7d32edc0 100644
7c1349
--- a/virtinst/domain/features.py
7c1349
+++ b/virtinst/domain/features.py
7c1349
@@ -41,6 +41,7 @@ class DomainFeatures(XMLBuilder):
7c1349
 
7c1349
     smm = XMLProperty("./smm/@state", is_onoff=True)
7c1349
     vmcoreinfo = XMLProperty("./vmcoreinfo/@state", is_onoff=True)
7c1349
+    ioapic_driver = XMLProperty("./ioapic/@driver")
7c1349
 
7c1349
 
7c1349
     ##################
7c1349
-- 
7c1349
2.34.1
7c1349