diff --git a/arch/x86/hyperv/hv_init.c b/arch/x86/hyperv/hv_init.c index bd4b6951b148..38c31e164694 100644 --- a/arch/x86/hyperv/hv_init.c +++ b/arch/x86/hyperv/hv_init.c @@ -200,6 +200,9 @@ void set_hv_tscchange_cb(void (*cb)(void)) return; } + if (!hv_vp_index) + return; + hv_reenlightenment_cb = cb; /* Make sure callback is registered before we write to MSRs */