OS-7054: bhyve should halt on triple fault

Details

Issue Type:Bug
Priority:4 - Normal
Status:Resolved
Created at:2018-06-26T20:34:57.595Z
Updated at:2018-07-12T19:46:06.244Z

People

Created by:Patrick Mooney [X]
Reported by:Patrick Mooney [X]
Assigned to:Patrick Mooney [X]

Resolution

Fixed: A fix for this issue is checked into the tree and tested.
(Resolution Date: 2018-07-12T19:46:06.229Z)

Fix Versions

2018-07-19 Wall Market (Release Date: 2018-07-19)

Related Links

Labels

bhyve

Description

While investigating interrupt and exception injection logic in bhyve for OS-7012, I came across this gem left over from the initial import:

        /*
         * If an exception occurs while attempting to call the double-fault
         * handler the processor enters shutdown mode (aka triple fault).
         */
        type1 = info1 & VM_INTINFO_TYPE;
        vector1 = info1 & 0xff;
        if (type1 == VM_INTINFO_HWEXCEPTION && vector1 == IDT_DF) {
                VCPU_CTR2(vm, vcpuid, "triple fault: info1(%#lx), info2(%#lx)",
                    info1, info2);
#ifdef  __FreeBSD__
                vm_suspend(vm, VM_SUSPEND_TRIPLEFAULT);
#endif
                *retinfo = 0;
                return (0);
        }

There's no clear reason why we would want the VM to continue under the conditions of a triple fault, rather than spinning forever in an impossible situation.

Comments

Comment by Jira Bot
Created at 2018-07-12T19:42:53.582Z

illumos-joyent commit a14a61c954e512b21fc1be4a408e945f7f15df17 (branch master, by Patrick Mooney)

OS-7054 bhyve should halt on triple fault
Reviewed by: Mike Gerdts <mike.gerdts@joyent.com>
Reviewed by: Hans Rosenfeld <hans.rosenfeld@joyent.com>
Approved by: Hans Rosenfeld <hans.rosenfeld@joyent.com>