mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-24 06:03:52 +03:00
conf: format/parse <vmcoreinfo> as tristate
<features><vmcoreinfo/> is a bare boolean XML property. We don't really use this format anymore and instead prefer tristate <X state=on|off/> since it's required for modeling on/off/default. If for example future qemu started enabling vmcoreinfo by default we wouldn't have any way for the user to turn this off. Convert it to tristate. For writing XML this is semanticly the same, <vmcoreinfo/> is processed as <vmcoreinfo state='on'/>. For apps reading guest XML this is technically an API change, as they might misinterpret <vmcoreinfo state='off'/>, however this has only been present in libvirt since 3.10.0 and I don't think any apps are dependent on this yet Reviewed-by: John Ferlan <jferlan@redhat.com> Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
parent
8525b9694e
commit
c84be08156
@ -1880,6 +1880,7 @@
|
||||
<gic version='2'/>
|
||||
<ioapic driver='qemu'/>
|
||||
<hpt resizing='required'/>
|
||||
<vmcoreinfo state='on'/>
|
||||
</features>
|
||||
...</pre>
|
||||
|
||||
@ -2061,7 +2062,7 @@
|
||||
</dd>
|
||||
<dt><code>vmcoreinfo</code></dt>
|
||||
<dd>Enable QEMU vmcoreinfo device to let the guest kernel save debug
|
||||
details. <span class="since">Since 3.10.0</span> (QEMU only)
|
||||
details. <span class="since">Since 4.4.0</span> (QEMU only)
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
@ -5039,7 +5039,11 @@
|
||||
|
||||
<define name="vmcoreinfo">
|
||||
<element name="vmcoreinfo">
|
||||
<empty/>
|
||||
<optional>
|
||||
<attribute name="state">
|
||||
<ref name="virOnOff"/>
|
||||
</attribute>
|
||||
</optional>
|
||||
</element>
|
||||
</define>
|
||||
|
||||
|
@ -19305,7 +19305,6 @@ virDomainDefParseXML(xmlDocPtr xml,
|
||||
case VIR_DOMAIN_FEATURE_VIRIDIAN:
|
||||
case VIR_DOMAIN_FEATURE_PRIVNET:
|
||||
case VIR_DOMAIN_FEATURE_HYPERV:
|
||||
case VIR_DOMAIN_FEATURE_VMCOREINFO:
|
||||
case VIR_DOMAIN_FEATURE_KVM:
|
||||
def->features[val] = VIR_TRISTATE_SWITCH_ON;
|
||||
break;
|
||||
@ -19324,6 +19323,7 @@ virDomainDefParseXML(xmlDocPtr xml,
|
||||
}
|
||||
break;
|
||||
|
||||
case VIR_DOMAIN_FEATURE_VMCOREINFO:
|
||||
case VIR_DOMAIN_FEATURE_HAP:
|
||||
case VIR_DOMAIN_FEATURE_PMU:
|
||||
case VIR_DOMAIN_FEATURE_PVSPINLOCK:
|
||||
@ -26893,7 +26893,6 @@ virDomainDefFormatInternal(virDomainDefPtr def,
|
||||
case VIR_DOMAIN_FEATURE_ACPI:
|
||||
case VIR_DOMAIN_FEATURE_PAE:
|
||||
case VIR_DOMAIN_FEATURE_VIRIDIAN:
|
||||
case VIR_DOMAIN_FEATURE_VMCOREINFO:
|
||||
case VIR_DOMAIN_FEATURE_PRIVNET:
|
||||
switch ((virTristateSwitch) def->features[i]) {
|
||||
case VIR_TRISTATE_SWITCH_ABSENT:
|
||||
@ -26914,6 +26913,7 @@ virDomainDefFormatInternal(virDomainDefPtr def,
|
||||
|
||||
break;
|
||||
|
||||
case VIR_DOMAIN_FEATURE_VMCOREINFO:
|
||||
case VIR_DOMAIN_FEATURE_HAP:
|
||||
case VIR_DOMAIN_FEATURE_PMU:
|
||||
case VIR_DOMAIN_FEATURE_PVSPINLOCK:
|
||||
|
@ -9,7 +9,7 @@
|
||||
<boot dev='hd'/>
|
||||
</os>
|
||||
<features>
|
||||
<vmcoreinfo/>
|
||||
<vmcoreinfo state='on'/>
|
||||
</features>
|
||||
<clock offset='utc'/>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
|
Loading…
x
Reference in New Issue
Block a user