Skip to content

Commit

Permalink
KVM: vmx: DR7 masking on task switch emulation is wrong
Browse files Browse the repository at this point in the history
The DR7 masking which is done on task switch emulation should be in hex format
(clearing the local breakpoints enable bits 0,2,4 and 6).

Signed-off-by: Nadav Amit <namit@cs.technion.ac.il>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
  • Loading branch information
anadav authored and bonzini committed May 22, 2014
1 parent 65a7f03 commit 1f85411
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/kvm/vmx.c
Original file line number Diff line number Diff line change
Expand Up @@ -5401,7 +5401,7 @@ static int handle_task_switch(struct kvm_vcpu *vcpu)
}

/* clear all local breakpoint enable flags */
vmcs_writel(GUEST_DR7, vmcs_readl(GUEST_DR7) & ~55);
vmcs_writel(GUEST_DR7, vmcs_readl(GUEST_DR7) & ~0x55);

/*
* TODO: What about debug traps on tss switch?
Expand Down

0 comments on commit 1f85411

Please sign in to comment.