From 62d46ead28bd5216fd7d60af691a937add7d432c Mon Sep 17 00:00:00 2001 From: Thibaut Collet Date: Thu, 21 May 2015 15:55:40 +0200 Subject: [PATCH] conf: fix issue on virCPUDefCopy The cpu xml copy is incorrect: the memAccess field is not copied. The lack of copy of this memAccess field can cause unexpected behaviour for live migration when vhost user is used. For example if guest has the following configuration: .... Westmere .... The used configuration on the remote host in case of live migration is: .... Westmere .... On the remote host the lack of memAccess info can cause unexpected error on the qemu backend vhost user driver. Fixes: def6b3598 ("docs, conf, schema: add support for shared memory mapping") This issue is present only for libvirt1.2.9 to libvirt1.2.12 With patch 181742d43 ("conf: Move all NUMA configuration to virDomainNuma") present since libvirt1.2.13 the problem does not exist anymore as NUMA information are no more in the CPU configuration. Signed-off-by: Thibaut Collet --- src/conf/cpu_conf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/conf/cpu_conf.c b/src/conf/cpu_conf.c index c09c352893..3ca67e04ba 100644 --- a/src/conf/cpu_conf.c +++ b/src/conf/cpu_conf.c @@ -158,6 +158,7 @@ virCPUDefCopy(const virCPUDef *cpu) for (i = 0; i < cpu->ncells; i++) { copy->cells[i].mem = cpu->cells[i].mem; + copy->cells[i].memAccess = cpu->cells[i].memAccess; copy->cells[i].cpumask = virBitmapNewCopy(cpu->cells[i].cpumask);