diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2010-11-30 12:03:58 -0500 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-01-12 04:30:11 -0500 |
commit | 3aed041a4c1b78cac87db76cf264b081df64dd37 (patch) | |
tree | dfaa91c967b0ccf261bae663069fc5dabc5bdccb /arch/x86/include/asm/svm.h | |
parent | 4ee546b434504a618eac40421e595c68e494da9f (diff) |
KVM: SVM: Add manipulation functions for DRx intercepts
This patch wraps changes to the DRx intercepts of SVM into
seperate functions to abstract nested-svm better and prepare
the implementation of the vmcb-clean-bits feature.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch/x86/include/asm/svm.h')
-rw-r--r-- | arch/x86/include/asm/svm.h | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/arch/x86/include/asm/svm.h b/arch/x86/include/asm/svm.h index 39f9ddf07136..11dbca7a582a 100644 --- a/arch/x86/include/asm/svm.h +++ b/arch/x86/include/asm/svm.h | |||
@@ -52,8 +52,7 @@ enum { | |||
52 | 52 | ||
53 | struct __attribute__ ((__packed__)) vmcb_control_area { | 53 | struct __attribute__ ((__packed__)) vmcb_control_area { |
54 | u32 intercept_cr; | 54 | u32 intercept_cr; |
55 | u16 intercept_dr_read; | 55 | u32 intercept_dr; |
56 | u16 intercept_dr_write; | ||
57 | u32 intercept_exceptions; | 56 | u32 intercept_exceptions; |
58 | u64 intercept; | 57 | u64 intercept; |
59 | u8 reserved_1[42]; | 58 | u8 reserved_1[42]; |
@@ -212,14 +211,22 @@ struct __attribute__ ((__packed__)) vmcb { | |||
212 | #define INTERCEPT_CR4_WRITE (16 + 4) | 211 | #define INTERCEPT_CR4_WRITE (16 + 4) |
213 | #define INTERCEPT_CR8_WRITE (16 + 8) | 212 | #define INTERCEPT_CR8_WRITE (16 + 8) |
214 | 213 | ||
215 | #define INTERCEPT_DR0_MASK 1 | 214 | #define INTERCEPT_DR0_READ 0 |
216 | #define INTERCEPT_DR1_MASK (1 << 1) | 215 | #define INTERCEPT_DR1_READ 1 |
217 | #define INTERCEPT_DR2_MASK (1 << 2) | 216 | #define INTERCEPT_DR2_READ 2 |
218 | #define INTERCEPT_DR3_MASK (1 << 3) | 217 | #define INTERCEPT_DR3_READ 3 |
219 | #define INTERCEPT_DR4_MASK (1 << 4) | 218 | #define INTERCEPT_DR4_READ 4 |
220 | #define INTERCEPT_DR5_MASK (1 << 5) | 219 | #define INTERCEPT_DR5_READ 5 |
221 | #define INTERCEPT_DR6_MASK (1 << 6) | 220 | #define INTERCEPT_DR6_READ 6 |
222 | #define INTERCEPT_DR7_MASK (1 << 7) | 221 | #define INTERCEPT_DR7_READ 7 |
222 | #define INTERCEPT_DR0_WRITE (16 + 0) | ||
223 | #define INTERCEPT_DR1_WRITE (16 + 1) | ||
224 | #define INTERCEPT_DR2_WRITE (16 + 2) | ||
225 | #define INTERCEPT_DR3_WRITE (16 + 3) | ||
226 | #define INTERCEPT_DR4_WRITE (16 + 4) | ||
227 | #define INTERCEPT_DR5_WRITE (16 + 5) | ||
228 | #define INTERCEPT_DR6_WRITE (16 + 6) | ||
229 | #define INTERCEPT_DR7_WRITE (16 + 7) | ||
223 | 230 | ||
224 | #define SVM_EVTINJ_VEC_MASK 0xff | 231 | #define SVM_EVTINJ_VEC_MASK 0xff |
225 | 232 | ||