mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-22 04:25:18 +00:00
qemu: Rename virQEMUCaps{Get,Fetch}CPUDefinitions
The functions return virDomainCapsCPUModelsPtr and thus they should be called *CPUModels for consistency. Functions called *CPUDefinitions will work on qemuMonitorCPUDefsPtr. Signed-off-by: Jiri Denemark <jdenemar@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
a8ca6b4dc4
commit
76baa994b7
@ -1911,7 +1911,7 @@ virQEMUCapsCPUDefsToModels(qemuMonitorCPUDefsPtr defs,
|
||||
|
||||
|
||||
virDomainCapsCPUModelsPtr
|
||||
virQEMUCapsGetCPUDefinitions(virQEMUCapsPtr qemuCaps,
|
||||
virQEMUCapsGetCPUModels(virQEMUCapsPtr qemuCaps,
|
||||
virDomainVirtType type,
|
||||
const char **modelWhitelist,
|
||||
const char **modelBlacklist)
|
||||
@ -2471,7 +2471,7 @@ virQEMUCapsProbeQMPMachineProps(virQEMUCapsPtr qemuCaps,
|
||||
|
||||
|
||||
int
|
||||
virQEMUCapsFetchCPUDefinitions(qemuMonitorPtr mon,
|
||||
virQEMUCapsFetchCPUModels(qemuMonitorPtr mon,
|
||||
virArch arch,
|
||||
virDomainCapsCPUModelsPtr *cpuModels)
|
||||
{
|
||||
@ -2523,7 +2523,7 @@ virQEMUCapsProbeQMPCPUDefinitions(virQEMUCapsPtr qemuCaps,
|
||||
if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_QUERY_CPU_DEFINITIONS))
|
||||
return 0;
|
||||
|
||||
if (virQEMUCapsFetchCPUDefinitions(mon, qemuCaps->arch, &models) < 0)
|
||||
if (virQEMUCapsFetchCPUModels(mon, qemuCaps->arch, &models) < 0)
|
||||
return -1;
|
||||
|
||||
if (tcg || !virQEMUCapsGet(qemuCaps, QEMU_CAPS_KVM))
|
||||
@ -3148,7 +3148,7 @@ virQEMUCapsInitCPUModelX86(virQEMUCapsPtr qemuCaps,
|
||||
if (!(data = virQEMUCapsGetCPUModelX86Data(qemuCaps, model, migratable)))
|
||||
goto cleanup;
|
||||
|
||||
cpuModels = virQEMUCapsGetCPUDefinitions(qemuCaps, type, NULL, NULL);
|
||||
cpuModels = virQEMUCapsGetCPUModels(qemuCaps, type, NULL, NULL);
|
||||
|
||||
if (cpuDecode(cpu, data, cpuModels) < 0)
|
||||
goto cleanup;
|
||||
@ -3237,7 +3237,7 @@ virQEMUCapsInitHostCPUModel(virQEMUCapsPtr qemuCaps,
|
||||
|
||||
VIR_DEBUG("No host CPU model info from QEMU; probing host CPU directly");
|
||||
|
||||
cpuModels = virQEMUCapsGetCPUDefinitions(qemuCaps, type, NULL, NULL);
|
||||
cpuModels = virQEMUCapsGetCPUModels(qemuCaps, type, NULL, NULL);
|
||||
hostCPU = virQEMUCapsProbeHostCPU(hostArch, cpuModels);
|
||||
|
||||
if (!hostCPU ||
|
||||
@ -5282,7 +5282,7 @@ virQEMUCapsFillDomainCPUCaps(virCapsPtr caps,
|
||||
VIR_AUTOSTRINGLIST models = NULL;
|
||||
|
||||
if (virCPUGetModels(domCaps->arch, &models) >= 0) {
|
||||
domCaps->cpu.custom = virQEMUCapsGetCPUDefinitions(qemuCaps,
|
||||
domCaps->cpu.custom = virQEMUCapsGetCPUModels(qemuCaps,
|
||||
domCaps->virttype,
|
||||
(const char **)models,
|
||||
blacklist);
|
||||
|
@ -572,11 +572,11 @@ int virQEMUCapsAddCPUDefinitions(virQEMUCapsPtr qemuCaps,
|
||||
const char **name,
|
||||
size_t count,
|
||||
virDomainCapsCPUUsable usable);
|
||||
virDomainCapsCPUModelsPtr virQEMUCapsGetCPUDefinitions(virQEMUCapsPtr qemuCaps,
|
||||
virDomainCapsCPUModelsPtr virQEMUCapsGetCPUModels(virQEMUCapsPtr qemuCaps,
|
||||
virDomainVirtType type,
|
||||
const char **modelWhitelist,
|
||||
const char **modelBlacklist);
|
||||
int virQEMUCapsFetchCPUDefinitions(qemuMonitorPtr mon,
|
||||
int virQEMUCapsFetchCPUModels(qemuMonitorPtr mon,
|
||||
virArch arch,
|
||||
virDomainCapsCPUModelsPtr *cpuModels);
|
||||
|
||||
|
@ -13710,7 +13710,7 @@ qemuConnectBaselineHypervisorCPU(virConnectPtr conn,
|
||||
if (!qemuCaps)
|
||||
goto cleanup;
|
||||
|
||||
if (!(cpuModels = virQEMUCapsGetCPUDefinitions(qemuCaps, virttype, NULL, NULL)) ||
|
||||
if (!(cpuModels = virQEMUCapsGetCPUModels(qemuCaps, virttype, NULL, NULL)) ||
|
||||
cpuModels->nmodels == 0) {
|
||||
virReportError(VIR_ERR_OPERATION_UNSUPPORTED,
|
||||
_("QEMU '%s' does not support any CPU models for "
|
||||
|
@ -4341,7 +4341,7 @@ qemuProcessFetchCPUDefinitions(virQEMUDriverPtr driver,
|
||||
if (qemuDomainObjEnterMonitorAsync(driver, vm, asyncJob) < 0)
|
||||
goto error;
|
||||
|
||||
rc = virQEMUCapsFetchCPUDefinitions(priv->mon, vm->def->os.arch, &models);
|
||||
rc = virQEMUCapsFetchCPUModels(priv->mon, vm->def->os.arch, &models);
|
||||
|
||||
if (qemuDomainObjExitMonitor(driver, vm) < 0 || rc < 0)
|
||||
goto error;
|
||||
@ -6057,7 +6057,7 @@ qemuProcessUpdateGuestCPU(virDomainDefPtr def,
|
||||
VIR_QEMU_CAPS_HOST_CPU_MIGRATABLE)) < 0)
|
||||
return -1;
|
||||
|
||||
cpuModels = virQEMUCapsGetCPUDefinitions(qemuCaps, def->virtType, NULL, NULL);
|
||||
cpuModels = virQEMUCapsGetCPUModels(qemuCaps, def->virtType, NULL, NULL);
|
||||
|
||||
if (virCPUTranslate(def->os.arch, def->cpu, cpuModels) < 0)
|
||||
return -1;
|
||||
|
@ -542,7 +542,7 @@ cpuTestGetCPUModels(const struct data *data,
|
||||
if (!(qemuCaps = cpuTestMakeQEMUCaps(data)))
|
||||
return -1;
|
||||
|
||||
*models = virQEMUCapsGetCPUDefinitions(qemuCaps, VIR_DOMAIN_VIRT_KVM, NULL, NULL);
|
||||
*models = virQEMUCapsGetCPUModels(qemuCaps, VIR_DOMAIN_VIRT_KVM, NULL, NULL);
|
||||
|
||||
virObjectUnref(qemuCaps);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user