diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2010-12-03 11:45:58 +0100 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-01-12 11:30:36 +0200 |
commit | 0574dec0d73ab87a21a8965467ac8caeedac7fed (patch) | |
tree | 64abe71b4d50bb1370e9dc007e89f4bc5e9c3cd2 /arch/x86 | |
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')
-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 { VMCB_DR, /* DR6, DR7 */ VMCB_DT, /* GDT, IDT */ VMCB_SEG, /* CS, DS, SS, ES, CPL */ + VMCB_CR2, /* CR2 only */ VMCB_DIRTY_MAX, }; -/* TPR is always written before VMRUN */ -#define VMCB_ALWAYS_DIRTY_MASK (1U << VMCB_INTR) +/* TPR and CR2 are always written before VMRUN */ +#define VMCB_ALWAYS_DIRTY_MASK ((1U << VMCB_INTR) | (1U << VMCB_CR2)) static inline void mark_all_dirty(struct vmcb *vmcb) { |