diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 1b60c13ee7..e04a3d775f 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -1525,20 +1525,13 @@ virQEMUCapsHostCPUDataCopy(virQEMUCapsHostCPUDataPtr dst, } -static void -virQEMUCapsHostCPUDataClearModels(virQEMUCapsHostCPUDataPtr cpuData) -{ - virCPUDefFree(cpuData->reported); - virCPUDefFree(cpuData->migratable); - virCPUDefFree(cpuData->full); -} - - static void virQEMUCapsHostCPUDataClear(virQEMUCapsHostCPUDataPtr cpuData) { qemuMonitorCPUModelInfoFree(cpuData->info); - virQEMUCapsHostCPUDataClearModels(cpuData); + virCPUDefFree(cpuData->reported); + virCPUDefFree(cpuData->migratable); + virCPUDefFree(cpuData->full); memset(cpuData, 0, sizeof(*cpuData)); } @@ -2981,20 +2974,6 @@ virQEMUCapsNewHostCPUModel(void) } -void -virQEMUCapsFreeHostCPUModel(virQEMUCapsPtr qemuCaps, - virArch hostArch, - virDomainVirtType type) -{ - virQEMUCapsHostCPUDataPtr cpuData = virQEMUCapsGetHostCPUData(qemuCaps, type); - - if (!virQEMUCapsGuestIsNative(hostArch, qemuCaps->arch)) - return; - - virQEMUCapsHostCPUDataClearModels(cpuData); -} - - void virQEMUCapsInitHostCPUModel(virQEMUCapsPtr qemuCaps, virArch hostArch, diff --git a/src/qemu/qemu_capspriv.h b/src/qemu/qemu_capspriv.h index cb5e0dd9a9..8d1a40fe74 100644 --- a/src/qemu/qemu_capspriv.h +++ b/src/qemu/qemu_capspriv.h @@ -56,11 +56,6 @@ void virQEMUCapsSetArch(virQEMUCapsPtr qemuCaps, virArch arch); -void -virQEMUCapsFreeHostCPUModel(virQEMUCapsPtr qemuCaps, - virArch hostArch, - virDomainVirtType type); - void virQEMUCapsInitHostCPUModel(virQEMUCapsPtr qemuCaps, virArch hostArch, diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index f94a3df756..3d84cb346a 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -418,11 +418,6 @@ testUpdateQEMUCaps(const struct testInfo *info, !!(info->flags & FLAG_SKIP_LEGACY_CPUS)) < 0) goto cleanup; - virQEMUCapsFreeHostCPUModel(info->qemuCaps, caps->host.arch, - VIR_DOMAIN_VIRT_KVM); - virQEMUCapsFreeHostCPUModel(info->qemuCaps, caps->host.arch, - VIR_DOMAIN_VIRT_QEMU); - virQEMUCapsInitHostCPUModel(info->qemuCaps, caps->host.arch, VIR_DOMAIN_VIRT_KVM); virQEMUCapsInitHostCPUModel(info->qemuCaps, caps->host.arch,