mirror of
https://github.com/virt-manager/virt-manager.git
synced 2024-12-23 17:34:21 +03:00
cli: --features: use predictable cli subarg names
To match the XML schema, rename these subarguments and add aliases to preserve compatibility: * eoi -> apic.eoi * gic_version -> gic.version * hyperv_relaxed -> hyperv.relaxed.state * hyperv_reset -> hyperv.reset.state * hyperv_spinlocks_retries -> hyperv.spinlocks.retries * hyperv_spinlocks -> hyperv.spinlocks.state * hyperv_synic -> hyperv.synic.state * hyperv_vapic -> hyperv.vapic.state * kvm_hidden -> kvm.hidden.state * pmu -> pmu.state * smm -> smm.state * vmcoreinfo -> vmcoreinfo.state * vmport -> vmport.state
This commit is contained in:
parent
6aa9c6eecf
commit
a160fac5e8
@ -295,15 +295,15 @@ apic, eoi, privnet, and hyperv features. Some examples:
|
||||
|
||||
=over 4
|
||||
|
||||
=item B<--features eoi=on>
|
||||
=item B<--features apic.eoi=on>
|
||||
|
||||
Enable APIC PV EOI
|
||||
|
||||
=item B<--features hyperv_vapic=on,hyperv_spinlocks=off>
|
||||
=item B<--features hyperv.vapic.state=on,hyperv.spinlocks.state=off>
|
||||
|
||||
Enable hypver VAPIC, but disable spinlocks
|
||||
|
||||
=item B<--features kvm_hidden=on>
|
||||
=item B<--features kvm.hidden.state==on>
|
||||
|
||||
Allow the KVM hypervisor signature to be hidden from the guest
|
||||
|
||||
@ -311,12 +311,12 @@ Allow the KVM hypervisor signature to be hidden from the guest
|
||||
|
||||
Notify the guest that the host supports paravirtual spinlocks for example by exposing the pvticketlocks mechanism.
|
||||
|
||||
=item B<--features gic_version=2>
|
||||
=item B<--features gic.version=2>
|
||||
|
||||
This is relevant only for ARM architectures. Possible values are "host" or
|
||||
version number.
|
||||
|
||||
=item B<--features smm=on>
|
||||
=item B<--features smm.state=on>
|
||||
|
||||
This enables System Management Mode of hypervisor. Some UEFI firmwares may
|
||||
require this feature to be present. (QEMU supports SMM only with q35 machine
|
||||
|
@ -787,7 +787,7 @@ def add_guest_xml_options(geng):
|
||||
geng.add_argument("--features", action="append",
|
||||
help=_("Set domain <features> XML. Ex:\n"
|
||||
"--features acpi=off\n"
|
||||
"--features apic=on,eoi=on"))
|
||||
"--features apic=on,apic.eoi=on"))
|
||||
|
||||
ParserClock.register()
|
||||
geng.add_argument("--clock", action="append",
|
||||
@ -2121,6 +2121,21 @@ class ParserSecurity(VirtCLIParser):
|
||||
class ParserFeatures(VirtCLIParser):
|
||||
cli_arg_name = "features"
|
||||
guest_propname = "features"
|
||||
aliases = {
|
||||
"apic.eoi": "eoi",
|
||||
"pmu.state": "pmu",
|
||||
"vmport.state": "vmport",
|
||||
"kvm.hidden.state": "kvm_hidden",
|
||||
"gic.version": "gic_version",
|
||||
"smm.state": "smm",
|
||||
"vmcoreinfo.state": "vmcoreinfo",
|
||||
"hyperv.reset.state": "hyperv_reset",
|
||||
"hyperv.vapic.state": "hyperv_vapic",
|
||||
"hyperv.relaxed.state": "hyperv_relaxed",
|
||||
"hyperv.spinlocks.state": "hyperv_spinlocks",
|
||||
"hyperv.spinlocks.retries": "hyperv_spinlocks_retries",
|
||||
"hyperv.synic.state": "hyperv_synic",
|
||||
}
|
||||
|
||||
@classmethod
|
||||
def _init_class(cls, **kwargs):
|
||||
@ -2131,24 +2146,25 @@ class ParserFeatures(VirtCLIParser):
|
||||
cls.add_arg("privnet", "privnet", is_onoff=True)
|
||||
cls.add_arg("hap", "hap", is_onoff=True)
|
||||
cls.add_arg("viridian", "viridian", is_onoff=True)
|
||||
cls.add_arg("eoi", "eoi", is_onoff=True)
|
||||
cls.add_arg("pmu", "pmu", is_onoff=True)
|
||||
|
||||
cls.add_arg("hyperv_reset", "hyperv_reset", is_onoff=True)
|
||||
cls.add_arg("hyperv_vapic", "hyperv_vapic", is_onoff=True)
|
||||
cls.add_arg("hyperv_relaxed", "hyperv_relaxed", is_onoff=True)
|
||||
cls.add_arg("hyperv_spinlocks", "hyperv_spinlocks", is_onoff=True)
|
||||
cls.add_arg("hyperv_spinlocks_retries", "hyperv_spinlocks_retries")
|
||||
cls.add_arg("hyperv_synic", "hyperv_synic", is_onoff=True)
|
||||
cls.add_arg("apic.eoi", "eoi", is_onoff=True)
|
||||
cls.add_arg("pmu.state", "pmu", is_onoff=True)
|
||||
|
||||
cls.add_arg("vmport", "vmport", is_onoff=True)
|
||||
cls.add_arg("kvm_hidden", "kvm_hidden", is_onoff=True)
|
||||
cls.add_arg("pvspinlock", "pvspinlock", is_onoff=True)
|
||||
cls.add_arg("hyperv.reset.state", "hyperv_reset", is_onoff=True)
|
||||
cls.add_arg("hyperv.vapic.state", "hyperv_vapic", is_onoff=True)
|
||||
cls.add_arg("hyperv.relaxed.state", "hyperv_relaxed", is_onoff=True)
|
||||
cls.add_arg("hyperv.spinlocks.state", "hyperv_spinlocks", is_onoff=True)
|
||||
cls.add_arg("hyperv.spinlocks.retries", "hyperv_spinlocks_retries")
|
||||
cls.add_arg("hyperv.synic.state", "hyperv_synic", is_onoff=True)
|
||||
|
||||
cls.add_arg("gic_version", "gic_version")
|
||||
cls.add_arg("vmport.state", "vmport", is_onoff=True)
|
||||
cls.add_arg("kvm.hidden.state", "kvm_hidden", is_onoff=True)
|
||||
cls.add_arg("pvspinlock.state", "pvspinlock", is_onoff=True)
|
||||
|
||||
cls.add_arg("smm", "smm", is_onoff=True)
|
||||
cls.add_arg("vmcoreinfo", "vmcoreinfo", is_onoff=True)
|
||||
cls.add_arg("gic.version", "gic_version")
|
||||
|
||||
cls.add_arg("smm.state", "smm", is_onoff=True)
|
||||
cls.add_arg("vmcoreinfo.state", "vmcoreinfo", is_onoff=True)
|
||||
|
||||
|
||||
###################
|
||||
|
Loading…
Reference in New Issue
Block a user