diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2010-12-03 05:45:58 -0500 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-01-12 04:30:36 -0500 |
commit | 0574dec0d73ab87a21a8965467ac8caeedac7fed (patch) | |
tree | 64abe71b4d50bb1370e9dc007e89f4bc5e9c3cd2 /arch/x86/kvm/svm.c | |
parent | 060d0c9a2ee2b1d2cf10afc11d8a0b2d97d8f3e3 (diff) |
KVM: SVM: Add clean-bit for CR2 register
This patch implements the clean-bit for the cr2 register 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.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 4db7157c5dea..d2ddad9ca630 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c | |||
@@ -196,11 +196,12 @@ enum { | |||
196 | VMCB_DR, /* DR6, DR7 */ | 196 | VMCB_DR, /* DR6, DR7 */ |
197 | VMCB_DT, /* GDT, IDT */ | 197 | VMCB_DT, /* GDT, IDT */ |
198 | VMCB_SEG, /* CS, DS, SS, ES, CPL */ | 198 | VMCB_SEG, /* CS, DS, SS, ES, CPL */ |
199 | VMCB_CR2, /* CR2 only */ | ||
199 | VMCB_DIRTY_MAX, | 200 | VMCB_DIRTY_MAX, |
200 | }; | 201 | }; |
201 | 202 | ||
202 | /* TPR is always written before VMRUN */ | 203 | /* TPR and CR2 are always written before VMRUN */ |
203 | #define VMCB_ALWAYS_DIRTY_MASK (1U << VMCB_INTR) | 204 | #define VMCB_ALWAYS_DIRTY_MASK ((1U << VMCB_INTR) | (1U << VMCB_CR2)) |
204 | 205 | ||
205 | static inline void mark_all_dirty(struct vmcb *vmcb) | 206 | static inline void mark_all_dirty(struct vmcb *vmcb) |
206 | { | 207 | { |