This patch is work in progress, and not ready to use / test. It will probably cause panics.
First attempts at making VM_MAXCPU tunable, and I'm hoping I'll get some feedback on my approach here:
- Create a tunable maxvcpus
- Replace VM_MAXCPU with maxvcpu in loops and dynamic allocations
- Limit that tunable to 21 for now
- Dynamically allocate arrays of size VM_MAXCPU in
- vm.vcpu
- svm_softc.apic_page
- svm_softc.svm_vcpu
- vmx.vmcs, vmx.apic_page, vmx.pir_desc, vmx.guest_msrs, vmx.ctx, vmx.cap, vmx.state
- Dynamically define VMM_STAT_ARRAYS
- IPIS_SENT
[ } Dynamically calculate FADT_OFFSET, HPET_OFFSET, MCFG_OFFSET, FACS_OFFSET, DSDT_OFFSET, and remove the 21 vcpu limitation
Only comment on methodology used at this time, the details in the diff are fluid and not worth spending a lot of time on.
Commit message to contain:
Attribution to fabian.freyer_physik.tu-berlin.de for his work on this