aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm64/kvm/hyp/debug-sr.c
diff options
context:
space:
mode:
authorChristoffer Dall <christoffer.dall@linaro.org>2017-10-10 19:31:33 +0200
committerMarc Zyngier <marc.zyngier@arm.com>2018-03-19 10:53:11 +0000
commit54ceb1bcf8d83e835be515d7d9e4129a73d80f4e (patch)
treea6de80182aa512c1c5d9c9176ff365093bb26d0a /arch/arm64/kvm/hyp/debug-sr.c
parentKVM: arm/arm64: Introduce vcpu_el1_is_32bit (diff)
downloadlinux-dev-54ceb1bcf8d83e835be515d7d9e4129a73d80f4e.tar.xz
linux-dev-54ceb1bcf8d83e835be515d7d9e4129a73d80f4e.zip
KVM: arm64: Move debug dirty flag calculation out of world switch
There is no need to figure out inside the world-switch if we should save/restore the debug registers or not, we might as well do that in the higher level debug setup code, making it easier to optimize down the line. Reviewed-by: Julien Thierry <julien.thierry@arm.com> 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>
Diffstat (limited to 'arch/arm64/kvm/hyp/debug-sr.c')
-rw-r--r--arch/arm64/kvm/hyp/debug-sr.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/arch/arm64/kvm/hyp/debug-sr.c b/arch/arm64/kvm/hyp/debug-sr.c
index dabb5cc7b087..d958cd63a547 100644
--- a/arch/arm64/kvm/hyp/debug-sr.c
+++ b/arch/arm64/kvm/hyp/debug-sr.c
@@ -166,12 +166,6 @@ void __hyp_text __debug_restore_state(struct kvm_vcpu *vcpu,
void __hyp_text __debug_cond_save_host_state(struct kvm_vcpu *vcpu)
{
- /* If any of KDE, MDE or KVM_ARM64_DEBUG_DIRTY is set, perform
- * a full save/restore cycle. */
- if ((vcpu->arch.ctxt.sys_regs[MDSCR_EL1] & DBG_MDSCR_KDE) ||
- (vcpu->arch.ctxt.sys_regs[MDSCR_EL1] & DBG_MDSCR_MDE))
- vcpu->arch.debug_flags |= KVM_ARM64_DEBUG_DIRTY;
-
__debug_save_state(vcpu, &vcpu->arch.host_debug_state.regs,
kern_hyp_va(vcpu->arch.host_cpu_context));
__debug_save_spe()(&vcpu->arch.host_debug_state.pmscr_el1);