aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/svm.c
diff options
context:
space:
mode:
authorJoerg Roedel <joerg.roedel@amd.com>2011-04-04 06:39:29 -0400
committerAvi Kivity <avi@redhat.com>2011-05-11 07:57:01 -0400
commit3b88e41a41344846ee28007ebfe1bb0defa7f86a (patch)
tree9c08334297bd05def6d3dffb1b947dd9b26b1ac5 /arch/x86/kvm/svm.c
parentcfec82cb7d313ae5b2c2dbb974401d7c214c7b09 (diff)
KVM: SVM: Add intercept check for accessing dr registers
This patch adds the intercept checks for instruction accessing the debug registers. 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.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index ff4ed3619d00..381b038c0d01 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -3882,6 +3882,8 @@ static struct __x86_intercept {
3882 [x86_intercept_clts] = POST_EX(SVM_EXIT_WRITE_CR0), 3882 [x86_intercept_clts] = POST_EX(SVM_EXIT_WRITE_CR0),
3883 [x86_intercept_lmsw] = POST_EX(SVM_EXIT_WRITE_CR0), 3883 [x86_intercept_lmsw] = POST_EX(SVM_EXIT_WRITE_CR0),
3884 [x86_intercept_smsw] = POST_EX(SVM_EXIT_READ_CR0), 3884 [x86_intercept_smsw] = POST_EX(SVM_EXIT_READ_CR0),
3885 [x86_intercept_dr_read] = POST_EX(SVM_EXIT_READ_DR0),
3886 [x86_intercept_dr_write] = POST_EX(SVM_EXIT_WRITE_DR0),
3885}; 3887};
3886 3888
3887#undef POST_EX 3889#undef POST_EX
@@ -3939,6 +3941,10 @@ static int svm_check_intercept(struct kvm_vcpu *vcpu,
3939 3941
3940 break; 3942 break;
3941 } 3943 }
3944 case SVM_EXIT_READ_DR0:
3945 case SVM_EXIT_WRITE_DR0:
3946 icpt_info.exit_code += info->modrm_reg;
3947 break;
3942 default: 3948 default:
3943 break; 3949 break;
3944 } 3950 }