Page MenuHomeFreeBSD

Bhyve acpi MADT table correction for VM_MAXCPU > 21
Needs RevisionPublic

Authored by rgrimes on Fri, Jan 11, 1:08 AM.

Details

Reviewers
jhb
tychon
pmooney_pfmooney.com
araujo
Group Reviewers
bhyve
Summary

The bhyve acpi MADT table was given a static space of 256 (0x100) bytes, this is enough space to allow VM_MAXCPU to be 21, this patch fixes that so VM_MAXCPU can be of arbitrary value and not overflow the space by actually calculating the space needed for the table.
This is a fix for PR212782

Test Plan

Compile vmm.ko, and related code (libvmmapi, bhyve and bhyveload) with VM_MAXCPU=24 and boot a VM, note that the panic in virtualization maillist no longer occurs

Diff Detail

Repository
rS FreeBSD src repository
Lint
Lint Skipped
Unit
Unit Tests Skipped

Event Timeline

rgrimes created this revision.Fri, Jan 11, 1:08 AM
rgrimes edited the summary of this revision. (Show Details)Fri, Jan 11, 1:10 AM
rgrimes edited the test plan for this revision. (Show Details)
araujo requested changes to this revision.Tue, Jan 15, 12:19 AM

It doesn't looks quite right! I need more time to articulate better arguments, but this patch as it is, must not be committed in.

usr.sbin/bhyve/acpi.c
80

Gratuitous change that doesn't add anything. Mind let it be like was before?

This revision now requires changes to proceed.Tue, Jan 15, 12:19 AM