]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: DR7.GD should be cleared upon any #DB exception
authorNadav Amit <namit@cs.technion.ac.il>
Tue, 30 Sep 2014 17:49:14 +0000 (20:49 +0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 3 Nov 2014 11:07:23 +0000 (12:07 +0100)
commit9d9fd64303ffde865b61bbd5048cf0de1f2f477a
tree4c3935eecde52126dd7fad88d3e4a5d3171fbcb1
parent353aad2c9ec2e5bf713ed4734166f3a4d5f0acb1
KVM: x86: DR7.GD should be cleared upon any #DB exception

Intel SDM 17.2.4 (Debug Control Register (DR7)) says: "The processor clears the
GD flag upon entering to the debug exception handler." This sentence may be
misunderstood as if it happens only on #DB due to debug-register protection,
but it happens regardless to the cause of the #DB.

Fix the behavior to match both real hardware and Bochs.

Signed-off-by: Nadav Amit <namit@cs.technion.ac.il>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/x86/kvm/vmx.c
arch/x86/kvm/x86.c