mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-29 17:33:09 +00:00
Replace virDomainVcpuPinDel with virDomainPinDel
Since both Vcpu and IOThreads code use the same API's, alter the naming of the API's to remove the "Vcpu" specific reference
This commit is contained in:
parent
01c8f66275
commit
4985dde0f5
@ -16815,16 +16815,17 @@ virDomainPinAdd(virDomainPinDefPtr **pindef_list,
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
virDomainVcpuPinDel(virDomainDefPtr def, int vcpu)
|
virDomainPinDel(virDomainPinDefPtr **pindef_list,
|
||||||
|
size_t *npin,
|
||||||
|
int id)
|
||||||
{
|
{
|
||||||
int n;
|
int n;
|
||||||
virDomainPinDefPtr *vcpupin_list = def->cputune.vcpupin;
|
|
||||||
|
|
||||||
for (n = 0; n < def->cputune.nvcpupin; n++) {
|
for (n = 0; n < *npin; n++) {
|
||||||
if (vcpupin_list[n]->id == vcpu) {
|
if ((*pindef_list)[n]->id == id) {
|
||||||
virBitmapFree(vcpupin_list[n]->cpumask);
|
virBitmapFree((*pindef_list)[n]->cpumask);
|
||||||
VIR_FREE(vcpupin_list[n]);
|
VIR_FREE((*pindef_list)[n]);
|
||||||
VIR_DELETE_ELEMENT(def->cputune.vcpupin, n, def->cputune.nvcpupin);
|
VIR_DELETE_ELEMENT(*pindef_list, n, *npin);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2563,7 +2563,9 @@ int virDomainPinAdd(virDomainPinDefPtr **pindef_list,
|
|||||||
int maplen,
|
int maplen,
|
||||||
int id);
|
int id);
|
||||||
|
|
||||||
void virDomainVcpuPinDel(virDomainDefPtr def, int vcpu);
|
void virDomainPinDel(virDomainPinDefPtr **pindef_list,
|
||||||
|
size_t *npin,
|
||||||
|
int vcpu);
|
||||||
|
|
||||||
int virDomainEmulatorPinAdd(virDomainDefPtr def,
|
int virDomainEmulatorPinAdd(virDomainDefPtr def,
|
||||||
unsigned char *cpumap,
|
unsigned char *cpumap,
|
||||||
|
@ -387,6 +387,7 @@ virDomainPinAdd;
|
|||||||
virDomainPinDefArrayFree;
|
virDomainPinDefArrayFree;
|
||||||
virDomainPinDefCopy;
|
virDomainPinDefCopy;
|
||||||
virDomainPinDefFree;
|
virDomainPinDefFree;
|
||||||
|
virDomainPinDel;
|
||||||
virDomainPinFind;
|
virDomainPinFind;
|
||||||
virDomainPinIsDuplicate;
|
virDomainPinIsDuplicate;
|
||||||
virDomainPMSuspendedReasonTypeFromString;
|
virDomainPMSuspendedReasonTypeFromString;
|
||||||
@ -440,7 +441,6 @@ virDomainTPMBackendTypeToString;
|
|||||||
virDomainTPMDefFree;
|
virDomainTPMDefFree;
|
||||||
virDomainTPMModelTypeFromString;
|
virDomainTPMModelTypeFromString;
|
||||||
virDomainTPMModelTypeToString;
|
virDomainTPMModelTypeToString;
|
||||||
virDomainVcpuPinDel;
|
|
||||||
virDomainVideoDefaultRAM;
|
virDomainVideoDefaultRAM;
|
||||||
virDomainVideoDefaultType;
|
virDomainVideoDefaultType;
|
||||||
virDomainVideoDefFree;
|
virDomainVideoDefFree;
|
||||||
|
@ -1990,7 +1990,9 @@ libxlDomainPinVcpuFlags(virDomainPtr dom, unsigned int vcpu,
|
|||||||
|
|
||||||
/* full bitmap means reset the settings (if any). */
|
/* full bitmap means reset the settings (if any). */
|
||||||
if (virBitmapIsAllSet(pcpumap)) {
|
if (virBitmapIsAllSet(pcpumap)) {
|
||||||
virDomainVcpuPinDel(targetDef, vcpu);
|
virDomainPinDel(&targetDef->cputune.vcpupin,
|
||||||
|
&targetDef->cputune.nvcpupin,
|
||||||
|
vcpu);
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4801,7 +4801,9 @@ static int qemuDomainHotplugVcpus(virQEMUDriverPtr driver,
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Free vcpupin setting */
|
/* Free vcpupin setting */
|
||||||
virDomainVcpuPinDel(vm->def, i);
|
virDomainPinDel(&vm->def->cputune.vcpupin,
|
||||||
|
&vm->def->cputune.nvcpupin,
|
||||||
|
i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4983,7 +4985,9 @@ qemuDomainSetVcpusFlags(virDomainPtr dom, unsigned int nvcpus,
|
|||||||
/* remove vcpupin entries for vcpus that were unplugged */
|
/* remove vcpupin entries for vcpus that were unplugged */
|
||||||
if (nvcpus < persistentDef->vcpus) {
|
if (nvcpus < persistentDef->vcpus) {
|
||||||
for (i = persistentDef->vcpus; i >= nvcpus; i--)
|
for (i = persistentDef->vcpus; i >= nvcpus; i--)
|
||||||
virDomainVcpuPinDel(persistentDef, i);
|
virDomainPinDel(&persistentDef->cputune.vcpupin,
|
||||||
|
&persistentDef->cputune.nvcpupin,
|
||||||
|
i);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (maximum) {
|
if (maximum) {
|
||||||
@ -5151,7 +5155,9 @@ qemuDomainPinVcpuFlags(virDomainPtr dom,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (doReset) {
|
if (doReset) {
|
||||||
virDomainVcpuPinDel(vm->def, vcpu);
|
virDomainPinDel(&vm->def->cputune.vcpupin,
|
||||||
|
&vm->def->cputune.nvcpupin,
|
||||||
|
vcpu);
|
||||||
} else {
|
} else {
|
||||||
if (vm->def->cputune.vcpupin)
|
if (vm->def->cputune.vcpupin)
|
||||||
virDomainPinDefArrayFree(vm->def->cputune.vcpupin,
|
virDomainPinDefArrayFree(vm->def->cputune.vcpupin,
|
||||||
@ -5181,7 +5187,9 @@ qemuDomainPinVcpuFlags(virDomainPtr dom,
|
|||||||
if (flags & VIR_DOMAIN_AFFECT_CONFIG) {
|
if (flags & VIR_DOMAIN_AFFECT_CONFIG) {
|
||||||
|
|
||||||
if (doReset) {
|
if (doReset) {
|
||||||
virDomainVcpuPinDel(persistentDef, vcpu);
|
virDomainPinDel(&persistentDef->cputune.vcpupin,
|
||||||
|
&persistentDef->cputune.nvcpupin,
|
||||||
|
vcpu);
|
||||||
} else {
|
} else {
|
||||||
if (!persistentDef->cputune.vcpupin) {
|
if (!persistentDef->cputune.vcpupin) {
|
||||||
if (VIR_ALLOC(persistentDef->cputune.vcpupin) < 0)
|
if (VIR_ALLOC(persistentDef->cputune.vcpupin) < 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user