mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-10-22 14:09:22 +00:00
cpu: Rename cpuBaseline as virCPUBaseline
Signed-off-by: Jiri Denemark <jdenemar@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
6d27148ae1
commit
5ed6cf96bc
@ -1398,7 +1398,7 @@ bhyveConnectBaselineCPU(virConnectPtr conn,
|
|||||||
if (!(cpus = virCPUDefListParse(xmlCPUs, ncpus, VIR_CPU_TYPE_HOST)))
|
if (!(cpus = virCPUDefListParse(xmlCPUs, ncpus, VIR_CPU_TYPE_HOST)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (!(cpu = cpuBaseline(cpus, ncpus, NULL,
|
if (!(cpu = virCPUBaseline(cpus, ncpus, NULL,
|
||||||
!!(flags & VIR_CONNECT_BASELINE_CPU_MIGRATABLE))))
|
!!(flags & VIR_CONNECT_BASELINE_CPU_MIGRATABLE))))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
@ -479,7 +479,7 @@ virCPUProbeHost(virArch arch)
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* cpuBaseline:
|
* virCPUBaseline:
|
||||||
*
|
*
|
||||||
* @cpus: list of host CPU definitions
|
* @cpus: list of host CPU definitions
|
||||||
* @ncpus: number of CPUs in @cpus
|
* @ncpus: number of CPUs in @cpus
|
||||||
@ -494,7 +494,7 @@ virCPUProbeHost(virArch arch)
|
|||||||
* Returns baseline CPU definition or NULL on error.
|
* Returns baseline CPU definition or NULL on error.
|
||||||
*/
|
*/
|
||||||
virCPUDefPtr
|
virCPUDefPtr
|
||||||
cpuBaseline(virCPUDefPtr *cpus,
|
virCPUBaseline(virCPUDefPtr *cpus,
|
||||||
unsigned int ncpus,
|
unsigned int ncpus,
|
||||||
virDomainCapsCPUModelsPtr models,
|
virDomainCapsCPUModelsPtr models,
|
||||||
bool migratable)
|
bool migratable)
|
||||||
|
@ -73,7 +73,7 @@ typedef int
|
|||||||
virDomainCapsCPUModelsPtr models);
|
virDomainCapsCPUModelsPtr models);
|
||||||
|
|
||||||
typedef virCPUDefPtr
|
typedef virCPUDefPtr
|
||||||
(*cpuArchBaseline) (virCPUDefPtr *cpus,
|
(*virCPUArchBaseline)(virCPUDefPtr *cpus,
|
||||||
unsigned int ncpus,
|
unsigned int ncpus,
|
||||||
virDomainCapsCPUModelsPtr models,
|
virDomainCapsCPUModelsPtr models,
|
||||||
bool migratable);
|
bool migratable);
|
||||||
@ -129,7 +129,7 @@ struct cpuArchDriver {
|
|||||||
cpuArchEncode encode;
|
cpuArchEncode encode;
|
||||||
cpuArchDataFree dataFree;
|
cpuArchDataFree dataFree;
|
||||||
virCPUArchGetHost getHost;
|
virCPUArchGetHost getHost;
|
||||||
cpuArchBaseline baseline;
|
virCPUArchBaseline baseline;
|
||||||
virCPUArchUpdate update;
|
virCPUArchUpdate update;
|
||||||
virCPUArchUpdateLive updateLive;
|
virCPUArchUpdateLive updateLive;
|
||||||
virCPUArchCheckFeature checkFeature;
|
virCPUArchCheckFeature checkFeature;
|
||||||
@ -194,7 +194,7 @@ virCPUDefPtr
|
|||||||
virCPUProbeHost(virArch arch);
|
virCPUProbeHost(virArch arch);
|
||||||
|
|
||||||
virCPUDefPtr
|
virCPUDefPtr
|
||||||
cpuBaseline (virCPUDefPtr *cpus,
|
virCPUBaseline(virCPUDefPtr *cpus,
|
||||||
unsigned int ncpus,
|
unsigned int ncpus,
|
||||||
virDomainCapsCPUModelsPtr models,
|
virDomainCapsCPUModelsPtr models,
|
||||||
bool migratable);
|
bool migratable);
|
||||||
|
@ -73,7 +73,7 @@ virCPUarmUpdate(virCPUDefPtr guest,
|
|||||||
|
|
||||||
|
|
||||||
static virCPUDefPtr
|
static virCPUDefPtr
|
||||||
armBaseline(virCPUDefPtr *cpus,
|
virCPUarmBaseline(virCPUDefPtr *cpus,
|
||||||
unsigned int ncpus ATTRIBUTE_UNUSED,
|
unsigned int ncpus ATTRIBUTE_UNUSED,
|
||||||
virDomainCapsCPUModelsPtr models ATTRIBUTE_UNUSED,
|
virDomainCapsCPUModelsPtr models ATTRIBUTE_UNUSED,
|
||||||
bool migratable ATTRIBUTE_UNUSED)
|
bool migratable ATTRIBUTE_UNUSED)
|
||||||
@ -107,6 +107,6 @@ struct cpuArchDriver cpuDriverArm = {
|
|||||||
.compare = virCPUarmCompare,
|
.compare = virCPUarmCompare,
|
||||||
.decode = NULL,
|
.decode = NULL,
|
||||||
.encode = NULL,
|
.encode = NULL,
|
||||||
.baseline = armBaseline,
|
.baseline = virCPUarmBaseline,
|
||||||
.update = virCPUarmUpdate,
|
.update = virCPUarmUpdate,
|
||||||
};
|
};
|
||||||
|
@ -767,7 +767,7 @@ virCPUppc64Update(virCPUDefPtr guest,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static virCPUDefPtr
|
static virCPUDefPtr
|
||||||
ppc64DriverBaseline(virCPUDefPtr *cpus,
|
virCPUppc64Baseline(virCPUDefPtr *cpus,
|
||||||
unsigned int ncpus,
|
unsigned int ncpus,
|
||||||
virDomainCapsCPUModelsPtr models ATTRIBUTE_UNUSED,
|
virDomainCapsCPUModelsPtr models ATTRIBUTE_UNUSED,
|
||||||
bool migratable ATTRIBUTE_UNUSED)
|
bool migratable ATTRIBUTE_UNUSED)
|
||||||
@ -901,7 +901,7 @@ struct cpuArchDriver cpuDriverPPC64 = {
|
|||||||
.encode = NULL,
|
.encode = NULL,
|
||||||
.dataFree = virCPUppc64DataFree,
|
.dataFree = virCPUppc64DataFree,
|
||||||
.getHost = virCPUppc64GetHost,
|
.getHost = virCPUppc64GetHost,
|
||||||
.baseline = ppc64DriverBaseline,
|
.baseline = virCPUppc64Baseline,
|
||||||
.update = virCPUppc64Update,
|
.update = virCPUppc64Update,
|
||||||
.getModels = virCPUppc64DriverGetModels,
|
.getModels = virCPUppc64DriverGetModels,
|
||||||
.convertLegacy = virCPUppc64ConvertLegacy,
|
.convertLegacy = virCPUppc64ConvertLegacy,
|
||||||
|
@ -2464,7 +2464,7 @@ virCPUx86GetHost(virCPUDefPtr cpu,
|
|||||||
|
|
||||||
|
|
||||||
static virCPUDefPtr
|
static virCPUDefPtr
|
||||||
x86Baseline(virCPUDefPtr *cpus,
|
virCPUx86Baseline(virCPUDefPtr *cpus,
|
||||||
unsigned int ncpus,
|
unsigned int ncpus,
|
||||||
virDomainCapsCPUModelsPtr models,
|
virDomainCapsCPUModelsPtr models,
|
||||||
bool migratable)
|
bool migratable)
|
||||||
@ -3050,7 +3050,7 @@ struct cpuArchDriver cpuDriverX86 = {
|
|||||||
#if defined(__i386__) || defined(__x86_64__)
|
#if defined(__i386__) || defined(__x86_64__)
|
||||||
.getHost = virCPUx86GetHost,
|
.getHost = virCPUx86GetHost,
|
||||||
#endif
|
#endif
|
||||||
.baseline = x86Baseline,
|
.baseline = virCPUx86Baseline,
|
||||||
.update = virCPUx86Update,
|
.update = virCPUx86Update,
|
||||||
.updateLive = virCPUx86UpdateLive,
|
.updateLive = virCPUx86UpdateLive,
|
||||||
.checkFeature = virCPUx86CheckFeature,
|
.checkFeature = virCPUx86CheckFeature,
|
||||||
|
@ -1140,9 +1140,9 @@ virStoragePoolObjVolumeListExport;
|
|||||||
|
|
||||||
|
|
||||||
# cpu/cpu.h
|
# cpu/cpu.h
|
||||||
cpuBaseline;
|
|
||||||
cpuDecode;
|
cpuDecode;
|
||||||
cpuEncode;
|
cpuEncode;
|
||||||
|
virCPUBaseline;
|
||||||
virCPUCheckFeature;
|
virCPUCheckFeature;
|
||||||
virCPUCompare;
|
virCPUCompare;
|
||||||
virCPUCompareXML;
|
virCPUCompareXML;
|
||||||
|
@ -6349,7 +6349,7 @@ libxlConnectBaselineCPU(virConnectPtr conn,
|
|||||||
if (!(cpus = virCPUDefListParse(xmlCPUs, ncpus, VIR_CPU_TYPE_HOST)))
|
if (!(cpus = virCPUDefListParse(xmlCPUs, ncpus, VIR_CPU_TYPE_HOST)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (!(cpu = cpuBaseline(cpus, ncpus, NULL,
|
if (!(cpu = virCPUBaseline(cpus, ncpus, NULL,
|
||||||
!!(flags & VIR_CONNECT_BASELINE_CPU_MIGRATABLE))))
|
!!(flags & VIR_CONNECT_BASELINE_CPU_MIGRATABLE))))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
@ -13315,7 +13315,7 @@ qemuConnectBaselineCPU(virConnectPtr conn ATTRIBUTE_UNUSED,
|
|||||||
if (!(cpus = virCPUDefListParse(xmlCPUs, ncpus, VIR_CPU_TYPE_HOST)))
|
if (!(cpus = virCPUDefListParse(xmlCPUs, ncpus, VIR_CPU_TYPE_HOST)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (!(baseline = cpuBaseline(cpus, ncpus, NULL,
|
if (!(baseline = virCPUBaseline(cpus, ncpus, NULL,
|
||||||
!!(flags & VIR_CONNECT_BASELINE_CPU_MIGRATABLE))))
|
!!(flags & VIR_CONNECT_BASELINE_CPU_MIGRATABLE))))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
@ -1541,7 +1541,7 @@ testConnectBaselineCPU(virConnectPtr conn ATTRIBUTE_UNUSED,
|
|||||||
if (!(cpus = virCPUDefListParse(xmlCPUs, ncpus, VIR_CPU_TYPE_HOST)))
|
if (!(cpus = virCPUDefListParse(xmlCPUs, ncpus, VIR_CPU_TYPE_HOST)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (!(cpu = cpuBaseline(cpus, ncpus, NULL, false)))
|
if (!(cpu = virCPUBaseline(cpus, ncpus, NULL, false)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if ((flags & VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES) &&
|
if ((flags & VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES) &&
|
||||||
|
@ -934,7 +934,7 @@ vzConnectBaselineCPU(virConnectPtr conn,
|
|||||||
if (!(cpus = virCPUDefListParse(xmlCPUs, ncpus, VIR_CPU_TYPE_HOST)))
|
if (!(cpus = virCPUDefListParse(xmlCPUs, ncpus, VIR_CPU_TYPE_HOST)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if (!(cpu = cpuBaseline(cpus, ncpus, NULL, false)))
|
if (!(cpu = virCPUBaseline(cpus, ncpus, NULL, false)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
if ((flags & VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES) &&
|
if ((flags & VIR_CONNECT_BASELINE_CPU_EXPAND_FEATURES) &&
|
||||||
|
@ -321,7 +321,7 @@ cpuTestBaseline(const void *arg)
|
|||||||
if (!(cpus = cpuTestLoadMultiXML(data->arch, data->name, &ncpus)))
|
if (!(cpus = cpuTestLoadMultiXML(data->arch, data->name, &ncpus)))
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
baseline = cpuBaseline(cpus, ncpus, NULL,
|
baseline = virCPUBaseline(cpus, ncpus, NULL,
|
||||||
!!(data->flags & VIR_CONNECT_BASELINE_CPU_MIGRATABLE));
|
!!(data->flags & VIR_CONNECT_BASELINE_CPU_MIGRATABLE));
|
||||||
|
|
||||||
if (baseline &&
|
if (baseline &&
|
||||||
@ -337,7 +337,7 @@ cpuTestBaseline(const void *arg)
|
|||||||
ret = 0;
|
ret = 0;
|
||||||
} else {
|
} else {
|
||||||
VIR_TEST_VERBOSE("\n%-70s... ",
|
VIR_TEST_VERBOSE("\n%-70s... ",
|
||||||
"cpuBaseline was expected to fail but it succeeded");
|
"virCPUBaseline was expected to fail but it succeeded");
|
||||||
}
|
}
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user