Bug #13029
closedAMD bhyve should reload TSS ASAP
100%
Description
Unlike VMX, SVM does not restore the TSS when making a round trip to guest context. This means that the TSS must be reloaded "manually" by the OS after vmload/vmrun/vmsave. Although bhyve keeps the GIF cleared while the TSS contains incorrect state, preventing interrupts (including NMI) from triggering it, dtrace probes on any functions called before the TSS is restored will run afoul of the bogus state and likely reboot the machine. This can be seen on an unpatched machine by tracing svm_launch:return
, which causes an immediate crash when a VM is running. Like %gsbase
, the TSS could be restored before returning from svm_launch()
, avoiding those unfortunate crashes.
Updated by Patrick Mooney over 3 years ago
With the proposed patch applied, I'm able to dtrace svm_launch:return
without the machine immediately rebooting. Test VMs run normally, as expected.
Updated by Electric Monk over 3 years ago
- Status changed from In Progress to Closed
- % Done changed from 0 to 100
git commit 4d3fdeb14779bb6b0838521971d9ac99d65b0572
commit 4d3fdeb14779bb6b0838521971d9ac99d65b0572 Author: Patrick Mooney <pmooney@pfmooney.com> Date: 2020-08-14T18:17:41.000Z 13029 AMD bhyve should reload TSS ASAP Reviewed by: John Levon <john.levon@joyent.com> Approved by: Dan McDonald <danmcd@joyent.com>