Bug 267023 - bhyve subtly broken on VT-x without exit-on-hlt
Summary: bhyve subtly broken on VT-x without exit-on-hlt
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: bhyve (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-virtualization (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-13 16:54 UTC by John Baldwin
Modified: 2022-10-17 13:33 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Baldwin freebsd_committer freebsd_triage 2022-10-13 16:54:24 UTC
The VMCS contains a field that is set to 1 to indicate that there is a pending HLT.  In this state, vmxrun will still HLT on resume even if, e.g., the RIP has been updated to point to a different instruction.  VMMs are required to explicitly clear this field after a VMexit due to a HLT if the processor should resume.

See also: https://www.illumos.org/issues/15079
Comment 1 John Baldwin freebsd_committer freebsd_triage 2022-10-13 16:56:26 UTC
I got the sense backwards in my description.  VM exits due to HLT are fine, it's when the vCPU exits for some other reason while HLTed that the field in the VMCS is set and needs to be reset before resuming.