Project

General

Profile

Actions

Bug #14731

closed

clean malloc/free shims from bhyve

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

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

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

The kernel potion of bhyve uses some shims for malloc() and free() from when it was ported from FreeBSD.
It would be nice to update those to use kmem_alloc/kmem_free directly, where possible, and more constrained shims when requirements are more strict (such as the page tables for VT-d).

Actions #1

Updated by Electric Monk 2 months ago

  • Gerrit CR set to 2178
Actions #2

Updated by Patrick Mooney about 2 months ago

I tested this on both AMD and Intel hardware.

The test suite still passes:

Results Summary
PASS      21

Running Time:   00:00:14
Percent passed: 100.0%
Log directory:  /var/tmp/test_results/20220609T164939

...

Results Summary
PASS      21

Running Time:   00:00:15
Percent passed: 100.0%
Log directory:  /var/tmp/test_results/20220609T165100

I proceeded through the normal battery of guest OS smoke tests. All booted and ran successfully.
With all of those tests done on DEBUG bits with kmem debugging enabled, I then initiated dumps on both machines and check the resulting cores with ::findleaks and ::kmem_verify, which both reported clean (modulo the expected noise).

Actions #3

Updated by Patrick Mooney about 2 months ago

The portions of this change related to vtd allocations were tested using the pending wad from #14732

Actions #4

Updated by Electric Monk about 2 months ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100

git commit 8130f8e19e97c2d371c7b8894112a375409fe34a

commit  8130f8e19e97c2d371c7b8894112a375409fe34a
Author: Patrick Mooney <pmooney@pfmooney.com>
Date:   2022-06-10T03:22:27.000Z

    14731 clean malloc/free shims from bhyve
    Reviewed by: Andy Fiddaman <andy@omnios.org>
    Reviewed by: Dan Cross <cross@oxidecomputer.com>
    Approved by: Gordon Ross <gordon.w.ross@gmail.com>

Actions

Also available in: Atom PDF