D13573 broke bhyve if INVARIANTS is enabled with passthrough. This fixes the lock recursion without making the vcpu lock recursive.
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Skipped - Unit
Tests Skipped - Build Status
Buildable 15059
Event Timeline
Comment Actions
Only minor issue I had was the trailing underscores in the inline routine name: wasn't too sure if that was idiomatic FreeBSD. Maybe "_int" ?
Comment Actions
If you capture VMCS_GUEST_INTR_STATUS in the EXIT_REASON_HLT case of vmx_exit_process() then you can use that value in vmx_pending_intr() without having to use a vmx_getreg(). That circumvents the locking issue, removes the need for the special case #ifdef INVARIANTS/#endif code and may even improve the latency by skipping an iteration of VMPTRLD() and VMCLEAR().
Comment Actions
@kmacy tyvm works brilliantly here - I'll close the PR in bugzilla when this lands. Many many thanks!
Comment Actions
The changes I proposed in the comments here, and reviewed in D14548, have been committed.