mshyperv.c (aaccf3c97418f169afdbb5855e9cbcbda34e90fd) | mshyperv.c (3a025de64bf89c84a79909069e3c24ad9e710d27) |
---|---|
1/* 2 * HyperV Detection code. 3 * 4 * Copyright (C) 2010, Novell, Inc. 5 * Author : K. Y. Srinivasan <ksrinivasan@novell.com> 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by --- 185 unchanged lines hidden (view full) --- 194{ 195 unsigned long freq; 196 197 rdmsrl(HV_X64_MSR_TSC_FREQUENCY, freq); 198 199 return freq / 1000; 200} 201 | 1/* 2 * HyperV Detection code. 3 * 4 * Copyright (C) 2010, Novell, Inc. 5 * Author : K. Y. Srinivasan <ksrinivasan@novell.com> 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by --- 185 unchanged lines hidden (view full) --- 194{ 195 unsigned long freq; 196 197 rdmsrl(HV_X64_MSR_TSC_FREQUENCY, freq); 198 199 return freq / 1000; 200} 201 |
202#if defined(CONFIG_SMP) && IS_ENABLED(CONFIG_HYPERV) 203static void __init hv_smp_prepare_boot_cpu(void) 204{ 205 native_smp_prepare_boot_cpu(); 206#if defined(CONFIG_X86_64) && defined(CONFIG_PARAVIRT_SPINLOCKS) 207 hv_init_spinlocks(); 208#endif 209} 210#endif 211 |
|
202static void __init ms_hyperv_init_platform(void) 203{ 204 int hv_host_info_eax; 205 int hv_host_info_ebx; 206 int hv_host_info_ecx; 207 int hv_host_info_edx; 208 209 /* --- 88 unchanged lines hidden (view full) --- 298 if (ms_hyperv.features & HV_X64_ACCESS_REENLIGHTENMENT) 299 alloc_intr_gate(HYPERV_REENLIGHTENMENT_VECTOR, 300 hyperv_reenlightenment_vector); 301 302 /* Setup the IDT for stimer0 */ 303 if (ms_hyperv.misc_features & HV_STIMER_DIRECT_MODE_AVAILABLE) 304 alloc_intr_gate(HYPERV_STIMER0_VECTOR, 305 hv_stimer0_callback_vector); | 212static void __init ms_hyperv_init_platform(void) 213{ 214 int hv_host_info_eax; 215 int hv_host_info_ebx; 216 int hv_host_info_ecx; 217 int hv_host_info_edx; 218 219 /* --- 88 unchanged lines hidden (view full) --- 308 if (ms_hyperv.features & HV_X64_ACCESS_REENLIGHTENMENT) 309 alloc_intr_gate(HYPERV_REENLIGHTENMENT_VECTOR, 310 hyperv_reenlightenment_vector); 311 312 /* Setup the IDT for stimer0 */ 313 if (ms_hyperv.misc_features & HV_STIMER_DIRECT_MODE_AVAILABLE) 314 alloc_intr_gate(HYPERV_STIMER0_VECTOR, 315 hv_stimer0_callback_vector); |
316 317# ifdef CONFIG_SMP 318 smp_ops.smp_prepare_boot_cpu = hv_smp_prepare_boot_cpu; 319# endif |
|
306#endif 307} 308 309const __initconst struct hypervisor_x86 x86_hyper_ms_hyperv = { 310 .name = "Microsoft Hyper-V", 311 .detect = ms_hyperv_platform, 312 .type = X86_HYPER_MS_HYPERV, 313 .init.init_platform = ms_hyperv_init_platform, 314}; | 320#endif 321} 322 323const __initconst struct hypervisor_x86 x86_hyper_ms_hyperv = { 324 .name = "Microsoft Hyper-V", 325 .detect = ms_hyperv_platform, 326 .type = X86_HYPER_MS_HYPERV, 327 .init.init_platform = ms_hyperv_init_platform, 328}; |