vmmctl ioctls should have more structure
Currently, the ioctls to create or destroy a bhyve instance pass only a pointer to the name string of the VM as their data argument. This was to mimic the sysctl interface which FreeBSD exposed to VM creation and deletion. As bhyve is built out, it is apparent that when creating an instance, other attributes in addition to the name will be useful to have at create time. Tunable max CPUs, memory allocation strategy, and adjustable VMM capabilities (like APICv) all come to mind as possible additions there. The VMM_CREATE_VM and VMM_DESTROY_VM ioctls should be updated to pass their required data via structures which can be expanded.
Updated by Patrick Mooney 11 months ago
The only flag set to be passed through the new VMM_CREATE_VM ioctl is
VCF_RESERVOIR_MEM, toggling behavior covered by #13833. Booting up on a platform that included this change, I confirmed that normal bhyve operation is able to create and destroy instances normally (where the flags value passed through the ioctl is properly initialized to 0). I also checked that the flag for using reservoir memory is properly interpreted to set
VCF_RESERVOIR_MEM in the flags for vm creation and that the resulting VM does, in fact, allocate its memory from the existing reservoir pool.
Updated by Electric Monk 10 months ago
- Status changed from In Progress to Closed
- % Done changed from 0 to 100
commit b57f5d3e6a2df8d435e606797cf3934811848343 Author: Patrick Mooney <firstname.lastname@example.org> Date: 2021-07-27T19:26:22.000Z 13833 want bhyve memory reservoir 13822 bhyve memory should exert memory pressure 13834 want extensible page_resv 13821 vmmctl ioctls should have more structure Reviewed by: Andy Fiddaman <email@example.com> Reviewed by: Jason King <firstname.lastname@example.org> Reviewed by: Dan Cross <email@example.com> Reviewed by: Hans Rosenfeld <firstname.lastname@example.org> Reviewed by: Mike Zeller <email@example.com> Approved by: Dan McDonald <firstname.lastname@example.org>