While running workloads under bhyve on SmartOS, we found that under certain conditions, posted interrupts could fail to properly wake a vCPU from a HLTed state. Linux guests were seemingly unaffected, but illumos guests easily triggered the behavior. The initial analysis is detailed in OS-6829. That fix was later amended in OS-6930. Finally, after feedback from tychon about where the cached priority was being stored, the change for OS-7354 was put in place.
This diff represents the accumulation of all three efforts, distilled into one fix for the issue.