Project

General

Profile

Bug #13133

SVM event injection can race in bhyve

Added by Patrick Mooney 3 months ago. Updated 9 days ago.

Status:
Duplicate
Priority:
Normal
Category:
bhyve
Start date:
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
bhyve
Gerrit CR:

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

Related to illumos gate - Bug #13132: VMX event injection can race in bhyveClosedPatrick Mooney

Actions
Has duplicate illumos gate - Bug #13259: SVM event injection can race in bhyveClosedPatrick Mooney

Actions
#1

Updated by Patrick Mooney 3 months ago

  • Related to Bug #13132: VMX event injection can race in bhyve added
#2

Updated by Patrick Mooney 9 days ago

  • Has duplicate Bug #13259: SVM event injection can race in bhyve added
#3

Updated by Patrick Mooney 9 days ago

  • Status changed from In Progress to Duplicate

Also available in: Atom PDF