mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 03:12:22 +00:00
qemu: Fix maximum physical address size in baseline CPU
We should include maximum physical address size in the CPU definition created by virConnectBaselineHypervisorCPU only if we know the value for all input CPUs. Otherwise we would create a CPU definition that is not usable on all hosts from which we gathered the CPU info. https://issues.redhat.com/browse/RHEL-24850 Signed-off-by: Jiri Denemark <jdenemar@redhat.com> Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
f22d00a9e6
commit
e71a510605
@ -11914,10 +11914,12 @@ qemuConnectBaselineHypervisorCPU(virConnectPtr conn,
|
||||
goto cleanup;
|
||||
|
||||
for (i = 0; i < ncpus; i++) {
|
||||
if (!cpus[i]->addr || cpus[i]->addr->limit == 0)
|
||||
if (!cpus[i]->addr || cpus[i]->addr->limit == 0) {
|
||||
physAddrSize = 0;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (physAddrSize == 0 || cpus[i]->addr->limit < physAddrSize)
|
||||
if (i == 0 || cpus[i]->addr->limit < physAddrSize)
|
||||
physAddrSize = cpus[i]->addr->limit;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user