提交 bfa2bd7e 编写于 作者: A Andrea Bolognani

conf: Parse and format nested-hv feature

Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
上级 0029eace
......@@ -2295,6 +2295,18 @@
defined, the hypervisor default will be used.
<span class="since">Since 4.6.0</span> (QEMU/KVM only)
</dd>
<dt><code>nested-hv</code></dt>
<dd>Configure nested HV availability for pSeries guests. This needs to
be enabled from the host (L0) in order to be effective; having HV
support in the (L1) guest is very desiderable if it's planned to
run nested (L2) guests inside it, because it will result in those
nested guests having much better performance than they would when
using KVM PR or TCG.
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.10.0</span> (QEMU/KVM only)
</dd>
</dl>
<h3><a id="elementsTime">Time keeping</a></h3>
......
......@@ -4978,6 +4978,11 @@
<ref name="featurestate"/>
</element>
</optional>
<optional>
<element name="nested-hv">
<ref name="featurestate"/>
</element>
</optional>
</interleave>
</element>
</optional>
......
......@@ -154,6 +154,7 @@ VIR_ENUM_IMPL(virDomainFeature, VIR_DOMAIN_FEATURE_LAST,
"hpt",
"vmcoreinfo",
"htm",
"nested-hv",
);
VIR_ENUM_IMPL(virDomainCapabilitiesPolicy, VIR_DOMAIN_CAPABILITIES_POLICY_LAST,
......@@ -20159,6 +20160,7 @@ virDomainDefParseXML(xmlDocPtr xml,
break;
case VIR_DOMAIN_FEATURE_HTM:
case VIR_DOMAIN_FEATURE_NESTED_HV:
if (!(tmp = virXMLPropString(nodes[i], "state"))) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("missing state attribute '%s' of feature '%s'"),
......@@ -22321,6 +22323,7 @@ virDomainDefFeaturesCheckABIStability(virDomainDefPtr src,
case VIR_DOMAIN_FEATURE_SMM:
case VIR_DOMAIN_FEATURE_VMCOREINFO:
case VIR_DOMAIN_FEATURE_HTM:
case VIR_DOMAIN_FEATURE_NESTED_HV:
if (src->features[i] != dst->features[i]) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
_("State of feature '%s' differs: "
......@@ -28236,6 +28239,7 @@ virDomainDefFormatInternal(virDomainDefPtr def,
case VIR_DOMAIN_FEATURE_PVSPINLOCK:
case VIR_DOMAIN_FEATURE_VMPORT:
case VIR_DOMAIN_FEATURE_HTM:
case VIR_DOMAIN_FEATURE_NESTED_HV:
switch ((virTristateSwitch) def->features[i]) {
case VIR_TRISTATE_SWITCH_LAST:
case VIR_TRISTATE_SWITCH_ABSENT:
......
......@@ -1778,6 +1778,7 @@ typedef enum {
VIR_DOMAIN_FEATURE_HPT,
VIR_DOMAIN_FEATURE_VMCOREINFO,
VIR_DOMAIN_FEATURE_HTM,
VIR_DOMAIN_FEATURE_NESTED_HV,
VIR_DOMAIN_FEATURE_LAST
} virDomainFeature;
......
......@@ -3890,6 +3890,7 @@ qemuDomainDefValidateFeatures(const virDomainDef *def,
case VIR_DOMAIN_FEATURE_HPT:
case VIR_DOMAIN_FEATURE_HTM:
case VIR_DOMAIN_FEATURE_NESTED_HV:
if (def->features[i] != VIR_TRISTATE_SWITCH_ABSENT &&
!qemuDomainIsPSeries(def)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
......
......@@ -11,6 +11,7 @@
<maxpagesize unit='GiB'>1</maxpagesize>
</hpt>
<htm state='on'/>
<nested-hv state='off'/>
</features>
<devices>
<emulator>/usr/bin/qemu-system-ppc64</emulator>
......
......@@ -13,6 +13,7 @@
<maxpagesize unit='KiB'>1048576</maxpagesize>
</hpt>
<htm state='on'/>
<nested-hv state='off'/>
</features>
<clock offset='utc'/>
<on_poweroff>destroy</on_poweroff>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册