QEMU supports a number of accelerators. It'd be good to have more
generic name for kvmCPUModels and kvmCPU.
Signed-off-by: Roman Bolshakov <r.bolshakov(a)yadro.com>
---
src/qemu/qemu_capabilities.c | 36 ++++++++++++++++++------------------
1 file changed, 18 insertions(+), 18 deletions(-)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index b3bfe500e2..4dac040246 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -571,7 +571,7 @@ struct _virQEMUCaps {
virArch arch;
- virDomainCapsCPUModelsPtr kvmCPUModels;
+ virDomainCapsCPUModelsPtr accelCPUModels;
virDomainCapsCPUModelsPtr tcgCPUModels;
size_t nmachineTypes;
@@ -582,7 +582,7 @@ struct _virQEMUCaps {
virSEVCapability *sevCapabilities;
- virQEMUCapsHostCPUData kvmCPU;
+ virQEMUCapsHostCPUData accelCPU;
virQEMUCapsHostCPUData tcgCPU;
};
@@ -1546,9 +1546,9 @@ virQEMUCapsPtr virQEMUCapsNewCopy(virQEMUCapsPtr qemuCaps)
ret->arch = qemuCaps->arch;
- if (qemuCaps->kvmCPUModels) {
- ret->kvmCPUModels = virDomainCapsCPUModelsCopy(qemuCaps->kvmCPUModels);
- if (!ret->kvmCPUModels)
+ if (qemuCaps->accelCPUModels) {
+ ret->accelCPUModels =
virDomainCapsCPUModelsCopy(qemuCaps->accelCPUModels);
+ if (!ret->accelCPUModels)
goto error;
}
@@ -1558,7 +1558,7 @@ virQEMUCapsPtr virQEMUCapsNewCopy(virQEMUCapsPtr qemuCaps)
goto error;
}
- if (virQEMUCapsHostCPUDataCopy(&ret->kvmCPU, &qemuCaps->kvmCPU) < 0
||
+ if (virQEMUCapsHostCPUDataCopy(&ret->accelCPU, &qemuCaps->accelCPU)
< 0 ||
virQEMUCapsHostCPUDataCopy(&ret->tcgCPU, &qemuCaps->tcgCPU) <
0)
goto error;
@@ -1605,7 +1605,7 @@ void virQEMUCapsDispose(void *obj)
}
VIR_FREE(qemuCaps->machineTypes);
- virObjectUnref(qemuCaps->kvmCPUModels);
+ virObjectUnref(qemuCaps->accelCPUModels);
virObjectUnref(qemuCaps->tcgCPUModels);
virBitmapFree(qemuCaps->flags);
@@ -1618,7 +1618,7 @@ void virQEMUCapsDispose(void *obj)
virSEVCapabilitiesFree(qemuCaps->sevCapabilities);
- virQEMUCapsHostCPUDataClear(&qemuCaps->kvmCPU);
+ virQEMUCapsHostCPUDataClear(&qemuCaps->accelCPU);
virQEMUCapsHostCPUDataClear(&qemuCaps->tcgCPU);
}
@@ -1772,8 +1772,8 @@ virQEMUCapsAddCPUDefinitions(virQEMUCapsPtr qemuCaps,
size_t i;
virDomainCapsCPUModelsPtr cpus = NULL;
- if (type == VIR_DOMAIN_VIRT_KVM && qemuCaps->kvmCPUModels)
- cpus = qemuCaps->kvmCPUModels;
+ if (type == VIR_DOMAIN_VIRT_KVM && qemuCaps->accelCPUModels)
+ cpus = qemuCaps->accelCPUModels;
else if (type == VIR_DOMAIN_VIRT_QEMU && qemuCaps->tcgCPUModels)
cpus = qemuCaps->tcgCPUModels;
@@ -1782,7 +1782,7 @@ virQEMUCapsAddCPUDefinitions(virQEMUCapsPtr qemuCaps,
return -1;
if (type == VIR_DOMAIN_VIRT_KVM)
- qemuCaps->kvmCPUModels = cpus;
+ qemuCaps->accelCPUModels = cpus;
else
qemuCaps->tcgCPUModels = cpus;
}
@@ -1801,7 +1801,7 @@ virQEMUCapsGetCPUDefinitions(virQEMUCapsPtr qemuCaps,
virDomainVirtType type)
{
if (type == VIR_DOMAIN_VIRT_KVM)
- return qemuCaps->kvmCPUModels;
+ return qemuCaps->accelCPUModels;
else
return qemuCaps->tcgCPUModels;
}
@@ -1812,7 +1812,7 @@ virQEMUCapsGetHostCPUData(virQEMUCapsPtr qemuCaps,
virDomainVirtType type)
{
if (type == VIR_DOMAIN_VIRT_KVM)
- return &qemuCaps->kvmCPU;
+ return &qemuCaps->accelCPU;
else
return &qemuCaps->tcgCPU;
}
@@ -1876,7 +1876,7 @@ virQEMUCapsIsCPUModeSupported(virQEMUCapsPtr qemuCaps,
case VIR_CPU_MODE_CUSTOM:
if (type == VIR_DOMAIN_VIRT_KVM)
- cpus = qemuCaps->kvmCPUModels;
+ cpus = qemuCaps->accelCPUModels;
else
cpus = qemuCaps->tcgCPUModels;
return cpus && cpus->nmodels > 0;
@@ -2363,7 +2363,7 @@ virQEMUCapsProbeQMPCPUDefinitions(virQEMUCapsPtr qemuCaps,
if (tcg || !virQEMUCapsGet(qemuCaps, QEMU_CAPS_KVM))
qemuCaps->tcgCPUModels = models;
else
- qemuCaps->kvmCPUModels = models;
+ qemuCaps->accelCPUModels = models;
return 0;
}
@@ -3204,7 +3204,7 @@ virQEMUCapsLoadCPUModels(virQEMUCapsPtr qemuCaps,
goto cleanup;
if (type == VIR_DOMAIN_VIRT_KVM)
- qemuCaps->kvmCPUModels = cpus;
+ qemuCaps->accelCPUModels = cpus;
else
qemuCaps->tcgCPUModels = cpus;
@@ -3679,7 +3679,7 @@ virQEMUCapsFormatCPUModels(virQEMUCapsPtr qemuCaps,
if (type == VIR_DOMAIN_VIRT_KVM) {
typeStr = "kvm";
- cpus = qemuCaps->kvmCPUModels;
+ cpus = qemuCaps->accelCPUModels;
} else {
typeStr = "tcg";
cpus = qemuCaps->tcgCPUModels;
@@ -5073,7 +5073,7 @@ virQEMUCapsFillDomainCPUCaps(virCapsPtr caps,
virDomainCapsCPUModelsPtr cpus;
if (domCaps->virttype == VIR_DOMAIN_VIRT_KVM)
- cpus = qemuCaps->kvmCPUModels;
+ cpus = qemuCaps->accelCPUModels;
else
cpus = qemuCaps->tcgCPUModels;
--
2.17.1 (Apple Git-112)