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

Commit 9926c9fd authored by Jan Kiszka's avatar Jan Kiszka Committed by Paolo Bonzini
Browse files

KVM: x86: Sync DR7 on KVM_SET_DEBUGREGS



Whenever we change arch.dr7, we also have to call kvm_update_dr7. In
case guest debugging is off, this will synchronize the new state into
hardware.

Signed-off-by: default avatarJan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent e984097b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2976,6 +2976,7 @@ static int kvm_vcpu_ioctl_x86_set_debugregs(struct kvm_vcpu *vcpu,
	memcpy(vcpu->arch.db, dbgregs->db, sizeof(vcpu->arch.db));
	vcpu->arch.dr6 = dbgregs->dr6;
	vcpu->arch.dr7 = dbgregs->dr7;
	kvm_update_dr7(vcpu);

	return 0;
}