Project

General

Profile

Actions

Bug #13030

closed

remove 'retu' pattern from bhyve

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

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

100%

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

Description

In the bhyve kernel, there's a common pattern for handlers which may decide that emulation needs to continue in userspace. The existing API for such handlers is to pass a bool *retu argument to the function, and if a return-to-userspace is requested, the callee will set *retu = true and return a zero value. Meanwhile, it will use all the positive non-zero return values for typical error (errno) reporting. It would be simpler to use a negative return code to indicate the non-error return-to-userspace case. It wouldn't require the extra retu parameter and would simplify both callers and callees of the pattern.


Related issues

Related to illumos gate - Bug #13253: bhyve stumbles on APIC ICRLOClosedPatrick Mooney

Actions
Actions #1

Updated by Patrick Mooney almost 2 years ago

  • Subject changed from remove 'retu' pattern in bhyve to remove 'retu' pattern from bhyve
Actions #2

Updated by Electric Monk almost 2 years ago

  • Gerrit CR set to 840
Actions #3

Updated by Patrick Mooney almost 2 years ago

This was tested by booting up the usual gang of test guests:
- Windows
- Linux
- FreeBSD
- OpenBSD
- illumos

All continued to function as they did prior to the change.

Actions #4

Updated by Patrick Mooney almost 2 years ago

Following a conflict-resolution-requiring rebase, I made another lap through those tests, observing the same result.

Actions #5

Updated by Patrick Mooney almost 2 years ago

  • % Done changed from 0 to 90
Actions #6

Updated by Electric Monk almost 2 years ago

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

git commit 3e1c5f3a80260eb14c78730bcaca9e6c74f528a0

commit  3e1c5f3a80260eb14c78730bcaca9e6c74f528a0
Author: Patrick Mooney <pmooney@pfmooney.com>
Date:   2020-09-25T01:54:59.000Z

    13030 remove 'retu' pattern from bhyve
    13031 bhyve kernel should use proper struct types
    Reviewed by: Robert Mustacchi <rm@fingolfin.org>
    Reviewed by: Mike Zeller <mike.zeller@joyent.com>
    Reviewed by: Andy Fiddaman <andy@omniosce.org>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions #7

Updated by Patrick Mooney over 1 year ago

  • Related to Bug #13253: bhyve stumbles on APIC ICRLO added
Actions

Also available in: Atom PDF