Project

General

Profile

Actions

Bug #12990

closed

improve interface boundary for bhyve ins/outs

Added by Patrick Mooney 11 months ago. Updated 10 months ago.

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

100%

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

Description

While #12989 notes that in/out emulation is more straight forward than MMIO, due to the decoding acceleration present in SVM and VMX, it is still not entirely without challenges for userspace. For what I assume are "performance reasons", the more complicated ins/outs instructions have somewhat substantial userspace emulation demands. As it's not unreasonable to use those instructions with a rep prefix, the original authors of the emulation may have been trying to avoid repeated round trips out to userspace to drive the state forward. That said, actual usage of rep ins/rep outs seems extremely niche for modern OSes and workloads, making it less appealing to push the complexity of repetition to userspace, rather than keeping the exits simple (in/out to a single port) and driving the repetition in-kernel. This dovetails nicely into the virtual instruction emulation work for #12989, which also needs a way to drive multi-part instruction emulation contexts with device emulation requests in userspace.

Actions #1

Updated by Electric Monk 11 months ago

  • Gerrit CR set to 815
Actions #2

Updated by Patrick Mooney 10 months ago

Testing notes for this (and #12991) are written up in #12989.

Actions #3

Updated by Electric Monk 10 months ago

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

git commit e0c0d44e917080841514d0dd031a696c74e8c435

commit  e0c0d44e917080841514d0dd031a696c74e8c435
Author: Patrick Mooney <pmooney@pfmooney.com>
Date:   2020-08-20T19:19:51.000Z

    12989 improve interface boundary for bhyve MMIO
    12990 improve interface boundary for bhyve ins/outs
    12991 bhyve vlapic should SIPI more carefully
    Reviewed by: Mike Zeller <mike.zeller@joyent.com>
    Reviewed by: Joshua M. Clulow <josh@sysmgr.org>
    Reviewed by: Robert Mustacchi <rm@fingolfin.org>
    Approved by: Gordon Ross <gordon.w.ross@gmail.com>

Actions

Also available in: Atom PDF