Bug #13063
closedclarify VMCS interfaces in bhyve
100%
Description
As it was imported from FreeBSD, bhyve has an API surface for interacting with the VMCS (virtual machine control structure) when running on Intel hardware. This API is somewhat scattered and inconsistent, both in how it exposes access to VMCS tasks, and how it manipulates data when doing so. It is a mix of fallible (reporting errors) and infallible (panic on presumably unexpected errors) functions, with a real mix of how consumers use and interpret any potential error states.
It would be nice to clear this up so that all unexpected errors are handled with panic()
, making handling easier for consumers. Additionally, any manipulation of the data being written/read from the VMCS should be done as part of the VMX logic, so it's clear, rather than being hidden by the VMCS API as it is now. The combination of these efforts should result in cleaner more readable code which is less prone to barreling through unexpected conditions.
Related issues
Updated by Patrick Mooney almost 3 years ago
Using the proposed fix for this, I booted up the normal crew of guests:
- CentOS
- OmniOSce
- OpenBSD
- Windows
All seemed content to boot up normally.
Updated by Dan McDonald almost 3 years ago
- Related to Bug #13064: bhyve should not waste extra page for VMCS added
Updated by Electric Monk almost 3 years ago
- Status changed from In Progress to Closed
- % Done changed from 0 to 100
git commit 007ca33219ffdc49281657f5f8a9ee1bbfc367ab
commit 007ca33219ffdc49281657f5f8a9ee1bbfc367ab Author: Patrick Mooney <pmooney@pfmooney.com> Date: 2020-08-28T18:28:42.000Z 13063 clarify VMCS interfaces in bhyve 13064 bhyve should not waste extra page for VMCS Reviewed by: Robert Mustacchi <rm@fingolfin.org> Reviewed by: Mike Zeller <mike.zeller@joyent.com> Approved by: Dan McDonald <danmcd@joyent.com>