Project

General

Profile

Bug #13030

remove 'retu' pattern from bhyve

Added by Patrick Mooney 8 months ago. Updated 7 months 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
#1

Updated by Patrick Mooney 8 months ago

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

Updated by Electric Monk 8 months ago

  • Gerrit CR set to 840
#3

Updated by Patrick Mooney 7 months 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.

#4

Updated by Patrick Mooney 7 months ago

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

#5

Updated by Patrick Mooney 7 months ago

  • % Done changed from 0 to 90
#6

Updated by Electric Monk 7 months 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>

#7

Updated by Patrick Mooney 6 months ago

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

Also available in: Atom PDF