File 030-cli-Add-features-hyperv.emsr_bitmap.state-on-off.patch of Package virt-manager
Subject: cli: Add --features hyperv.emsr_bitmap.state=on/off
From: Lin Ma lma@suse.de Mon Dec 30 19:50:21 2024 +0800
Date: Wed Jan 29 10:48:57 2025 +0100:
Git: 1f43c0d1d9d7128d24f5b6628b5f01e920a9f1fa
Signed-off-by: Lin Ma <lma@suse.de>
diff --git a/tests/data/cli/compare/virt-install-many-devices.xml b/tests/data/cli/compare/virt-install-many-devices.xml
index eeb964620..cea5b3890 100644
--- a/tests/data/cli/compare/virt-install-many-devices.xml
+++ b/tests/data/cli/compare/virt-install-many-devices.xml
@@ -155,6 +155,7 @@
<evmcs state="on"/>
<avic state="on"/>
<xmm_input state="on"/>
+ <emsr_bitmap state="on"/>
</hyperv>
<vmport state="off"/>
<kvm>
diff --git a/tests/test_cli.py b/tests/test_cli.py
index 76768dfe0..69f48df3a 100644
--- a/tests/test_cli.py
+++ b/tests/test_cli.py
@@ -582,6 +582,7 @@ hyperv.ipi.state=on,\
hyperv.evmcs.state=on,\
hyperv.avic.state=on,\
hyperv.xmm_input.state=on,\
+hyperv.emsr_bitmap.state=on,\
kvm.pv-ipi.state=on,\
msrs.unknown=ignore
diff --git a/virtinst/cli.py b/virtinst/cli.py
index add19ac09..dcd2b8c8b 100644
--- a/virtinst/cli.py
+++ b/virtinst/cli.py
@@ -3095,6 +3095,7 @@ class ParserFeatures(VirtCLIParser):
cls.add_arg("hyperv.evmcs.state", "hyperv_evmcs", is_onoff=True)
cls.add_arg("hyperv.avic.state", "hyperv_avic", is_onoff=True)
cls.add_arg("hyperv.xmm_input.state", "hyperv_xmm_input", is_onoff=True)
+ cls.add_arg("hyperv.emsr_bitmap.state", "hyperv_emsr_bitmap", is_onoff=True)
cls.add_arg("vmport.state", "vmport", is_onoff=True)
cls.add_arg("kvm.hidden.state", "kvm_hidden", is_onoff=True)
diff --git a/virtinst/domain/features.py b/virtinst/domain/features.py
index ae3b23d98..cba3b710d 100644
--- a/virtinst/domain/features.py
+++ b/virtinst/domain/features.py
@@ -44,6 +44,7 @@ class DomainFeatures(XMLBuilder):
hyperv_evmcs = XMLProperty("./hyperv/evmcs/@state", is_onoff=True)
hyperv_avic = XMLProperty("./hyperv/avic/@state", is_onoff=True)
hyperv_xmm_input = XMLProperty("./hyperv/xmm_input/@state", is_onoff=True)
+ hyperv_emsr_bitmap = XMLProperty("./hyperv/emsr_bitmap/@state", is_onoff=True)
vmport = XMLProperty("./vmport/@state", is_onoff=True)
kvm_hidden = XMLProperty("./kvm/hidden/@state", is_onoff=True)