[virt-manager] [PATCH 4/7] cli: Add kvm.pv-ipi.state to --features

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Set kvm pv-ipi feature by --features argument.

E.g. virt-install --features kvm.pv-ipi.state=off
It results in the following domain xml:

 <features>
   <kvm>
     <pv-ipi state='off'/>
   </kvm>
 </features>

Signed-off-by: Lin Ma <lma@xxxxxxx>
---
 tests/data/cli/compare/virt-install-many-devices.xml | 1 +
 tests/data/xmlparse/change-guest-out.xml             | 1 +
 tests/test_cli.py                                    | 2 +-
 tests/test_xmlparse.py                               | 1 +
 virtinst/cli.py                                      | 1 +
 virtinst/domain/features.py                          | 1 +
 6 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/tests/data/cli/compare/virt-install-many-devices.xml b/tests/data/cli/compare/virt-install-many-devices.xml
index e4a7da8f..1c95c4fb 100644
--- a/tests/data/cli/compare/virt-install-many-devices.xml
+++ b/tests/data/cli/compare/virt-install-many-devices.xml
@@ -145,6 +145,7 @@
       <hidden state="off"/>
       <hint-dedicated state="on"/>
       <poll-control state="on"/>
+      <pv-ipi state="off"/>
     </kvm>
     <pvspinlock state="off"/>
     <smm state="off"/>
diff --git a/tests/data/xmlparse/change-guest-out.xml b/tests/data/xmlparse/change-guest-out.xml
index c9995639..400e3baf 100644
--- a/tests/data/xmlparse/change-guest-out.xml
+++ b/tests/data/xmlparse/change-guest-out.xml
@@ -30,6 +30,7 @@
     <vmcoreinfo state="on"/>
     <kvm>
       <hidden state="on"/>
+      <pv-ipi state="off"/>
     </kvm>
     <pvspinlock state="on"/>
     <ioapic driver="qemu"/>
diff --git a/tests/test_cli.py b/tests/test_cli.py
index 7c7f33a1..5de9a60b 100644
--- a/tests/test_cli.py
+++ b/tests/test_cli.py
@@ -560,7 +560,7 @@ memorytune0.vcpus=0-3,memorytune0.node0.id=0,memorytune0.node0.bandwidth=60
 --metadata title=my-title,description=my-description,uuid=00000000-1111-2222-3333-444444444444,genid=e9392370-2917-565e-692b-d057f46512d6,genid_enable=yes
 
 
---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,kvm.poll-control.state=on,ioapic.driver=qemu,acpi=off,eoi=on,privnet=on,hyperv_synic=on,hyperv_reset=on,hyperv_spinlocks=on,hyperv_spinlocks_retries=5678,vmport=off,pmu=off,vmcoreinfo=on,kvm_hidden=off,hyperv_vapic=on,smm=off
+--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,kvm.poll-control.state=on,ioapic.driver=qemu,acpi=off,eoi=on,privnet=on,hyperv_synic=on,hyperv_reset=on,hyperv_spinlocks=on,hyperv_spinlocks_retries=5678,vmport=off,pmu=off,vmcoreinfo=on,kvm_hidden=off,hyperv_vapic=on,smm=off,kvm.pv-ipi.state=off
 
 
 --clock offset=utc,hpet_present=no,rtc_tickpolicy=merge,timer2.name=hypervclock,timer3.name=pit,timer1.present=yes,timer3.tickpolicy=delay,timer2.present=no,timer4.name=rtc,timer5.name=tsc,timer6.name=tsc,timer4.track=wall,timer5.frequency=10,timer6.mode=emulate,timer7.name=rtc,timer7.tickpolicy=catchup,timer7.catchup.threshold=123,timer7.catchup.slew=120,timer7.catchup.limit=10000,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
diff --git a/tests/test_xmlparse.py b/tests/test_xmlparse.py
index 1bf0ebe5..fcacb587 100644
--- a/tests/test_xmlparse.py
+++ b/tests/test_xmlparse.py
@@ -163,6 +163,7 @@ def testAlterGuest():
     check("pvspinlock", None, True)
     check("gic_version", None, False)
     check("ioapic_driver", None, "qemu")
+    check("kvm_pv_ipi", None, False)
 
     check = _make_checker(guest.cpu)
     check("match", "exact", "strict")
diff --git a/virtinst/cli.py b/virtinst/cli.py
index 7615f743..a998746d 100644
--- a/virtinst/cli.py
+++ b/virtinst/cli.py
@@ -3016,6 +3016,7 @@ class ParserFeatures(VirtCLIParser):
         cls.add_arg("kvm.hidden.state", "kvm_hidden", is_onoff=True)
         cls.add_arg("kvm.hint-dedicated.state", "kvm_hint_dedicated", is_onoff=True)
         cls.add_arg("kvm.poll-control.state", "kvm_poll_control", is_onoff=True)
+        cls.add_arg("kvm.pv-ipi.state", "kvm_pv_ipi", is_onoff=True)
         cls.add_arg("pvspinlock.state", "pvspinlock", is_onoff=True)
 
         cls.add_arg("gic.version", "gic_version")
diff --git a/virtinst/domain/features.py b/virtinst/domain/features.py
index 87de4358..58514b6f 100644
--- a/virtinst/domain/features.py
+++ b/virtinst/domain/features.py
@@ -38,6 +38,7 @@ class DomainFeatures(XMLBuilder):
     kvm_hidden = XMLProperty("./kvm/hidden/@state", is_onoff=True)
     kvm_hint_dedicated = XMLProperty("./kvm/hint-dedicated/@state", is_onoff=True)
     kvm_poll_control = XMLProperty("./kvm/poll-control/@state", is_onoff=True)
+    kvm_pv_ipi = XMLProperty("./kvm/pv-ipi/@state", is_onoff=True)
     pvspinlock = XMLProperty("./pvspinlock/@state", is_onoff=True)
 
     smm = XMLProperty("./smm/@state", is_onoff=True)
-- 
2.41.0





[Index of Archives]     [Linux Virtualization]     [KVM Development]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux