Project

General

Profile

Actions

Bug #14010

closed

bhyve should handle SMI exit on AMD

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

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

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

A bhyve user on SmartOS reported issues with guests randomly crashing. The output collected from the bhyve process sheds some light on the issue:

vm exit[0]
        reason          SVM
        rip             0x00000000fffeed5e
        inst_length     0
        exitcode        0x62
        exitinfo1       0x1
        exitinfo2       0

That SVM exitcode corresponds to VMEXIT_SMI - physical SMI (the EXITINFO1 field provides more information)
Looking at the relevant parts in 15.13.3, we can conclude that bit0 in exitinfo1 indicates the SMI was asserted externally. Apparently bhyve lacks appropriate handling for this, which is causing the "fatal" EXITCODE_SVM result. Since the host CPU will deal with the SMI once outside guest context, little is required of us, other than not emitting an error when this occurs.

Actions #1

Updated by Patrick Mooney 4 months ago

Looking through the VMCB exitcodes, the INIT intercept should also get the same no-op treatment as NMI/SMI.

Actions #2

Updated by Patrick Mooney 3 months ago

I do not have access to a system which was suffering from this pathology. I booted updated bits to verify that they didn't unexpectedly regress normal behavior. The typical battery of guests booted and ran fine.

Actions #3

Updated by Electric Monk 3 months ago

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

git commit 8269d05caf6d455524ef86e197343d756db5e90e

commit  8269d05caf6d455524ef86e197343d756db5e90e
Author: Patrick Mooney <pmooney@pfmooney.com>
Date:   2021-09-10T18:51:31.000Z

    14010 bhyve should handle SMI exit on AMD
    Reviewed by: Toomas Soome <tsoome@me.com>
    Reviewed by: Robert Mustacchi <rm@fingolfin.org>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF