[libvirt PATCH v2 1/3] conf: validate serial port model in ABI checks

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

 



The serial port model cannot be allowed to change across migration
as it affects ABI.

Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>
---
 src/conf/domain_conf.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 58e696416d..9415ecb13b 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -21095,6 +21095,14 @@ virDomainSerialDefCheckABIStability(virDomainChrDef *src,
         return false;
     }
 
+    if (src->targetModel != dst->targetModel) {
+        virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+                       _("Target serial model %s does not match source %s"),
+                       virDomainChrSerialTargetModelTypeToString(dst->targetModel),
+                       virDomainChrSerialTargetModelTypeToString(src->targetModel));
+        return false;
+    }
+
     if (src->target.port != dst->target.port) {
         virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
                        _("Target serial port %d does not match source %d"),
-- 
2.34.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