Message ID | 20181126205941.19021-3-ehabkost@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [PULL,1/2] kvm: Use KVM_GET_MSR_INDEX_LIST for MSR_IA32_ARCH_CAPABILITIES support | expand |
diff --git a/hw/hyperv/hyperv.c b/hw/hyperv/hyperv.c index a28e7249d8..8758635227 100644 --- a/hw/hyperv/hyperv.c +++ b/hw/hyperv/hyperv.c @@ -136,7 +136,11 @@ void hyperv_synic_add(CPUState *cs) void hyperv_synic_reset(CPUState *cs) { - device_reset(DEVICE(get_synic(cs))); + SynICState *synic = get_synic(cs); + + if (synic) { + device_reset(DEVICE(synic)); + } } static const TypeInfo synic_type_info = {