diff options
author | Gleb Natapov <gleb@redhat.com> | 2009-08-09 15:17:40 +0300 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2009-09-10 10:46:39 +0300 |
commit | cb142eb743d02d48165c9d941b601d731cc4a003 (patch) | |
tree | bcd4e946ffe7d8a19586928ae792ea6553ce70a9 /arch/x86/kvm | |
parent | 4b6e4dca7011613c8508640c10a091b3ed2cd215 (diff) | |
download | linux-cb142eb743d02d48165c9d941b601d731cc4a003.tar.gz linux-cb142eb743d02d48165c9d941b601d731cc4a003.tar.bz2 linux-cb142eb743d02d48165c9d941b601d731cc4a003.zip |
KVM: Update cr8 intercept when APIC TPR is changed by userspace
Since on vcpu entry we do it only if apic is enabled we should do
it when TPR is changed while apic is disabled. This happens when windows
resets HW without setting TPR to zero.
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm')
-rw-r--r-- | arch/x86/kvm/x86.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 132c5100d4f4..31bf98427f4e 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -77,6 +77,7 @@ static u64 __read_mostly efer_reserved_bits = 0xfffffffffffffffeULL; #define VM_STAT(x) offsetof(struct kvm, stat.x), KVM_STAT_VM #define VCPU_STAT(x) offsetof(struct kvm_vcpu, stat.x), KVM_STAT_VCPU +static void update_cr8_intercept(struct kvm_vcpu *vcpu); static int kvm_dev_ioctl_get_supported_cpuid(struct kvm_cpuid2 *cpuid, struct kvm_cpuid_entry2 __user *entries); @@ -1629,6 +1630,7 @@ static int kvm_vcpu_ioctl_set_lapic(struct kvm_vcpu *vcpu, vcpu_load(vcpu); memcpy(vcpu->arch.apic->regs, s->regs, sizeof *s); kvm_apic_post_state_restore(vcpu); + update_cr8_intercept(vcpu); vcpu_put(vcpu); return 0; |