qemu: capabilities: Remove 'virQEMUCapsAddCPUDefinitions'

The function was used only to fill the cpu models into fake
capabilities, whic no longer exists.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
Peter Krempa 2023-08-31 22:40:29 +02:00
parent 14106524cc
commit 58d9fe7202
2 changed files with 0 additions and 45 deletions

View File

@ -2119,46 +2119,6 @@ bool virQEMUCapsGetKVMSupportsSecureGuest(virQEMUCaps *qemuCaps)
}
/* Note that this function is invoked only by test code for faking supported cpu
* models */
int
virQEMUCapsAddCPUDefinitions(virQEMUCaps *qemuCaps,
virDomainVirtType type,
const char **name,
size_t count,
virDomainCapsCPUUsable usable)
{
size_t i;
size_t start;
virQEMUCapsAccel *accel = virQEMUCapsGetAccel(qemuCaps, type);
qemuMonitorCPUDefs *defs = accel->cpuModels;
if (defs) {
start = defs->ncpus;
VIR_EXPAND_N(defs->cpus, defs->ncpus, count);
} else {
start = 0;
if (!(defs = qemuMonitorCPUDefsNew(count)))
return -1;
accel->cpuModels = defs;
}
for (i = 0; i < count; i++) {
qemuMonitorCPUDefInfo *cpu = defs->cpus + start + i;
cpu->usable = usable;
cpu->name = g_strdup(name[i]);
/* while the type name doesn't correspond with reality, this is just for fake cpu models */
cpu->type = g_strdup(name[i]);
}
return 0;
}
static virDomainCapsCPUModels *
virQEMUCapsCPUDefsToModels(virArch arch,
qemuMonitorCPUDefs *defs,

View File

@ -708,11 +708,6 @@ virArch virQEMUCapsGetArch(virQEMUCaps *qemuCaps);
unsigned int virQEMUCapsGetVersion(virQEMUCaps *qemuCaps);
const char *virQEMUCapsGetPackage(virQEMUCaps *qemuCaps);
int virQEMUCapsAddCPUDefinitions(virQEMUCaps *qemuCaps,
virDomainVirtType type,
const char **name,
size_t count,
virDomainCapsCPUUsable usable);
virDomainCapsCPUModels *virQEMUCapsGetCPUModels(virQEMUCaps *qemuCaps,
virDomainVirtType type,
const char **modelAllowed,