mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-24 22:55:23 +00:00
virCPUDefCopy forgot to copy NUMA topology
As a result of it, guest NUMA topology would be lost during migration.
This commit is contained in:
parent
851fc8139f
commit
66ca7ce573
@ -108,6 +108,27 @@ virCPUDefCopy(const virCPUDefPtr cpu)
|
||||
goto no_memory;
|
||||
}
|
||||
|
||||
if (cpu->ncells) {
|
||||
if (VIR_ALLOC_N(copy->cells, cpu->ncells) < 0)
|
||||
goto no_memory;
|
||||
copy->ncells_max = copy->ncells = cpu->ncells;
|
||||
|
||||
for (i = 0; i < cpu->ncells; i++) {
|
||||
copy->cells[i].cellid = cpu->cells[i].cellid;
|
||||
copy->cells[i].mem = cpu->cells[i].mem;
|
||||
|
||||
if (VIR_ALLOC_N(copy->cells[i].cpumask,
|
||||
VIR_DOMAIN_CPUMASK_LEN) < 0)
|
||||
goto no_memory;
|
||||
memcpy(copy->cells[i].cpumask, cpu->cells[i].cpumask,
|
||||
VIR_DOMAIN_CPUMASK_LEN);
|
||||
|
||||
if (!(copy->cells[i].cpustr = strdup(cpu->cells[i].cpustr)))
|
||||
goto no_memory;
|
||||
}
|
||||
copy->cells_cpus = cpu->cells_cpus;
|
||||
}
|
||||
|
||||
return copy;
|
||||
|
||||
no_memory:
|
||||
|
Loading…
Reference in New Issue
Block a user