提交 71d5686f 编写于 作者: J Jiri Denemark

Properly advertise cpuselection guest capability

There's no sense in advertising cpuselection capability when host CPU
is not properly detected and advertised in host capabilities.
上级 f5991566
......@@ -892,9 +892,10 @@ qemudCapsInitGuest(virCapsPtr caps,
guest->arch.defaultInfo.emulator_mtime = binary_mtime;
if (qemudProbeCPUModels(binary, info->arch, &ncpus, NULL) == 0
&& ncpus > 0
&& !virCapabilitiesAddGuestFeature(guest, "cpuselection", 1, 0))
if (caps->host.cpu &&
qemudProbeCPUModels(binary, info->arch, &ncpus, NULL) == 0 &&
ncpus > 0 &&
!virCapabilitiesAddGuestFeature(guest, "cpuselection", 1, 0))
goto error;
if (hvm) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册