From: Glauber Costa <glom...@redhat.com> Our PIT implementation calls qemu_kvm_pit_in_kernel without checking for kvm_enabled() as does everybody else. It will make it dereference kvm_context pointer wich will be NULL.
Signed-off-by: Glauber Costa <glom...@redhat.com> Signed-off-by: Marcelo Tosatti <mtosa...@redhat.com> diff --git a/hw/i8254.c b/hw/i8254.c index fd0bdfe..34a716c 100644 --- a/hw/i8254.c +++ b/hw/i8254.c @@ -478,7 +478,7 @@ void hpet_disable_pit(void) { PITChannelState *s = &pit_state.channels[0]; - if (qemu_kvm_pit_in_kernel()) { + if (kvm_enabled() && qemu_kvm_pit_in_kernel()) { if (qemu_kvm_has_pit_state2()) { kvm_hpet_disable_kpit(); } else { @@ -502,7 +502,7 @@ void hpet_enable_pit(void) PITState *pit = &pit_state; PITChannelState *s = &pit->channels[0]; - if (qemu_kvm_pit_in_kernel()) { + if (kvm_enabled() && qemu_kvm_pit_in_kernel()) { if (qemu_kvm_has_pit_state2()) { kvm_hpet_enable_kpit(); } else { -- To unsubscribe from this list: send the line "unsubscribe kvm-commits" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html