mirror of
https://github.com/aljazceru/kata-containers.git
synced 2025-12-26 18:44:47 +01:00
virtcontainers: fix invalid CPU topology
sockets * cores * threads should be equal to maxcpus otherwise a
warning is thrown: 'warning: Invalid CPU topology deprecated:
sockets * cores * threads != maxcpus'
This warning in the future will be an error and won't be possible to run
kata containers.
fixes #1605
Signed-off-by: Julio Montes <julio.montes@intel.com>
This commit is contained in:
@@ -257,7 +257,7 @@ func (q *qemuArchBase) bridges(number uint32) []types.PCIBridge {
|
||||
func (q *qemuArchBase) cpuTopology(vcpus, maxvcpus uint32) govmmQemu.SMP {
|
||||
smp := govmmQemu.SMP{
|
||||
CPUs: vcpus,
|
||||
Sockets: vcpus,
|
||||
Sockets: maxvcpus,
|
||||
Cores: defaultCores,
|
||||
Threads: defaultThreads,
|
||||
MaxCPUs: maxvcpus,
|
||||
|
||||
@@ -165,7 +165,7 @@ func TestQemuArchBaseCPUTopology(t *testing.T) {
|
||||
|
||||
expectedSMP := govmmQemu.SMP{
|
||||
CPUs: vcpus,
|
||||
Sockets: vcpus,
|
||||
Sockets: defaultMaxQemuVCPUs,
|
||||
Cores: defaultCores,
|
||||
Threads: defaultThreads,
|
||||
MaxCPUs: defaultMaxQemuVCPUs,
|
||||
|
||||
Reference in New Issue
Block a user