Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
src/qemu/qemu_capabilities.c | 21 +++++++--------------
1 file changed, 7 insertions(+), 14 deletions(-)
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index dac3d3b633..255ae8e665 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -5256,24 +5256,17 @@ virQEMUCapsFillDomainCPUCaps(virCapsPtr caps,
if (virQEMUCapsIsCPUModeSupported(qemuCaps, caps, domCaps->virttype,
VIR_CPU_MODE_CUSTOM)) {
- virDomainCapsCPUModelsPtr filtered = NULL;
- char **models = NULL;
const char *blacklist[] = { "host", NULL };
+ VIR_AUTOSTRINGLIST models = NULL;
if (virCPUGetModels(domCaps->arch, &models) >= 0) {
- virDomainCapsCPUModelsPtr cpus;
-
- if (domCaps->virttype == VIR_DOMAIN_VIRT_KVM)
- cpus = qemuCaps->kvmCPUModels;
- else
- cpus = qemuCaps->tcgCPUModels;
-
- filtered = virDomainCapsCPUModelsFilter(cpus,
- (const char **)models,
- blacklist);
- virStringListFree(models);
+ domCaps->cpu.custom = virQEMUCapsGetCPUDefinitions(qemuCaps,
+ domCaps->virttype,
+ (const char **)models,
+ blacklist);
+ } else {
+ domCaps->cpu.custom = NULL;
}
- domCaps->cpu.custom = filtered;
}
return 0;
--
2.23.0