Project

General

Profile

Actions

Bug #13777

closed

bhyve kernel ifdef cleanup

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

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

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

When bhyve was originally ported, a number of ifdef/ifndef FreeBSD statements were put in place to mitigate differences between illumos and FreeBSD. These have slowly been whittled down in the kernel, where unlike the userspace bits, source compatibility is no longer an explicit goal. There are sections, particularly relating to vm_run(), which would become much more readable if the those ifdefs were cleaned up.

Actions #1

Updated by Electric Monk 3 months ago

  • Gerrit CR set to 1465
Actions #2

Updated by Patrick Mooney 3 months ago

There are a few ifdefs I'm leaving in place for now:
1. Ones relating to the iommu/vtd/pci-passthru, since I have little ability to test those bits
2. In areas which clearly need revisiting (due to context suggested by the comments)

Actions #3

Updated by Patrick Mooney 3 months ago

I booted the typical suite of guest OSes (Linux, Windows, illumos, OpenBSD) on Intel and AMD hardware. There was no apparent change in behavior between stock bits and those featuring this change.

Actions #4

Updated by Electric Monk 3 months ago

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

git commit f703164ba851040400c59bb71d4667c477b96bdb

commit  f703164ba851040400c59bb71d4667c477b96bdb
Author: Patrick Mooney <pmooney@pfmooney.com>
Date:   2021-05-13T00:00:09.000Z

    13777 bhyve kernel ifdef cleanup
    Reviewed by: Andy Fiddaman <andy@omnios.org>
    Reviewed by: Dan Cross <cross@oxidecomputer.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF