diff options
author | Nadav Amit <namit@cs.technion.ac.il> | 2015-04-19 20:12:59 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2015-05-19 20:52:35 +0200 |
commit | 3db176d5b4170284d9ce1e1e9c441ebfa9a37417 (patch) | |
tree | 6fb6a64518cb5a652ee538c8c2c231a5bc540c1a /arch/x86/kvm/vmx.c | |
parent | Merge tag 'kvm-s390-next-20150508' of git://git.kernel.org/pub/scm/linux/kern... (diff) | |
download | linux-3db176d5b4170284d9ce1e1e9c441ebfa9a37417.tar.xz linux-3db176d5b4170284d9ce1e1e9c441ebfa9a37417.zip |
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>
Diffstat (limited to '')
-rw-r--r-- | arch/x86/kvm/vmx.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 5e8d41bccc26..bcb61b024386 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -5708,9 +5708,6 @@ static int handle_task_switch(struct kvm_vcpu *vcpu) return 0; } - /* clear all local breakpoint enable flags */ - vmcs_writel(GUEST_DR7, vmcs_readl(GUEST_DR7) & ~0x155); - /* * TODO: What about debug traps on tss switch? * Are we supposed to inject them and update dr6? |