]> Git Repo - linux.git/commit
context_tracking: avoid irq_save/irq_restore on guest entry and exit
authorPaolo Bonzini <[email protected]>
Wed, 28 Oct 2015 01:39:56 +0000 (02:39 +0100)
committerPaolo Bonzini <[email protected]>
Tue, 10 Nov 2015 11:06:23 +0000 (12:06 +0100)
commitd0e536d89395ecd8ab78fe999dc4d6f5d140ce46
treebac5690350e345061db0206bbbe91dbeeb6ebdad
parentf70cd6b07e629f367bb9b1ac9d0e3e669eb325c0
context_tracking: avoid irq_save/irq_restore on guest entry and exit

guest_enter and guest_exit must be called with interrupts disabled,
since they take the vtime_seqlock with write_seq{lock,unlock}.
Therefore, it is not necessary to check for exceptions, nor to
save/restore the IRQ state, when context tracking functions are
called by guest_enter and guest_exit.

Split the body of context_tracking_entry and context_tracking_exit
out to __-prefixed functions, and use them from KVM.

Rik van Riel has measured this to speed up a tight vmentry/vmexit
loop by about 2%.

Cc: Andy Lutomirski <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Paul McKenney <[email protected]>
Reviewed-by: Rik van Riel <[email protected]>
Tested-by: Rik van Riel <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
include/linux/context_tracking.h
kernel/context_tracking.c
This page took 0.052539 seconds and 4 git commands to generate.