Project

General

Profile

Feature #12869

bhyve kernel/user split should be clearer

Added by Patrick Mooney 5 months ago. Updated 5 months ago.

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

100%

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

Description

To avoid code duplication, and for convenience, bhyve shares swaths of logic between the kernel module and userspace. For certain things, like ioctl struct definitions, this is obviously a necessity. In other cases, it's just to provide consistent API expectations for kernelspace and userspace code. In the latter case, some of the demarcation lines can be confusing, and it introduces unnecessary coupling between the userland and kernel code. Where possible, it would be nice to separate those interfaces.

Note: The instruction decoding logic is used in both kernel and userland components and its separation is complicated beyond the scope of this change.

#1

Updated by Patrick Mooney 5 months ago

I smoke tested this on a local lab machine, making sure that a test instance was able to boot up and run as it had before. Nothing in the VM execution appeared to be out of the ordinary.

#2

Updated by Patrick Mooney 5 months ago

Mike Zeller tested in his setup with this (and #12871) applied on top of SmartOS. He booted up an Ubuntu 18.04 VM and exercised various bits like disk and network IO.

#3

Updated by Electric Monk 5 months ago

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

git commit b58b977e8fdb738e19dfe72999e4f57a62e9d05f

commit  b58b977e8fdb738e19dfe72999e4f57a62e9d05f
Author: Patrick Mooney <pmooney@pfmooney.com>
Date:   2020-06-23T16:07:07.000Z

    12869 bhyve kernel/user split should be clearer
    Reviewed by: Mike Zeller <mike.zeller@joyent.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Also available in: Atom PDF