diff options
author | Dr. David Alan Gilbert <dgilbert@redhat.com> | 2016-09-12 18:18:35 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2016-09-13 19:09:44 +0200 |
commit | 78d6a05d2f69cbfa6e95f0a4a24a2c934969913b (patch) | |
tree | 72e2b11bf5889ddd86178c79c27dc57c48a2161a /target-i386 | |
parent | 0342454f8aa6fc55e515bad26425533e10b58085 (diff) |
x86/lapic: Load LAPIC state at post_load
Load the LAPIC state during post_load (rather than when the CPU
starts).
This allows an interrupt to be delivered from the ioapic to
the lapic prior to cpu loading, in particular the RTC that starts
ticking as soon as we load it's state.
Fixes a case where Windows hangs after migration due to RTC interrupts
disappearing.
Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'target-i386')
-rw-r--r-- | target-i386/kvm.c | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/target-i386/kvm.c b/target-i386/kvm.c index d1a25c5465..f1ad805665 100644 --- a/target-i386/kvm.c +++ b/target-i386/kvm.c @@ -2416,19 +2416,6 @@ static int kvm_get_apic(X86CPU *cpu) return 0; } -static int kvm_put_apic(X86CPU *cpu) -{ - DeviceState *apic = cpu->apic_state; - struct kvm_lapic_state kapic; - - if (apic && kvm_irqchip_in_kernel()) { - kvm_put_apic_state(apic, &kapic); - - return kvm_vcpu_ioctl(CPU(cpu), KVM_SET_LAPIC, &kapic); - } - return 0; -} - static int kvm_put_vcpu_events(X86CPU *cpu, int level) { CPUState *cs = CPU(cpu); @@ -2670,10 +2657,6 @@ int kvm_arch_put_registers(CPUState *cpu, int level) if (ret < 0) { return ret; } - ret = kvm_put_apic(x86_cpu); - if (ret < 0) { - return ret; - } } ret = kvm_put_tscdeadline_msr(x86_cpu); |