mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
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.
This commit is contained in:
parent
f599156641
commit
71d5686f78
@ -892,9 +892,10 @@ qemudCapsInitGuest(virCapsPtr caps,
|
|||||||
|
|
||||||
guest->arch.defaultInfo.emulator_mtime = binary_mtime;
|
guest->arch.defaultInfo.emulator_mtime = binary_mtime;
|
||||||
|
|
||||||
if (qemudProbeCPUModels(binary, info->arch, &ncpus, NULL) == 0
|
if (caps->host.cpu &&
|
||||||
&& ncpus > 0
|
qemudProbeCPUModels(binary, info->arch, &ncpus, NULL) == 0 &&
|
||||||
&& !virCapabilitiesAddGuestFeature(guest, "cpuselection", 1, 0))
|
ncpus > 0 &&
|
||||||
|
!virCapabilitiesAddGuestFeature(guest, "cpuselection", 1, 0))
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
if (hvm) {
|
if (hvm) {
|
||||||
|
Loading…
Reference in New Issue
Block a user