aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/x86/kvm/svm.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index 290547537b4d..143818eff52e 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -2348,7 +2348,7 @@ static inline void sync_cr8_to_lapic(struct kvm_vcpu *vcpu)
2348 2348
2349 if (!(svm->vmcb->control.intercept_cr_write & INTERCEPT_CR8_MASK)) { 2349 if (!(svm->vmcb->control.intercept_cr_write & INTERCEPT_CR8_MASK)) {
2350 int cr8 = svm->vmcb->control.int_ctl & V_TPR_MASK; 2350 int cr8 = svm->vmcb->control.int_ctl & V_TPR_MASK;
2351 kvm_lapic_set_tpr(vcpu, cr8); 2351 kvm_set_cr8(vcpu, cr8);
2352 } 2352 }
2353} 2353}
2354 2354
@@ -2357,9 +2357,6 @@ static inline void sync_lapic_to_cr8(struct kvm_vcpu *vcpu)
2357 struct vcpu_svm *svm = to_svm(vcpu); 2357 struct vcpu_svm *svm = to_svm(vcpu);
2358 u64 cr8; 2358 u64 cr8;
2359 2359
2360 if (!irqchip_in_kernel(vcpu->kvm))
2361 return;
2362
2363 cr8 = kvm_get_cr8(vcpu); 2360 cr8 = kvm_get_cr8(vcpu);
2364 svm->vmcb->control.int_ctl &= ~V_TPR_MASK; 2361 svm->vmcb->control.int_ctl &= ~V_TPR_MASK;
2365 svm->vmcb->control.int_ctl |= cr8 & V_TPR_MASK; 2362 svm->vmcb->control.int_ctl |= cr8 & V_TPR_MASK;