Project

General

Profile

Actions

Feature #13821

closed

vmmctl ioctls should have more structure

Added by Patrick Mooney 4 months ago. Updated about 2 months ago.

Status:
Closed
Priority:
Normal
Category:
bhyve
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

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.

Actions #1

Updated by Electric Monk 4 months ago

  • Gerrit CR set to 1522
Actions #2

Updated by Patrick Mooney 2 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.

Actions #3

Updated by Patrick Mooney about 2 months ago

I also tested this new interface with a version of Propolis which had been updated to use the new create/destroy request interface and it functioned properly.

Actions #4

Updated by Electric Monk about 2 months ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

git commit b57f5d3e6a2df8d435e606797cf3934811848343

commit  b57f5d3e6a2df8d435e606797cf3934811848343
Author: Patrick Mooney <pmooney@pfmooney.com>
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 <andy@omnios.org>
    Reviewed by: Jason King <jason.brian.king@gmail.com>
    Reviewed by: Dan Cross <cross@oxidecomputer.com>
    Reviewed by: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
    Reviewed by: Mike Zeller <mike.zeller@joyent.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF