CPUHotPlug

From KVM
Revision as of 11:58, 25 January 2010 by Lmr (talk | contribs)

CPU Hotplug

CPU hotplug is a controverse feature. It exists on qemu-kvm for some time now, and according to some BZ movement, we know there are users for it. There are very few physical machines that actually support it. (Only one unisys box I know of), The Linux implementation follows what this specific box do, but happens to break Windows SVVP tests in an appearently unsolvable way. No one knows how to implement it on Windows, but it is believed that it should involve a windows-specific driver (to be written)

Hot-unplug does not work, and actually, does not even make that much sense.

Note: Some people might expect KVM virtualization to behave similarly to IBM power virtualization, power machines can virtualize several LPARS, and each one of the physical power processors can be split on 10 processing units, that can be assigned to machines at will. So effectively on that platform we have good support for adding and removing new CPUs to the guest systems. Perhaps that's why people request this feature. Obviously the situation under intel hardware is different.

Status

Linux guest support is pretty old, dating back to something around 2.6.19. qemu-kvm support exists, but merging it into qemu.git was not successful when tried, in the past. Reason being the BIOS changes, for the reasons already mentioned.

Testing

In any case, here's how to verify it:

  • switch to the monitor
  • type 'cpu_set <n+1> online'
  • A new cpu should appear on /sys/devices/system/cpu
  • bring it online by writting 1 to the "online" file inside that directory on guest
  • Try adding as many cpus as possible, and make sure we at least do not crash.