Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
Reviewed-by: Ján Tomko <jtomko(a)redhat.com>
---
Notes:
Version 2:
- no change
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 e6a7ee4f14..b608eb1a43 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -5297,24 +5297,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