[PATCH v2 2/4] conf: parse and format machine virt ras feature

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Kristina Hanicova <khanicov@xxxxxxxxxx>
---
 docs/formatdomain.rst             | 6 ++++++
 src/conf/domain_conf.c            | 6 +++++-
 src/conf/domain_conf.h            | 1 +
 src/conf/schemas/domaincommon.rng | 5 +++++
 src/qemu/qemu_validate.c          | 1 +
 5 files changed, 18 insertions(+), 1 deletion(-)

diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst
index 0211abaa1a..89e634e16a 100644
--- a/docs/formatdomain.rst
+++ b/docs/formatdomain.rst
@@ -2021,6 +2021,7 @@ Hypervisors may allow certain CPU / machine features to be toggled on/off.
        <tb-cache unit='MiB'>128</tb-cache>
      </tcg>
      <async-teardown enabled='yes'/>
+     <ras state='on'/>
    </features>
    ...
 
@@ -2256,6 +2257,11 @@ are:
    Depending on the ``enabled`` attribute (values ``yes``, ``no``) enable or
    disable QEMU asynchronous teardown to improve memory reclaiming on a guest.
    :since:`Since 9.6.0` (QEMU only)
+``ras``
+   Report host memory errors to a guest using ACPI and guest external abort
+   exceptions when enabled (``on``). If the attribute is not defined, the
+   hypervisor default will be used.
+   :since:`Since 10.4.0` (QEMU/KVM and ARM virt guests only)
 
 Time keeping
 ------------
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 9df2b76efb..9eaec76b07 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -184,6 +184,7 @@ VIR_ENUM_IMPL(virDomainFeature,
               "ibs",
               "tcg",
               "async-teardown",
+              "ras",
 );
 
 VIR_ENUM_IMPL(virDomainCapabilitiesPolicy,
@@ -16842,7 +16843,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_RAS: {
             virTristateSwitch state;
 
             if (virXMLPropTristateSwitch(nodes[i], "state",
@@ -20689,6 +20691,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_RAS:
             if (src->features[i] != dst->features[i]) {
                 virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
                                _("State of feature '%1$s' differs: source: '%2$s', destination: '%3$s'"),
@@ -27392,6 +27395,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_RAS:
             switch ((virTristateSwitch) def->features[i]) {
             case VIR_TRISTATE_SWITCH_LAST:
             case VIR_TRISTATE_SWITCH_ABSENT:
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 356c25405b..c2abdb9f52 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -2171,6 +2171,7 @@ typedef enum {
     VIR_DOMAIN_FEATURE_IBS,
     VIR_DOMAIN_FEATURE_TCG,
     VIR_DOMAIN_FEATURE_ASYNC_TEARDOWN,
+    VIR_DOMAIN_FEATURE_RAS,
 
     VIR_DOMAIN_FEATURE_LAST
 } virDomainFeature;
diff --git a/src/conf/schemas/domaincommon.rng b/src/conf/schemas/domaincommon.rng
index d84e030255..86d9e391d8 100644
--- a/src/conf/schemas/domaincommon.rng
+++ b/src/conf/schemas/domaincommon.rng
@@ -6795,6 +6795,11 @@
               </optional>
             </element>
           </optional>
+          <optional>
+            <element name="ras">
+              <ref name="featurestate"/>
+            </element>
+          </optional>
         </interleave>
       </element>
     </optional>
diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c
index b02da95c1e..b33618b494 100644
--- a/src/qemu/qemu_validate.c
+++ b/src/qemu/qemu_validate.c
@@ -226,6 +226,7 @@ qemuValidateDomainDefFeatures(const virDomainDef *def,
             }
             break;
 
+        case VIR_DOMAIN_FEATURE_RAS:
         case VIR_DOMAIN_FEATURE_SMM:
         case VIR_DOMAIN_FEATURE_KVM:
         case VIR_DOMAIN_FEATURE_XEN:
-- 
2.42.0
_______________________________________________
Devel mailing list -- devel@xxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxx




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux