]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm64: Improve debug register save/restore flow
authorChristoffer Dall <christoffer.dall@linaro.org>
Tue, 10 Oct 2017 18:10:08 +0000 (20:10 +0200)
committerMarc Zyngier <marc.zyngier@arm.com>
Mon, 19 Mar 2018 10:53:12 +0000 (10:53 +0000)
commitfacf2b0d1ad16ca5e5fcea97a1a12c6ab6e0d5c2
tree37d86f75b42641e09c81914d56322ed880d04274
parentb6f0dd66dad0b69ecfd6e60a9131499b45ddcbd2
KVM: arm64: Improve debug register save/restore flow

Instead of having multiple calls from the world switch path to the debug
logic, each figuring out if the dirty bit is set and if we should
save/restore the debug registers, let's just provide two hooks to the
debug save/restore functionality, one for switching to the guest
context, and one for switching to the host context, and we get the
benefit of only having to evaluate the dirty flag once on each path,
plus we give the compiler some more room to inline some of this
functionality.

Reviewed-by: Marc Zyngier <marc.zyngier@arm.com>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
arch/arm64/include/asm/kvm_hyp.h
arch/arm64/kvm/hyp/debug-sr.c
arch/arm64/kvm/hyp/switch.c