mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-22 13:45:38 +00:00
5b74103b0b
From: Ian Campbell <ian.campbell@citrix.com> xend prior to 4.0 understands vcpus as maxvcpus and vcpu_avail as a bit map of which cpus are online (default is all). xend from 4.0 onwards understands maxvcpus as maxvcpus and vcpus as the number which are online (from 0..N-1). The upstream commit (68a94cf528e6 "xm: Add maxvcpus support") claims that if maxvcpus is omitted then the old behaviour (i.e. obeying vcpu_avail) is retained, but AFAICT it was not, in this case vcpu==maxcpus==online cpus. This is good for us because handling anything else would be fiddly. This patch changes parsing of the virDomainDef maxvcpus and vcpus entries to use the corresponding 'maxvcpus' and 'vcpus' settings from xm and xl config. It also drops use of the old Xen 3.x 'vcpu_avail' setting. The change also removes the maxvcpus limit of MAX_VIRT_VCPUS (since maxvcpus is simply a count, not a bit mask), which is particularly crucial on ARM where MAX_VIRT_CPUS == 1 (since all guests are expected to support vcpu placement, and therefore only the boot vcpu's info lives in the shared info page). Existing tests adjusted accordingly, and new tests added for the 'maxvcpus' setting.
14 lines
344 B
INI
14 lines
344 B
INI
name = "XenGuest1"
|
|
uuid = "45b60f51-88a9-47a8-a3b3-5e66d71b2283"
|
|
maxmem = 512
|
|
memory = 512
|
|
maxvcpus = 8
|
|
vcpus = 4
|
|
localtime = 0
|
|
on_poweroff = "preserve"
|
|
on_reboot = "restart"
|
|
on_crash = "preserve"
|
|
vif = [ "mac=5a:36:0e:be:00:09" ]
|
|
bootloader = "/usr/bin/pygrub"
|
|
disk = [ "/var/lib/xen/images/debian/disk.qcow2,qcow2,xvda,w,backendtype=qdisk" ]
|