mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-04-01 20:05:19 +00: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;
|
||||
|
||||
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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user