[libvirt PATCH 2/2] virDomainFeaturesHyperVDefParse: Compare hyperv mode

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

 



Previous patch neglected the possibility of different modes for hyperv
(e.g. "custom" and "passthrough").

Fixes: 6e83fafe331dd0b4fb19aa384c3dd36b3af62933
Signed-off-by: Tim Wiederhake <twiederh@xxxxxxxxxx>
---
 src/conf/domain_conf.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 9a21ac10ce..2d8851fa11 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -21734,6 +21734,15 @@ virDomainDefFeaturesCheckABIStability(virDomainDef *src,
     }
 
     /* hyperv */
+    if (src->features[VIR_DOMAIN_FEATURE_HYPERV] != dst->features[VIR_DOMAIN_FEATURE_HYPERV]) {
+        virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+                       _("State of HyperV enlightenment mode differs: "
+                         "source: '%s', destination: '%s'"),
+                       virDomainHyperVModeTypeToString(src->features[VIR_DOMAIN_FEATURE_HYPERV]),
+                       virDomainHyperVModeTypeToString(dst->features[VIR_DOMAIN_FEATURE_HYPERV]));
+        return false;
+    }
+
     if (src->features[VIR_DOMAIN_FEATURE_HYPERV] != VIR_DOMAIN_HYPERV_MODE_NONE) {
         for (i = 0; i < VIR_DOMAIN_HYPERV_LAST; i++) {
             switch ((virDomainHyperv) i) {
-- 
2.31.1




[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