|
@@ -110,12 +110,19 @@ static int hv_cpu_init(unsigned int cpu)
|
|
|
*/
|
|
|
void hyperv_init(void)
|
|
|
{
|
|
|
- u64 guest_id;
|
|
|
+ u64 guest_id, required_msrs;
|
|
|
union hv_x64_msr_hypercall_contents hypercall_msr;
|
|
|
|
|
|
if (x86_hyper_type != X86_HYPER_MS_HYPERV)
|
|
|
return;
|
|
|
|
|
|
+ /* Absolutely required MSRs */
|
|
|
+ required_msrs = HV_X64_MSR_HYPERCALL_AVAILABLE |
|
|
|
+ HV_X64_MSR_VP_INDEX_AVAILABLE;
|
|
|
+
|
|
|
+ if ((ms_hyperv.features & required_msrs) != required_msrs)
|
|
|
+ return;
|
|
|
+
|
|
|
/* Allocate percpu VP index */
|
|
|
hv_vp_index = kmalloc_array(num_possible_cpus(), sizeof(*hv_vp_index),
|
|
|
GFP_KERNEL);
|