Skip to content
This repository has been archived by the owner on Jan 28, 2023. It is now read-only.

Support more than 16 vCPUs #195

Open
mmisono opened this issue Mar 23, 2019 · 2 comments · May be fixed by #287
Open

Support more than 16 vCPUs #195

mmisono opened this issue Mar 23, 2019 · 2 comments · May be fixed by #287
Labels

Comments

@mmisono
Copy link

mmisono commented Mar 23, 2019

Currently, HAXM supports max 16 vCPUs per VM.

Considering recent multi-core CPUs (e.g., Xeon scalable processor), I think the current limit is small. KVM supports max 288 vCPUs.

It seems on NetBSD, HAX_MAX_VMS * HAX_MAX_VCPUS pseudo devices are created at the module initialization, but on other platforms, a pseudo device is created when creating a vCPU (i.e., in the hax_vcpu_create_host()). So I think except for NetBSD, increasing HAX_MAX_VCPUS has no side effects.

QEMU uses the HAX_MAX_VCPUS. This is my patch for the QEMU to allocate the hax_vcpu_state as much as necessary (I tested this on the Linux host / Linux guest). I'm not sure other software using HAXM.
Is there anything to consider?

@hyuan3
Copy link
Contributor

hyuan3 commented May 6, 2019

Do you test on Windows host? I checked Windows HAXM codes. It also has limitation that HAX_MAX_VCPUS is defined to 16. Besides the limitation, vpid is a two bytes structure. High byte represents vm_id. So can't allocate vcpu for a VM more than 255.

@mmisono
Copy link
Author

mmisono commented May 7, 2019

@hyuan3 Hi, I don't have a Windows test environment and I tested my patch only on Linux.

@coxuintel coxuintel linked a pull request Apr 13, 2020 that will close this issue
@bowen218 bowen218 linked a pull request Apr 13, 2020 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants