Skip to content
Commit f6769581 authored by Shih-Wei Li's avatar Shih-Wei Li Committed by Christoffer Dall
Browse files

KVM: arm/arm64: vgic: Avoid flushing vgic state when there's no pending IRQ



We do not need to flush vgic states in each world switch unless
there is pending IRQ queued to the vgic's ap list. We can thus reduce
the overhead by not grabbing the spinlock and not making the extra
function call to vgic_flush_lr_state.

Note: list_empty is a single atomic read (uses READ_ONCE) and can
therefore check if a list is empty or not without the need to take the
spinlock protecting the list.

Reviewed-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
Signed-off-by: default avatarShih-Wei Li <shihwei@cs.columbia.edu>
Signed-off-by: default avatarChristoffer Dall <cdall@linaro.org>
parent 328e5664
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment