Bug #13133
closedSVM event injection can race in bhyve
0%
Description
Very similar to what is described in #13132, the event injection logic for bhyve on AMD's SVM suffers from a race where notifications for new vCPU events may be missed prior to VM entry, thanks to interrupts being enabled while event injection occurs. Again, adaptive mutexes used by virtual device logic prevents the existing event injection code from running under the host-CPU-interrupts-disabled region. A difference on bhyve for AMD is that the GIF (global interrupt flag) is used instead of merely clearing IF
in rflags
. With the GIF cleared, even host SMI and NMI events are held queued, so sleeping with the host CPU in such a state would be a true recipe for disaster. Like described in #13132, the event injection should be broken up so that the portions requiring host interrupts remain enabled have a corresponding (lockless) re-check after interrupts are disabled. This will allow any events which arrived in the mean time to be processed in a timely fashion.
Related issues
Updated by Patrick Mooney over 1 year ago
- Related to Bug #13132: VMX event injection can race in bhyve added
Updated by Patrick Mooney over 1 year ago
- Has duplicate Bug #13259: SVM event injection can race in bhyve added
Updated by Patrick Mooney over 1 year ago
- Status changed from In Progress to Duplicate