]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: x86: Fix DR7 mask on task-switch while debugging
authorNadav Amit <namit@cs.technion.ac.il>
Sun, 19 Apr 2015 18:12:59 +0000 (21:12 +0300)
committerPaolo Bonzini <pbonzini@redhat.com>
Tue, 19 May 2015 18:52:35 +0000 (20:52 +0200)
commite1219db8c76d003ee50e7fdaa719f80465d23b91
tree6fb6a64518cb5a652ee538c8c2c231a5bc540c1a
parentc9dd17a2a9fa8e41c7757668dc837c5abbdb4a6c
KVM: x86: Fix DR7 mask on task-switch while debugging

If the host sets hardware breakpoints to debug the guest, and a task-switch
occurs in the guest, the architectural DR7 will not be updated. The effective
DR7 would be updated instead.

This fix puts the DR7 update during task-switch emulation, so it now uses the
standard DR setting mechanism instead of the one that was previously used. As a
bonus, the update of DR7 will now be effective for AMD as well.

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