diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2010-12-03 05:45:49 -0500 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2011-01-12 04:30:24 -0500 |
commit | 116a0a23676e7d29b7747a53f819baaaf4b88575 (patch) | |
tree | 0c7216cf52b1a4287e937bb90f14b33c6b9491fc /arch/x86/kvm | |
parent | 8d28fec406e4d5ce6c109fe12699976e72e9748e (diff) |
KVM: SVM: Add clean-bit for intercetps, tsc-offset and pause filter count
This patch adds the clean-bit for intercepts-vectors, the
TSC offset and the pause-filter count to the appropriate
places. The IO and MSR permission bitmaps are not subject to
this bit.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm')
-rw-r--r-- | arch/x86/kvm/svm.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index e73cbc3c49f9..052561c34753 100644 --- a/arch/x86/kvm/svm.c +++ b/arch/x86/kvm/svm.c | |||
@@ -186,6 +186,8 @@ static int nested_svm_check_exception(struct vcpu_svm *svm, unsigned nr, | |||
186 | bool has_error_code, u32 error_code); | 186 | bool has_error_code, u32 error_code); |
187 | 187 | ||
188 | enum { | 188 | enum { |
189 | VMCB_INTERCEPTS, /* Intercept vectors, TSC offset, | ||
190 | pause filter count */ | ||
189 | VMCB_DIRTY_MAX, | 191 | VMCB_DIRTY_MAX, |
190 | }; | 192 | }; |
191 | 193 | ||
@@ -217,6 +219,8 @@ static void recalc_intercepts(struct vcpu_svm *svm) | |||
217 | struct vmcb_control_area *c, *h; | 219 | struct vmcb_control_area *c, *h; |
218 | struct nested_state *g; | 220 | struct nested_state *g; |
219 | 221 | ||
222 | mark_dirty(svm->vmcb, VMCB_INTERCEPTS); | ||
223 | |||
220 | if (!is_guest_mode(&svm->vcpu)) | 224 | if (!is_guest_mode(&svm->vcpu)) |
221 | return; | 225 | return; |
222 | 226 | ||
@@ -854,6 +858,8 @@ static void svm_write_tsc_offset(struct kvm_vcpu *vcpu, u64 offset) | |||
854 | } | 858 | } |
855 | 859 | ||
856 | svm->vmcb->control.tsc_offset = offset + g_tsc_offset; | 860 | svm->vmcb->control.tsc_offset = offset + g_tsc_offset; |
861 | |||
862 | mark_dirty(svm->vmcb, VMCB_INTERCEPTS); | ||
857 | } | 863 | } |
858 | 864 | ||
859 | static void svm_adjust_tsc_offset(struct kvm_vcpu *vcpu, s64 adjustment) | 865 | static void svm_adjust_tsc_offset(struct kvm_vcpu *vcpu, s64 adjustment) |
@@ -863,6 +869,7 @@ static void svm_adjust_tsc_offset(struct kvm_vcpu *vcpu, s64 adjustment) | |||
863 | svm->vmcb->control.tsc_offset += adjustment; | 869 | svm->vmcb->control.tsc_offset += adjustment; |
864 | if (is_guest_mode(vcpu)) | 870 | if (is_guest_mode(vcpu)) |
865 | svm->nested.hsave->control.tsc_offset += adjustment; | 871 | svm->nested.hsave->control.tsc_offset += adjustment; |
872 | mark_dirty(svm->vmcb, VMCB_INTERCEPTS); | ||
866 | } | 873 | } |
867 | 874 | ||
868 | static void init_vmcb(struct vcpu_svm *svm) | 875 | static void init_vmcb(struct vcpu_svm *svm) |