mirror of https://gitee.com/openkylin/libvirt.git
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;
|
||||
|
||||
case VIR_DOMAIN_FEATURE_HYPERV:
|
||||
if (def->features[i] != VIR_TRISTATE_SWITCH_ON)
|
||||
if (def->features[i] == VIR_DOMAIN_HYPERV_MODE_NONE)
|
||||
break;
|
||||
|
||||
virBufferAddLit(&childBuf, "<hyperv>\n");
|
||||
virBufferAsprintf(&childBuf, "<hyperv mode='%s'>\n",
|
||||
virDomainHyperVModeTypeToString(def->features[i]));
|
||||
virBufferAdjustIndent(&childBuf, 2);
|
||||
for (j = 0; j < VIR_DOMAIN_HYPERV_LAST; j++) {
|
||||
if (def->hyperv_features[j] == VIR_TRISTATE_SWITCH_ABSENT)
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
</os>
|
||||
<features>
|
||||
<acpi/>
|
||||
<hyperv>
|
||||
<hyperv mode='custom'>
|
||||
<relaxed state='off'/>
|
||||
<vapic state='off'/>
|
||||
<spinlocks state='off'/>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
</os>
|
||||
<features>
|
||||
<acpi/>
|
||||
<hyperv>
|
||||
<hyperv mode='custom'>
|
||||
<vpindex state='on'/>
|
||||
<synic state='on'/>
|
||||
<stimer state='on'>
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
</os>
|
||||
<features>
|
||||
<acpi/>
|
||||
<hyperv>
|
||||
<hyperv mode='custom'>
|
||||
<relaxed state='on'/>
|
||||
<vapic state='on'/>
|
||||
<spinlocks state='on' retries='12287'/>
|
||||
|
|
Loading…
Reference in New Issue