aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm
diff options
context:
space:
mode:
authorMikhail Ershov <arcezed@gmail.com>2009-08-03 07:58:25 -0400
committerAvi Kivity <avi@redhat.com>2009-09-10 01:33:17 -0400
commit5f0269f5d72f622514daec9af158c32e933800b6 (patch)
tree347c953fbb6dddee3c5d0e5bc8cc16992b0fa7b0 /arch/x86/kvm
parent7f582ab6d8116ce8db5792c219a278519deae6ad (diff)
KVM: Align cr8 threshold when userspace changes cr8
Commit f0a3602c20 ("KVM: Move interrupt injection logic to x86.c") does not update the cr8 intercept if the lapic is disabled, so when userspace updates cr8, the cr8 threshold control is not updated and we are left with illegal control fields. Fix by explicitly resetting the cr8 threshold. Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm')
-rw-r--r--arch/x86/kvm/x86.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index f4cb1baaa04b..69de7248083f 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -4445,6 +4445,8 @@ int kvm_arch_vcpu_ioctl_set_sregs(struct kvm_vcpu *vcpu,
4445 kvm_set_segment(vcpu, &sregs->tr, VCPU_SREG_TR); 4445 kvm_set_segment(vcpu, &sregs->tr, VCPU_SREG_TR);
4446 kvm_set_segment(vcpu, &sregs->ldt, VCPU_SREG_LDTR); 4446 kvm_set_segment(vcpu, &sregs->ldt, VCPU_SREG_LDTR);
4447 4447
4448 update_cr8_intercept(vcpu);
4449
4448 /* Older userspace won't unhalt the vcpu on reset. */ 4450 /* Older userspace won't unhalt the vcpu on reset. */
4449 if (kvm_vcpu_is_bsp(vcpu) && kvm_rip_read(vcpu) == 0xfff0 && 4451 if (kvm_vcpu_is_bsp(vcpu) && kvm_rip_read(vcpu) == 0xfff0 &&
4450 sregs->cs.selector == 0xf000 && sregs->cs.base == 0xffff0000 && 4452 sregs->cs.selector == 0xf000 && sregs->cs.base == 0xffff0000 &&