SVM event injection can race in bhyve
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.
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 Electric Monk almost 3 years ago
- Status changed from In Progress to Closed
- % Done changed from 0 to 100
commit c74a40a584c9d875009f725565896fd7e8ee38d6 Author: Patrick Mooney <firstname.lastname@example.org> 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 <email@example.com> Reviewed by: Toomas Soome <firstname.lastname@example.org> Approved by: Dan McDonald <email@example.com>