[vbox-dev] cpu hotplug support

Sebastian Dyroff dyroff at cs.tu-berlin.de
Tue Jan 12 05:39:31 PST 2010


Hi all,

as part of a university project we added cpu-hotplug support for VirtualBox. 
We think it is a nice feature for the official version of VirtualBox. 

We tested it on the following architectures:

AMD 4 x hexacore System (Gentoo Linux 2.6.30 64bit)
AMD quadcore Phenom (Ubuntu 9.10 64bit and 9.04 64bit)
MacBookPro Intel dualcore (MacOS X Leopard 10.5.8)

It should work on any host that is supported by VirtualBox.

The guest system was a 64-bit Ubuntu 9.10 with up to 24 cpus. We couldn't test 
other os's because they don't seem to support cpu hotplugging or were too 
expensive.

The patches are licensed under the MIT license.

01-vmm-cpuhotplug.patch:
resets the cpu status and puts the cpu in real mode etc.

02-acpi-cpuhotplug.patch:
acpi table changes and interface for cpu hotplugging to the guest

03-vmmdev-cpuhotplug.patch:
guest additions interface for the cpu hotplug daemon

04-main-cpuhotplug.patch:
Main API and interface for the frontends  

05-runtime-cpuhotplug.patch:
Kernel threads for Linux (we thought to implement hot add/remove of the CPU 
from the guest additions kernel module first but that doesn't work on Linux. 
So it is not needed actually)

06-additions-cpuhotplug.patch:
The changes for the guest additions. Only implemented on Linux because we 
couldn't get any other OS to recognise the ACPI events.

The CPUs are ejected and made online from the VBoxService daemon. The only 
method to add/remove CPUs is to use the online/eject files in sysfs. If the 
daemon is not running the CPUs can be manually added/ejected through these 
files.
If a CPU is removed through VBoxManage which is still in use by the guest the 
unplug operation is aborted and an error
is shown.

All changes are also in our public git repository:
http://git.goodpoint.de/?p=kbs-vbox.git;a=summary

Regards,

Alexander Eichner
Sebastian Dyroff
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 01-vmm-cpuhotplug.patch.zip
Type: application/zip
Size: 3374 bytes
Desc: not available
Url : http://www.virtualbox.org/pipermail/vbox-dev/attachments/20100112/cedac831/attachment-0006.zip 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 03-vmmdev-cpuhotplug.patch.zip
Type: application/zip
Size: 2907 bytes
Desc: not available
Url : http://www.virtualbox.org/pipermail/vbox-dev/attachments/20100112/cedac831/attachment-0007.zip 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 05-runtime-cpuhotplug.patch.zip
Type: application/zip
Size: 2103 bytes
Desc: not available
Url : http://www.virtualbox.org/pipermail/vbox-dev/attachments/20100112/cedac831/attachment-0008.zip 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 02-acpi-cpuhotplug.patch.zip
Type: application/zip
Size: 7162 bytes
Desc: not available
Url : http://www.virtualbox.org/pipermail/vbox-dev/attachments/20100112/cedac831/attachment-0009.zip 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 04-main-cpuhotplug.patch.zip
Type: application/zip
Size: 9715 bytes
Desc: not available
Url : http://www.virtualbox.org/pipermail/vbox-dev/attachments/20100112/cedac831/attachment-0010.zip 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 06-additions-cpuhotplug.patch.zip
Type: application/zip
Size: 6047 bytes
Desc: not available
Url : http://www.virtualbox.org/pipermail/vbox-dev/attachments/20100112/cedac831/attachment-0011.zip 


More information about the vbox-dev mailing list