aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/kvm/lapic.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/kvm/lapic.c')
-rw-r--r--drivers/kvm/lapic.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/kvm/lapic.c b/drivers/kvm/lapic.c
index 4b5c77d8900d..df636bf19798 100644
--- a/drivers/kvm/lapic.c
+++ b/drivers/kvm/lapic.c
@@ -931,3 +931,16 @@ int kvm_get_apic_interrupt(struct kvm_vcpu *vcpu)
931 apic_clear_irr(vector, apic); 931 apic_clear_irr(vector, apic);
932 return vector; 932 return vector;
933} 933}
934
935void kvm_apic_post_state_restore(struct kvm_vcpu *vcpu)
936{
937 struct kvm_lapic *apic = vcpu->apic;
938
939 apic->base_address = vcpu->apic_base &
940 MSR_IA32_APICBASE_BASE;
941 apic_set_reg(apic, APIC_LVR, APIC_VERSION);
942 apic_update_ppr(apic);
943 hrtimer_cancel(&apic->timer.dev);
944 update_divide_count(apic);
945 start_apic_timer(apic);
946}