aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/svm.h
diff options
context:
space:
mode:
authorRoedel, Joerg <Joerg.Roedel@amd.com>2010-12-03 04:50:51 -0500
committerAvi Kivity <avi@redhat.com>2011-01-12 04:30:10 -0500
commit4ee546b434504a618eac40421e595c68e494da9f (patch)
treece278bb56d8b9d3f7f3fa42ed10a3a1ecf8ce5a7 /arch/x86/include/asm/svm.h
parent384c636843971c8ebbffd1cc8881e3184cbd23e2 (diff)
KVM: SVM: Add manipulation functions for CRx intercepts
This patch wraps changes to the CRx 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.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/arch/x86/include/asm/svm.h b/arch/x86/include/asm/svm.h
index 0e831059ac5a..39f9ddf07136 100644
--- a/arch/x86/include/asm/svm.h
+++ b/arch/x86/include/asm/svm.h
@@ -51,8 +51,7 @@ enum {
51 51
52 52
53struct __attribute__ ((__packed__)) vmcb_control_area { 53struct __attribute__ ((__packed__)) vmcb_control_area {
54 u16 intercept_cr_read; 54 u32 intercept_cr;
55 u16 intercept_cr_write;
56 u16 intercept_dr_read; 55 u16 intercept_dr_read;
57 u16 intercept_dr_write; 56 u16 intercept_dr_write;
58 u32 intercept_exceptions; 57 u32 intercept_exceptions;
@@ -204,10 +203,14 @@ struct __attribute__ ((__packed__)) vmcb {
204#define SVM_SELECTOR_READ_MASK SVM_SELECTOR_WRITE_MASK 203#define SVM_SELECTOR_READ_MASK SVM_SELECTOR_WRITE_MASK
205#define SVM_SELECTOR_CODE_MASK (1 << 3) 204#define SVM_SELECTOR_CODE_MASK (1 << 3)
206 205
207#define INTERCEPT_CR0_MASK 1 206#define INTERCEPT_CR0_READ 0
208#define INTERCEPT_CR3_MASK (1 << 3) 207#define INTERCEPT_CR3_READ 3
209#define INTERCEPT_CR4_MASK (1 << 4) 208#define INTERCEPT_CR4_READ 4
210#define INTERCEPT_CR8_MASK (1 << 8) 209#define INTERCEPT_CR8_READ 8
210#define INTERCEPT_CR0_WRITE (16 + 0)
211#define INTERCEPT_CR3_WRITE (16 + 3)
212#define INTERCEPT_CR4_WRITE (16 + 4)
213#define INTERCEPT_CR8_WRITE (16 + 8)
211 214
212#define INTERCEPT_DR0_MASK 1 215#define INTERCEPT_DR0_MASK 1
213#define INTERCEPT_DR1_MASK (1 << 1) 216#define INTERCEPT_DR1_MASK (1 << 1)