Implement kvm.poll-control.state to `virt-install --feature`. It requires libvirt >= v6.10.0. Signed-off-by: Han Han <hhan@xxxxxxxxxx> --- tests/data/cli/compare/virt-install-singleton-config-3.xml | 1 + tests/test_cli.py | 2 +- virtinst/cli.py | 1 + virtinst/domain/features.py | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/data/cli/compare/virt-install-singleton-config-3.xml b/tests/data/cli/compare/virt-install-singleton-config-3.xml index d2e7a363..41a9a347 100644 --- a/tests/data/cli/compare/virt-install-singleton-config-3.xml +++ b/tests/data/cli/compare/virt-install-singleton-config-3.xml @@ -69,6 +69,7 @@ <kvm> <hidden state="on"/> <hint-dedicated state="on"/> + <poll-control state="on"/> </kvm> <pvspinlock state="off"/> <smm state="off"/> diff --git a/tests/test_cli.py b/tests/test_cli.py index 2c3b6e5a..48c10b8e 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -557,7 +557,7 @@ c.add_compare(""" --vcpus vcpu.current=3,maxvcpus=4,vcpu.placement=auto --memory hotplugmemorymax=2048,hotplugmemoryslots=2 --disk none ---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 +--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 --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 --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 --memorybacking access.mode=shared,source.type=anonymous,hugepages=on diff --git a/virtinst/cli.py b/virtinst/cli.py index e2ea9278..b0f679e6 100644 --- a/virtinst/cli.py +++ b/virtinst/cli.py @@ -2782,6 +2782,7 @@ class ParserFeatures(VirtCLIParser): cls.add_arg("vmport.state", "vmport", is_onoff=True) 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("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 246839f2..29e7d965 100644 --- a/virtinst/domain/features.py +++ b/virtinst/domain/features.py @@ -37,6 +37,7 @@ class DomainFeatures(XMLBuilder): vmport = XMLProperty("./vmport/@state", is_onoff=True) 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) pvspinlock = XMLProperty("./pvspinlock/@state", is_onoff=True) smm = XMLProperty("./smm/@state", is_onoff=True) -- 2.31.1