Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions libvirt/tests/src/virsh_cmd/domain/virsh_emulatorpin.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,11 @@ def run(test, params, env):
if 'cpuset' in vcpu_attrs:
if vcpu_attrs['cpuset'] == "x,y":
vcpu_attrs['cpuset'] = "0,%s" % (cpu_max - 1)
# Updating max cpus according to smp value if topology is present
if vmxml.get_cpu_topology():
topology = vmxml.get_cpu_topology()
max_vcpu = (int(topology['sockets']) * int(topology['cores']) * int(topology['threads']))
vcpu_attrs['vcpu'] = max_vcpu
vmxml.setup_attrs(**vcpu_attrs)
vmxml.sync()
try:
Expand Down