KVM: VMX: Clean up IRQ/NMI handling
Status from this message: Queued, thanks.
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest2 patches 13 repliesApplied
- v11 of 2 patches 9 repliesSuperseded
Patches in v2 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | KVM: VMX: Move IRQ invocation to assembly subroutinearch/ arch/ | +37 | 2 replies | |
| 2/2 | KVM: VMX: Invoke NMI handler via indirect call instead of INTnarch/ | +15 | 10 replies |
Reviews trailers per patch
1 of 2 patches has a Reviewed-by or Acked-by.
| Patch | Josh Poimboeuf | Uros Bizjak |
|---|---|---|
| 1/2 | A-b | A-b |
| 2/2 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v2 0/2] KVM: VMX: Clean up IRQ/NMI handling
Clean up KVM's handling of IRQ and NMI exits to move the invocation of the IRQ handler to a standalone assembly routine, and to then consolidate the NMI handling to use the same indirect call approach instead of using INTn.
The IRQ cleanup was suggested by Josh Poimboeuf in the context of a false postive objtool warning[*]. I believe Josh intended to use UNWIND hints instead of trickery to avoid objtool complaints. I opted for trickery in the form of a redundant, but explicit, restoration of RSP after the hidden IRET. AFAICT, there are no existing UNWIND hints that would let objtool know that the stack is magically being restored, and adding a new hint to save a single MOV <reg>, <reg> instruction seemed like overkill.
The NMI consolidation was loosely suggested by Andi Kleen. Andi's actual suggestion was to export and directly call the NMI handler, but that's a more involved change (unless I'm misunderstanding the wants of the NMI handler), whereas piggybacking the IRQ code is simple and seems like a worthwhile intermediate step.
Sean Christopherson (2):
KVM: VMX: Move IRQ invocation to assembly subroutine
KVM: VMX: Invoke NMI handler via indirect call instead of INTn
arch/x86/kvm/vmx/vmenter.S | 34 +++++++++++++++++++++ arch/x86/kvm/vmx/vmx.c | 61 +++++++++++--------------------------- 2 files changed, 51 insertions(+), 44 deletions(-)
Signature · 1 line
2.28.0