Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 186021
b: refs/heads/master
c: f248341
h: refs/heads/master
i:
  186019: 703398c
v: v3
  • Loading branch information
Jan Kiszka authored and Marcelo Tosatti committed Mar 1, 2010
1 parent 3d9d78b commit 1522156
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b60d513c32e2ddc8b3e9e1465b94913d44d19810
refs/heads/master: f2483415293b180945da707e7dbe74e5daa72651
13 changes: 8 additions & 5 deletions trunk/arch/x86/kvm/vmx.c
Original file line number Diff line number Diff line change
Expand Up @@ -3045,6 +3045,7 @@ static int handle_dr(struct kvm_vcpu *vcpu)
unsigned long val;
int dr, reg;

/* Do not handle if the CPL > 0, will trigger GP on re-entry */
if (!kvm_require_cpl(vcpu, 0))
return 1;
dr = vmcs_readl(GUEST_DR7);
Expand Down Expand Up @@ -3099,20 +3100,22 @@ static int handle_dr(struct kvm_vcpu *vcpu)
vcpu->arch.eff_db[dr] = val;
break;
case 4 ... 5:
if (kvm_read_cr4_bits(vcpu, X86_CR4_DE))
if (kvm_read_cr4_bits(vcpu, X86_CR4_DE)) {
kvm_queue_exception(vcpu, UD_VECTOR);
return 1;
}
break;
case 6:
if (val & 0xffffffff00000000ULL) {
kvm_queue_exception(vcpu, GP_VECTOR);
break;
kvm_inject_gp(vcpu, 0);
return 1;
}
vcpu->arch.dr6 = (val & DR6_VOLATILE) | DR6_FIXED_1;
break;
case 7:
if (val & 0xffffffff00000000ULL) {
kvm_queue_exception(vcpu, GP_VECTOR);
break;
kvm_inject_gp(vcpu, 0);
return 1;
}
vcpu->arch.dr7 = (val & DR7_VOLATILE) | DR7_FIXED_1;
if (!(vcpu->guest_debug & KVM_GUESTDBG_USE_HW_BP)) {
Expand Down

0 comments on commit 1522156

Please sign in to comment.