mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-27 19:11:16 +00:00
virDomainDefFormatFeatures: Write attribute "mode" of element "hyperv"
Signed-off-by: Tim Wiederhake <twiederh@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
6e83fafe33
commit
5050b71da0
@ -27839,10 +27839,11 @@ virDomainDefFormatFeatures(virBuffer *buf,
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case VIR_DOMAIN_FEATURE_HYPERV:
|
case VIR_DOMAIN_FEATURE_HYPERV:
|
||||||
if (def->features[i] != VIR_TRISTATE_SWITCH_ON)
|
if (def->features[i] == VIR_DOMAIN_HYPERV_MODE_NONE)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
virBufferAddLit(&childBuf, "<hyperv>\n");
|
virBufferAsprintf(&childBuf, "<hyperv mode='%s'>\n",
|
||||||
|
virDomainHyperVModeTypeToString(def->features[i]));
|
||||||
virBufferAdjustIndent(&childBuf, 2);
|
virBufferAdjustIndent(&childBuf, 2);
|
||||||
for (j = 0; j < VIR_DOMAIN_HYPERV_LAST; j++) {
|
for (j = 0; j < VIR_DOMAIN_HYPERV_LAST; j++) {
|
||||||
if (def->hyperv_features[j] == VIR_TRISTATE_SWITCH_ABSENT)
|
if (def->hyperv_features[j] == VIR_TRISTATE_SWITCH_ABSENT)
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
</os>
|
</os>
|
||||||
<features>
|
<features>
|
||||||
<acpi/>
|
<acpi/>
|
||||||
<hyperv>
|
<hyperv mode='custom'>
|
||||||
<relaxed state='off'/>
|
<relaxed state='off'/>
|
||||||
<vapic state='off'/>
|
<vapic state='off'/>
|
||||||
<spinlocks state='off'/>
|
<spinlocks state='off'/>
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
</os>
|
</os>
|
||||||
<features>
|
<features>
|
||||||
<acpi/>
|
<acpi/>
|
||||||
<hyperv>
|
<hyperv mode='custom'>
|
||||||
<vpindex state='on'/>
|
<vpindex state='on'/>
|
||||||
<synic state='on'/>
|
<synic state='on'/>
|
||||||
<stimer state='on'>
|
<stimer state='on'>
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
</os>
|
</os>
|
||||||
<features>
|
<features>
|
||||||
<acpi/>
|
<acpi/>
|
||||||
<hyperv>
|
<hyperv mode='custom'>
|
||||||
<relaxed state='on'/>
|
<relaxed state='on'/>
|
||||||
<vapic state='on'/>
|
<vapic state='on'/>
|
||||||
<spinlocks state='on' retries='12287'/>
|
<spinlocks state='on' retries='12287'/>
|
||||||
|
Loading…
Reference in New Issue
Block a user