aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm
diff options
context:
space:
mode:
authorJoerg Roedel <joerg.roedel@amd.com>2010-12-03 05:45:59 -0500
committerAvi Kivity <avi@redhat.com>2011-01-12 04:30:37 -0500
commitb53ba3f9cc0b5ac21a86a95c702768f871b02610 (patch)
treee81261bc5549cba13238c9aca2f90a90e756cb4f /arch/x86/kvm
parent0574dec0d73ab87a21a8965467ac8caeedac7fed (diff)
KVM: SVM: Add clean-bit for LBR state
This patch implements the clean-bit for all LBR related state. This includes the debugctl, br_from, br_to, last_excp_from, and last_excp_to msrs. 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.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index d2ddad9ca630..58cabb550afd 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -197,6 +197,7 @@ enum {
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_CR2, /* CR2 only */
200 VMCB_LBR, /* DBGCTL, BR_FROM, BR_TO, LAST_EX_FROM, LAST_EX_TO */
200 VMCB_DIRTY_MAX, 201 VMCB_DIRTY_MAX,
201}; 202};
202 203
@@ -2847,6 +2848,7 @@ static int svm_set_msr(struct kvm_vcpu *vcpu, unsigned ecx, u64 data)
2847 return 1; 2848 return 1;
2848 2849
2849 svm->vmcb->save.dbgctl = data; 2850 svm->vmcb->save.dbgctl = data;
2851 mark_dirty(svm->vmcb, VMCB_LBR);
2850 if (data & (1ULL<<0)) 2852 if (data & (1ULL<<0))
2851 svm_enable_lbrv(svm); 2853 svm_enable_lbrv(svm);
2852 else 2854 else