runtime: don't set socket and thread for arm/virt

As this is just a initial vcpu hotplug support, thread and socket has
not been supported. So, don't set socket and thread when hotadd cpu for
arm/virt.

Fixes: #3280
Signed-off-by: Jianyong Wu <jianyong.wu@arm.com>
This commit is contained in:
Jianyong Wu 2021-12-16 14:53:38 +08:00
parent 8828ef4176
commit 42771fa726

View File

@ -1840,8 +1840,8 @@ func (q *qemu) hotplugAddCPUs(amount uint32) (uint32, error) {
coreID := fmt.Sprintf("%d", hc.Properties.Core) coreID := fmt.Sprintf("%d", hc.Properties.Core)
threadID := fmt.Sprintf("%d", hc.Properties.Thread) threadID := fmt.Sprintf("%d", hc.Properties.Thread)
// If CPU type is IBM pSeries or Z, we do not set socketID and threadID // If CPU type is IBM pSeries, Z or arm virt, we do not set socketID and threadID
if machine.Type == "pseries" || machine.Type == "s390-ccw-virtio" { if machine.Type == "pseries" || machine.Type == "s390-ccw-virtio" || machine.Type == "virt" {
socketID = "" socketID = ""
threadID = "" threadID = ""
dieID = "" dieID = ""