Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7305eb5d authored by Nadav Amit's avatar Nadav Amit Committed by Paolo Bonzini
Browse files

KVM: x86: Clear DR6[0:3] on #DB during handle_dr



DR6[0:3] (previous breakpoint indications) are cleared when #DB is injected
during handle_exception, just as real hardware does.  Similarily, handle_dr
should clear DR6[0:3].

Signed-off-by: default avatarNadav Amit <namit@cs.technion.ac.il>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 6d2a0526
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -5125,6 +5125,7 @@ static int handle_dr(struct kvm_vcpu *vcpu)
			vcpu->run->exit_reason = KVM_EXIT_DEBUG;
			return 0;
		} else {
			vcpu->arch.dr6 &= ~15;
			vcpu->arch.dr6 |= DR6_BD | DR6_RTM;
			kvm_queue_exception(vcpu, DB_VECTOR);
			return 1;