There's no sense in advertising cpuselection capability when host CPU
is not properly detected and advertised in host capabilities.
---
src/qemu/qemu_conf.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c
index 3fb0074..ff5bd43 100644
--- a/src/qemu/qemu_conf.c
+++ b/src/qemu/qemu_conf.c
@@ -892,7 +892,8 @@ qemudCapsInitGuest(virCapsPtr caps,
guest->arch.defaultInfo.emulator_mtime = binary_mtime;
- if (qemudProbeCPUModels(binary, info->arch, &ncpus, NULL) == 0
+ if (caps->host.cpu
+ && qemudProbeCPUModels(binary, info->arch, &ncpus, NULL) == 0
&& ncpus > 0
&& !virCapabilitiesAddGuestFeature(guest, "cpuselection", 1,
0))
goto error;
--
1.7.0.4