Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 93907
b: refs/heads/master
c: d7bf822
h: refs/heads/master
i:
  93905: 97980cf
  93903: f1a74ba
v: v3
  • Loading branch information
Joerg Roedel authored and Avi Kivity committed Apr 27, 2008
1 parent 9d231ae commit d063bf1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ec7cf6903ffced20098e2bcc27a184172836dfb9
refs/heads/master: d7bf8221a3037d0d0760a1ccf1833bda03213abf
12 changes: 12 additions & 0 deletions trunk/arch/x86/kvm/svm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1620,6 +1620,16 @@ static void svm_prepare_guest_switch(struct kvm_vcpu *vcpu)
{
}

static inline void sync_cr8_to_lapic(struct kvm_vcpu *vcpu)
{
struct vcpu_svm *svm = to_svm(vcpu);

if (!(svm->vmcb->control.intercept_cr_write & INTERCEPT_CR8_MASK)) {
int cr8 = svm->vmcb->control.int_ctl & V_TPR_MASK;
kvm_lapic_set_tpr(vcpu, cr8);
}
}

static inline void sync_lapic_to_cr8(struct kvm_vcpu *vcpu)
{
struct vcpu_svm *svm = to_svm(vcpu);
Expand Down Expand Up @@ -1791,6 +1801,8 @@ static void svm_vcpu_run(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)

stgi();

sync_cr8_to_lapic(vcpu);

svm->next_rip = 0;
}

Expand Down

0 comments on commit d063bf1

Please sign in to comment.