From: Peter Krempa Date: Thu, 28 May 2015 13:31:09 +0000 (+0200) Subject: libxl: Don't remove vcpu pin definition in libxlDomainCleanup X-Git-Tag: v1.2.17-rc1~276 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8db0f438c43bcfdb27bd10656ea109392c7ec4ce;p=thirdparty%2Flibvirt.git libxl: Don't remove vcpu pin definition in libxlDomainCleanup The vCPU pinning definition gets removed when the domain definition is being freed later. If there is no next configuration it would remove the configured pinning. --- diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c index d925917c35..06522708c7 100644 --- a/src/libxl/libxl_domain.c +++ b/src/libxl/libxl_domain.c @@ -690,7 +690,6 @@ libxlDomainCleanup(libxlDriverPrivatePtr driver, libxlDriverConfigPtr cfg = libxlDriverConfigGet(driver); int vnc_port; char *file; - size_t i; virHostdevManagerPtr hostdev_mgr = driver->hostdevMgr; virHostdevReAttachDomainDevices(hostdev_mgr, LIBXL_DRIVER_NAME, @@ -725,16 +724,6 @@ libxlDomainCleanup(libxlDriverPrivatePtr driver, } } - /* Remove any cputune settings */ - if (vm->def->cputune.nvcpupin) { - for (i = 0; i < vm->def->cputune.nvcpupin; ++i) { - virBitmapFree(vm->def->cputune.vcpupin[i]->cpumask); - VIR_FREE(vm->def->cputune.vcpupin[i]); - } - VIR_FREE(vm->def->cputune.vcpupin); - vm->def->cputune.nvcpupin = 0; - } - if (virAsprintf(&file, "%s/%s.xml", cfg->stateDir, vm->def->name) > 0) { if (unlink(file) < 0 && errno != ENOENT && errno != ENOTDIR) VIR_DEBUG("Failed to remove domain XML for %s", vm->def->name);