diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c index f7737e1df6606f4a38dbd91c78880d6ab65c81ae..1aefaf2d8a370abf1a4ae8d2a48eefce84ed6bad 100644 --- a/arch/x86/kvm/hyperv.c +++ b/arch/x86/kvm/hyperv.c @@ -155,7 +155,7 @@ static struct kvm_vcpu_hv_synic *synic_get(struct kvm *kvm, u32 vpidx) struct kvm_vcpu_hv_synic *synic; vcpu = get_vcpu_by_vpidx(kvm, vpidx); - if (!vcpu) + if (!vcpu || !to_hv_vcpu(vcpu)) return NULL; synic = vcpu_to_synic(vcpu); return (synic->active) ? synic : NULL;