[libvirt] [PATCH] conf: add cpu check attribute to ABI check

Nikolay Shirokovskiy posted 1 patch 5 years ago
Test syntax-check passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/1556099818-488433-1-git-send-email-nshirokovskiy@virtuozzo.com
src/conf/cpu_conf.c | 7 +++++++
1 file changed, 7 insertions(+)
[libvirt] [PATCH] conf: add cpu check attribute to ABI check
Posted by Nikolay Shirokovskiy 5 years ago
Different check values is not ABI compatible. For example
if on migration we change 'full' to 'partial' then guest cpu
on destination can be different.

Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
---
 src/conf/cpu_conf.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c
index 33c8b99..bd2beab 100644
--- a/src/conf/cpu_conf.c
+++ b/src/conf/cpu_conf.c
@@ -894,6 +894,13 @@ virCPUDefIsEqual(virCPUDefPtr src,
         goto cleanup;
     }
 
+    if (src->check != dst->check) {
+        MISMATCH(_("Target CPU check %s does not match source %s"),
+                 virCPUCheckTypeToString(dst->check),
+                 virCPUCheckTypeToString(src->check));
+        goto cleanup;
+    }
+
     if (src->arch != dst->arch) {
         MISMATCH(_("Target CPU arch %s does not match source %s"),
                  virArchToString(dst->arch),
-- 
1.8.3.1

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] conf: add cpu check attribute to ABI check
Posted by Jiri Denemark 5 years ago
On Wed, Apr 24, 2019 at 12:56:58 +0300, Nikolay Shirokovskiy wrote:
> Different check values is not ABI compatible. For example
> if on migration we change 'full' to 'partial' then guest cpu
> on destination can be different.
> 
> Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>

Reviewed-by: Jiri Denemark <jdenemar@redhat.com>

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