Message ID | 20090707121927.GF28046@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/hw/apic.c b/hw/apic.c index 778a853..3e79377 100644 --- a/hw/apic.c +++ b/hw/apic.c @@ -955,7 +955,8 @@ static void kvm_kernel_lapic_load_from_user(APICState *s) void qemu_kvm_load_lapic(CPUState *env) { #ifdef KVM_CAP_IRQCHIP - if (kvm_enabled() && kvm_vcpu_inited(env) && qemu_kvm_irqchip_in_kernel()) { + if (kvm_enabled() && kvm_vcpu_inited(env) && + qemu_kvm_irqchip_in_kernel() && env->apic_state) { kvm_kernel_lapic_load_from_user(env->apic_state); } #endif