aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/svm.c
diff options
context:
space:
mode:
authorJoerg Roedel <joerg.roedel@amd.com>2010-12-03 05:45:55 -0500
committerAvi Kivity <avi@redhat.com>2011-01-12 04:30:31 -0500
commit72214b9601f2b6c8343ea57b0e405f9da7a92d29 (patch)
tree594cdb8c8e1186d11babd9cfc75c17034f7e771f /arch/x86/kvm/svm.c
parentdcca1a6506123cd47af334b7ee2a4b0288196389 (diff)
KVM: SVM: Add clean-bit for DR6 and DR7
This patch implements the clean-bit for the dr6 and dr7 debug registers in the vmcb. Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/svm.c')
-rw-r--r--arch/x86/kvm/svm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index 0f55b8a69540..e9224ca090a1 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -193,6 +193,7 @@ enum {
193 VMCB_INTR, /* int_ctl, int_vector */ 193 VMCB_INTR, /* int_ctl, int_vector */
194 VMCB_NPT, /* npt_en, nCR3, gPAT */ 194 VMCB_NPT, /* npt_en, nCR3, gPAT */
195 VMCB_CR, /* CR0, CR3, CR4, EFER */ 195 VMCB_CR, /* CR0, CR3, CR4, EFER */
196 VMCB_DR, /* DR6, DR7 */
196 VMCB_DIRTY_MAX, 197 VMCB_DIRTY_MAX,
197}; 198};
198 199
@@ -1484,6 +1485,8 @@ static void svm_guest_debug(struct kvm_vcpu *vcpu, struct kvm_guest_debug *dbg)
1484 else 1485 else
1485 svm->vmcb->save.dr7 = vcpu->arch.dr7; 1486 svm->vmcb->save.dr7 = vcpu->arch.dr7;
1486 1487
1488 mark_dirty(svm->vmcb, VMCB_DR);
1489
1487 update_db_intercept(vcpu); 1490 update_db_intercept(vcpu);
1488} 1491}
1489 1492
@@ -1506,6 +1509,7 @@ static void svm_set_dr7(struct kvm_vcpu *vcpu, unsigned long value)
1506 struct vcpu_svm *svm = to_svm(vcpu); 1509 struct vcpu_svm *svm = to_svm(vcpu);
1507 1510
1508 svm->vmcb->save.dr7 = value; 1511 svm->vmcb->save.dr7 = value;
1512 mark_dirty(svm->vmcb, VMCB_DR);
1509} 1513}
1510 1514
1511static int pf_interception(struct vcpu_svm *svm) 1515static int pf_interception(struct vcpu_svm *svm)