Bug #13259
closedSVM event injection can race in bhyve
100%
Description
In upstream (FreeBSD) bhyve, SVM event injection is done with the global interrupt flag (GIF) disabled, effectively blocking all interrupts while that work is performed. Since illumos-bhyve uses adaptive mutexes for data structures, rather than spinlocks, that injection logic was moved outside the section where the GIF was cleared. This opens up the possibility of event injection interrupts being missed because they were delivered after the injection logic ran, but before interrupts were disabled (so the notification would be queued until SVM entry). Just like in #13132, this logic could be split up and refactored to eliminate the possibility of missed notifications.
Related issues
Updated by Patrick Mooney almost 3 years ago
- Related to Bug #13132: VMX event injection can race in bhyve added
Updated by Patrick Mooney almost 3 years ago
- Related to Bug #13007: bhyve vlapic should set TMR on intr accept added
Updated by Patrick Mooney almost 3 years ago
As noted in the description, instances of this race causing a problem have not been observed in the wild or during testing, for that matter. It was discovered while overhauling the event injection system for #13007. Testing to verify that injection still function as before is covered under that ticket.
Updated by Patrick Mooney almost 3 years ago
- Is duplicate of Bug #13133: SVM event injection can race in bhyve added
Updated by Electric Monk almost 3 years ago
- Status changed from In Progress to Closed
- % Done changed from 0 to 100
git commit c74a40a584c9d875009f725565896fd7e8ee38d6
commit c74a40a584c9d875009f725565896fd7e8ee38d6 Author: Patrick Mooney <pmooney@pfmooney.com> Date: 2020-11-24T20:30:25.000Z 13007 bhyve vlapic should set TMR on intr accept 13106 clarify PPR transitions in bhyve vLAPIC 13132 VMX event injection can race in bhyve 13259 SVM event injection can race in bhyve Reviewed by: Robert Mustacchi <rm@fingolfin.org> Reviewed by: Toomas Soome <tsoome@me.com> Approved by: Dan McDonald <danmcd@joyent.com>