Project

General

Profile

Actions

Feature #12528

closed

expand hypervisor management API

Added by Patrick Mooney about 2 years ago. Updated about 2 years ago.

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

100%

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

Description

This is an omnibus ticket for the upstreaming of the following SmartOS changes (specifically their contents relating to HMA):
- OS-6400 want HVM exclusion lock
- OS-6799 hvm exclusion failures are silent
- OS-7080 bhyve and KVM should coexist in peace
- OS-7170 bhyve should support AMD
- OS-7696 bhyve should avoid all-cpu cross calls

OS-6400 and OS-6799 were largely subsumed by the changes that follow them. The details about those are preserved below:

OS-7080 bhyve and KVM should coexist in peace

With the merge of OS-6400, KVM and bhyve could be shipped together on the same system, but only one may run at any given time. The API should be expanded so that both hypervisors can run simultaneously on the same system.

OS-7170 bhyve should support AMD

When the bhyve porting effort was underway, all effort was focused on the Intel side, ignoring AMD support. With Epyc coming down the pipeline, it would be nice to finish the porting effort so that bhyve works there as well.

OS-7696 bhyve should avoid all-cpu cross calls

As part of the effort to understand the implication of shared resources for Hyperthreaded CPUs, facilities which issue cross calls to all CPUs are being scrutinized. In bhyve, this is exposed via the smp_rendezvous glue interface. Previously it was used for VMX initialization in addition to cautious EPT invalidation when a VM is created. With the VMX initialization taken over by HMA, only the invept use-case remains. This too could be supplanted by an HMA helper for the task (as well as integration with the register_cpu_setup_func handler).


Related issues

Related to illumos gate - Feature #12529: want exclusive hma registrationClosedAndy Fiddaman

Actions
Actions #1

Updated by Patrick Mooney about 2 years ago

Actions #2

Updated by Patrick Mooney about 2 years ago

  • Description updated (diff)
Actions #3

Updated by Patrick Mooney about 2 years ago

  • Description updated (diff)
Actions #4

Updated by Patrick Mooney about 2 years ago

A smoke test was done with this as #12529 on both Intel (hardware) and AMD (via nested virt) systems to confirm that HMA properly detected VMX/SVM capabilities, and initialized them during start-up. Beyond that, it relies on the testing done in SmartOS and later OmniOSCE (particularly for the #12529 exclusion).

Actions #5

Updated by Electric Monk about 2 years ago

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

git commit 761dea5e2659dff417ad5cdddda547702c3966ae

commit  761dea5e2659dff417ad5cdddda547702c3966ae
Author: Patrick Mooney <pmooney@pfmooney.com>
Date:   2020-04-28T16:44:31.000Z

    12528 expand hypervisor management API
    Reviewed by: John Levon <john.levon@joyent.com>
    Reviewed by: Robert Mustacchi <rm@joyent.com>
    Reviewed by: Toomas Soome <tsoome@me.com>
    Reviewed by: Andy Fiddaman <andy@omniosce.org>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF