File 031-cli-Add-features-hyperv.tlbflush.direct.state-on-off.patch of Package virt-manager
Subject: cli: Add --features hyperv.tlbflush.direct.state=on/off
From: Lin Ma lma@suse.de Mon Dec 30 19:50:40 2024 +0800
Date: Wed Jan 29 10:48:57 2025 +0100:
Git: 5f2a2dbd0a2ccecd76710067854c07c1ebd5ea09
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 cea5b3890..996873a8a 100644
--- a/tests/data/cli/compare/virt-install-many-devices.xml
+++ b/tests/data/cli/compare/virt-install-many-devices.xml
@@ -150,7 +150,9 @@
<reset state="on"/>
<frequencies state="on"/>
<reenlightenment state="on"/>
- <tlbflush state="on"/>
+ <tlbflush state="on">
+ <direct state="on"/>
+ </tlbflush>
<ipi state="on"/>
<evmcs state="on"/>
<avic state="on"/>
diff --git a/tests/test_cli.py b/tests/test_cli.py
index 69f48df3a..18a76612a 100644
--- a/tests/test_cli.py
+++ b/tests/test_cli.py
@@ -578,6 +578,7 @@ hyperv.reset.state=off,hyperv_reset=on,\
hyperv.frequencies.state=on,\
hyperv.reenlightenment.state=on,\
hyperv.tlbflush.state=on,\
+hyperv.tlbflush.direct.state=on,\
hyperv.ipi.state=on,\
hyperv.evmcs.state=on,\
hyperv.avic.state=on,\
diff --git a/virtinst/cli.py b/virtinst/cli.py
index dcd2b8c8b..5da607be4 100644
--- a/virtinst/cli.py
+++ b/virtinst/cli.py
@@ -3091,6 +3091,7 @@ class ParserFeatures(VirtCLIParser):
cls.add_arg("hyperv.frequencies.state", "hyperv_frequencies", is_onoff=True)
cls.add_arg("hyperv.reenlightenment.state", "hyperv_reenlightenment", is_onoff=True)
cls.add_arg("hyperv.tlbflush.state", "hyperv_tlbflush", is_onoff=True)
+ cls.add_arg("hyperv.tlbflush.direct.state", "hyperv_tlbflush_direct", is_onoff=True)
cls.add_arg("hyperv.ipi.state", "hyperv_ipi", is_onoff=True)
cls.add_arg("hyperv.evmcs.state", "hyperv_evmcs", is_onoff=True)
cls.add_arg("hyperv.avic.state", "hyperv_avic", is_onoff=True)
diff --git a/virtinst/domain/features.py b/virtinst/domain/features.py
index cba3b710d..d001ddfa1 100644
--- a/virtinst/domain/features.py
+++ b/virtinst/domain/features.py
@@ -40,6 +40,7 @@ class DomainFeatures(XMLBuilder):
hyperv_frequencies = XMLProperty("./hyperv/frequencies/@state", is_onoff=True)
hyperv_reenlightenment = XMLProperty("./hyperv/reenlightenment/@state", is_onoff=True)
hyperv_tlbflush = XMLProperty("./hyperv/tlbflush/@state", is_onoff=True)
+ hyperv_tlbflush_direct = XMLProperty("./hyperv/tlbflush/direct/@state", is_onoff=True)
hyperv_ipi = XMLProperty("./hyperv/ipi/@state", is_onoff=True)
hyperv_evmcs = XMLProperty("./hyperv/evmcs/@state", is_onoff=True)
hyperv_avic = XMLProperty("./hyperv/avic/@state", is_onoff=True)