Project

General

Profile

Actions

Bug #13063

closed

clarify VMCS interfaces in bhyve

Added by Patrick Mooney over 1 year ago. Updated over 1 year ago.

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

100%

Estimated time:
Difficulty:
Medium
Tags:
bhyve
Gerrit CR:

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

Related to illumos gate - Bug #13064: bhyve should not waste extra page for VMCSClosedPatrick Mooney

Actions
Actions #1

Updated by Electric Monk over 1 year ago

  • Gerrit CR set to 860
Actions #2

Updated by Patrick Mooney over 1 year 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.

Actions #3

Updated by Dan McDonald over 1 year ago

  • Related to Bug #13064: bhyve should not waste extra page for VMCS added
Actions #4

Updated by Electric Monk over 1 year 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>

Actions

Also available in: Atom PDF