[PATCHv4 8/6] conf: add ABI stability checks for IOMMU options

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

 



https://bugzilla.redhat.com/show_bug.cgi?id=1427005
---
 src/conf/domain_conf.c | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 669860c..9eba70a 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -19691,6 +19691,16 @@ virDomainDefFeaturesCheckABIStability(virDomainDefPtr src,
         }
     }
 
+    /* ioapic */
+    if (src->ioapic != dst->ioapic) {
+        virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+                       _("State of ioapic differs: "
+                         "source: '%s', destination: '%s'"),
+                       virDomainIOAPICTypeToString(src->ioapic),
+                       virDomainIOAPICTypeToString(dst->ioapic));
+        return false;
+    }
+
     return true;
 }
 
@@ -19830,6 +19840,22 @@ virDomainIOMMUDefCheckABIStability(virDomainIOMMUDefPtr src,
                        virDomainIOMMUModelTypeToString(src->model));
         return false;
     }
+    if (src->intremap != dst->intremap) {
+        virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+                       _("Target domain IOMMU device intremap value '%s' "
+                         "does not match source '%s'"),
+                       virTristateSwitchTypeToString(dst->intremap),
+                       virTristateSwitchTypeToString(src->intremap));
+        return false;
+    }
+    if (src->caching_mode != dst->caching_mode) {
+        virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+                       _("Target domain IOMMU device caching mode '%s' "
+                         "does not match source '%s'"),
+                       virTristateSwitchTypeToString(dst->caching_mode),
+                       virTristateSwitchTypeToString(src->caching_mode));
+        return false;
+    }
     return true;
 }
 
-- 
2.10.2

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[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