mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 11:35:19 +00:00
conf: Parse and format the HTM pSeries feature
Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: John Ferlan <jferlan@redhat.com>
This commit is contained in:
parent
755a5765ac
commit
9f3b9100f3
@ -1929,6 +1929,7 @@
|
||||
<smm state='on'>
|
||||
<tseg unit='MiB'>48</tseg>
|
||||
</smm>
|
||||
<htm state='on'/>
|
||||
</features>
|
||||
...</pre>
|
||||
|
||||
@ -2162,6 +2163,13 @@
|
||||
<dd>Enable QEMU vmcoreinfo device to let the guest kernel save debug
|
||||
details. <span class="since">Since 4.4.0</span> (QEMU only)
|
||||
</dd>
|
||||
<dt><code>htm</code></dt>
|
||||
<dd>Configure HTM (Hardware Transational Memory) availability for
|
||||
pSeries guests. Possible values for the <code>state</code> attribute
|
||||
are <code>on</code> and <code>off</code>. If the attribute is not
|
||||
defined, the hypervisor default will be used.
|
||||
<span class="since">Since 4.6.0</span> (QEMU/KVM only)
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<h3><a id="elementsTime">Time keeping</a></h3>
|
||||
|
@ -4907,6 +4907,11 @@
|
||||
<optional>
|
||||
<ref name="vmcoreinfo"/>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name="htm">
|
||||
<ref name="featurestate"/>
|
||||
</element>
|
||||
</optional>
|
||||
</interleave>
|
||||
</element>
|
||||
</optional>
|
||||
|
@ -152,6 +152,7 @@ VIR_ENUM_IMPL(virDomainFeature, VIR_DOMAIN_FEATURE_LAST,
|
||||
"ioapic",
|
||||
"hpt",
|
||||
"vmcoreinfo",
|
||||
"htm",
|
||||
);
|
||||
|
||||
VIR_ENUM_IMPL(virDomainCapabilitiesPolicy, VIR_DOMAIN_CAPABILITIES_POLICY_LAST,
|
||||
@ -19827,6 +19828,22 @@ virDomainDefParseXML(xmlDocPtr xml,
|
||||
}
|
||||
break;
|
||||
|
||||
case VIR_DOMAIN_FEATURE_HTM:
|
||||
if (!(tmp = virXMLPropString(nodes[i], "state"))) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("missing state attribute '%s' of feature '%s'"),
|
||||
tmp, virDomainFeatureTypeToString(val));
|
||||
goto error;
|
||||
}
|
||||
if ((def->features[val] = virTristateSwitchTypeFromString(tmp)) < 0) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("unknown state attribute '%s' of feature '%s'"),
|
||||
tmp, virDomainFeatureTypeToString(val));
|
||||
goto error;
|
||||
}
|
||||
VIR_FREE(tmp);
|
||||
break;
|
||||
|
||||
/* coverity[dead_error_begin] */
|
||||
case VIR_DOMAIN_FEATURE_LAST:
|
||||
break;
|
||||
@ -21961,6 +21978,7 @@ virDomainDefFeaturesCheckABIStability(virDomainDefPtr src,
|
||||
case VIR_DOMAIN_FEATURE_VMPORT:
|
||||
case VIR_DOMAIN_FEATURE_SMM:
|
||||
case VIR_DOMAIN_FEATURE_VMCOREINFO:
|
||||
case VIR_DOMAIN_FEATURE_HTM:
|
||||
if (src->features[i] != dst->features[i]) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("State of feature '%s' differs: "
|
||||
@ -27626,6 +27644,7 @@ virDomainDefFormatInternal(virDomainDefPtr def,
|
||||
case VIR_DOMAIN_FEATURE_PMU:
|
||||
case VIR_DOMAIN_FEATURE_PVSPINLOCK:
|
||||
case VIR_DOMAIN_FEATURE_VMPORT:
|
||||
case VIR_DOMAIN_FEATURE_HTM:
|
||||
switch ((virTristateSwitch) def->features[i]) {
|
||||
case VIR_TRISTATE_SWITCH_LAST:
|
||||
case VIR_TRISTATE_SWITCH_ABSENT:
|
||||
|
@ -1771,6 +1771,7 @@ typedef enum {
|
||||
VIR_DOMAIN_FEATURE_IOAPIC,
|
||||
VIR_DOMAIN_FEATURE_HPT,
|
||||
VIR_DOMAIN_FEATURE_VMCOREINFO,
|
||||
VIR_DOMAIN_FEATURE_HTM,
|
||||
|
||||
VIR_DOMAIN_FEATURE_LAST
|
||||
} virDomainFeature;
|
||||
|
@ -3865,6 +3865,7 @@ qemuDomainDefValidateFeatures(const virDomainDef *def,
|
||||
case VIR_DOMAIN_FEATURE_PMU:
|
||||
case VIR_DOMAIN_FEATURE_VMPORT:
|
||||
case VIR_DOMAIN_FEATURE_VMCOREINFO:
|
||||
case VIR_DOMAIN_FEATURE_HTM:
|
||||
case VIR_DOMAIN_FEATURE_LAST:
|
||||
break;
|
||||
}
|
||||
|
@ -10,6 +10,7 @@
|
||||
<hpt resizing='required'>
|
||||
<maxpagesize unit='GiB'>1</maxpagesize>
|
||||
</hpt>
|
||||
<htm state='on'/>
|
||||
</features>
|
||||
<devices>
|
||||
<emulator>/usr/bin/qemu-system-ppc64</emulator>
|
||||
|
@ -1850,6 +1850,7 @@ mymain(void)
|
||||
DO_TEST("pseries-features",
|
||||
QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
|
||||
QEMU_CAPS_MACHINE_PSERIES_CAP_HPT_MAX_PAGE_SIZE,
|
||||
QEMU_CAPS_MACHINE_PSERIES_CAP_HTM,
|
||||
QEMU_CAPS_MACHINE_PSERIES_RESIZE_HPT);
|
||||
DO_TEST_FAILURE("pseries-features",
|
||||
QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE);
|
||||
|
@ -12,6 +12,7 @@
|
||||
<hpt resizing='required'>
|
||||
<maxpagesize unit='KiB'>1048576</maxpagesize>
|
||||
</hpt>
|
||||
<htm state='on'/>
|
||||
</features>
|
||||
<clock offset='utc'/>
|
||||
<on_poweroff>destroy</on_poweroff>
|
||||
|
@ -620,6 +620,7 @@ mymain(void)
|
||||
DO_TEST("pseries-features",
|
||||
QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE,
|
||||
QEMU_CAPS_MACHINE_PSERIES_CAP_HPT_MAX_PAGE_SIZE,
|
||||
QEMU_CAPS_MACHINE_PSERIES_CAP_HTM,
|
||||
QEMU_CAPS_MACHINE_PSERIES_RESIZE_HPT);
|
||||
|
||||
DO_TEST("pseries-serial-native",
|
||||
|
Loading…
Reference in New Issue
Block a user