mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-21 20:15:17 +00:00
conf: Introduce MTE domain feature
The Memory Tagging Extensions are hardware acceleration present in some ARM processors that allow memory error detection [1]. Introduce a domain XML knob that turns them on or off. 1: https://www.arm.com/blogs/blueprint/memory-safety-arm-memory-tagging-extension Signed-off-by: Michal Privoznik <mprivozn@redhat.com> Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
This commit is contained in:
parent
37e41b7f16
commit
720e8f13ff
@ -2000,6 +2000,7 @@ Hypervisors may allow certain CPU / machine features to be toggled on/off.
|
||||
<tcg>
|
||||
<tb-cache unit='MiB'>128</tb-cache>
|
||||
</tcg>
|
||||
<mte state='on'/>
|
||||
</features>
|
||||
...
|
||||
|
||||
@ -2230,6 +2231,12 @@ are:
|
||||
tb-cache The size of translation block cache size an integer (a multiple of MiB) :since:`8.0.0`
|
||||
=========== ============================================== =================================================== ==============
|
||||
|
||||
``mte``
|
||||
Configure Memory Tagging Extensions for ARM guests. Possible values for the
|
||||
``state`` attribute are ``on`` and ``off``. If the attribute is not
|
||||
defined, the hypervisor default will be used. :since:`Since 9.4.0` (QEMU/KVM
|
||||
only)
|
||||
|
||||
Time keeping
|
||||
------------
|
||||
|
||||
|
@ -181,6 +181,7 @@ VIR_ENUM_IMPL(virDomainFeature,
|
||||
"sbbc",
|
||||
"ibs",
|
||||
"tcg",
|
||||
"mte",
|
||||
);
|
||||
|
||||
VIR_ENUM_IMPL(virDomainCapabilitiesPolicy,
|
||||
@ -16645,7 +16646,8 @@ virDomainFeaturesDefParse(virDomainDef *def,
|
||||
|
||||
case VIR_DOMAIN_FEATURE_HTM:
|
||||
case VIR_DOMAIN_FEATURE_NESTED_HV:
|
||||
case VIR_DOMAIN_FEATURE_CCF_ASSIST: {
|
||||
case VIR_DOMAIN_FEATURE_CCF_ASSIST:
|
||||
case VIR_DOMAIN_FEATURE_MTE: {
|
||||
virTristateSwitch state;
|
||||
|
||||
if (virXMLPropTristateSwitch(nodes[i], "state",
|
||||
@ -20486,6 +20488,7 @@ virDomainDefFeaturesCheckABIStability(virDomainDef *src,
|
||||
case VIR_DOMAIN_FEATURE_HTM:
|
||||
case VIR_DOMAIN_FEATURE_NESTED_HV:
|
||||
case VIR_DOMAIN_FEATURE_CCF_ASSIST:
|
||||
case VIR_DOMAIN_FEATURE_MTE:
|
||||
if (src->features[i] != dst->features[i]) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
_("State of feature '%1$s' differs: source: '%2$s', destination: '%3$s'"),
|
||||
@ -27005,6 +27008,7 @@ virDomainDefFormatFeatures(virBuffer *buf,
|
||||
case VIR_DOMAIN_FEATURE_HTM:
|
||||
case VIR_DOMAIN_FEATURE_NESTED_HV:
|
||||
case VIR_DOMAIN_FEATURE_CCF_ASSIST:
|
||||
case VIR_DOMAIN_FEATURE_MTE:
|
||||
switch ((virTristateSwitch) def->features[i]) {
|
||||
case VIR_TRISTATE_SWITCH_LAST:
|
||||
case VIR_TRISTATE_SWITCH_ABSENT:
|
||||
|
@ -2169,6 +2169,7 @@ typedef enum {
|
||||
VIR_DOMAIN_FEATURE_SBBC,
|
||||
VIR_DOMAIN_FEATURE_IBS,
|
||||
VIR_DOMAIN_FEATURE_TCG,
|
||||
VIR_DOMAIN_FEATURE_MTE,
|
||||
|
||||
VIR_DOMAIN_FEATURE_LAST
|
||||
} virDomainFeature;
|
||||
|
@ -6653,6 +6653,11 @@
|
||||
<optional>
|
||||
<ref name="tcgfeatures"/>
|
||||
</optional>
|
||||
<optional>
|
||||
<element name="mte">
|
||||
<ref name="featurestate"/>
|
||||
</element>
|
||||
</optional>
|
||||
</interleave>
|
||||
</element>
|
||||
</optional>
|
||||
|
@ -123,6 +123,7 @@ qemuValidateDomainDefFeatures(const virDomainDef *def,
|
||||
break;
|
||||
|
||||
case VIR_DOMAIN_FEATURE_GIC:
|
||||
case VIR_DOMAIN_FEATURE_MTE:
|
||||
if (def->features[i] == VIR_TRISTATE_SWITCH_ON &&
|
||||
!qemuDomainIsARMVirt(def)) {
|
||||
virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
|
||||
|
@ -10,6 +10,7 @@
|
||||
</os>
|
||||
<features>
|
||||
<gic version='3'/>
|
||||
<mte state='on'/>
|
||||
</features>
|
||||
<cpu mode='host-passthrough' check='none'/>
|
||||
<clock offset='utc'/>
|
||||
|
@ -10,6 +10,7 @@
|
||||
</os>
|
||||
<features>
|
||||
<gic version='3'/>
|
||||
<mte state='on'/>
|
||||
</features>
|
||||
<cpu mode='host-passthrough' check='none'/>
|
||||
<clock offset='utc'/>
|
||||
|
Loading…
x
Reference in New Issue
Block a user