函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\cpu\mshyperv.c Create Date:2022-07-27 09:15:28
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:ms_hyperv_init_platform

函数原型:static void __init ms_hyperv_init_platform(void)

返回类型:void

参数:

226  features等于CPUID functions returning a single datum
227  misc_features等于cpuid_edx(HYPERV_CPUID_FEATURES)
228  hints等于CPUID functions returning a single datum
230  打印信息("Hyper-V: features 0x%x, hints 0x%x\n", features, hints)
233  max_vp_index等于CPUID functions returning a single datum
234  max_lp_index等于cpuid_ebx(HYPERV_CPUID_IMPLEMENT_LIMITS)
236  pr_debug("Hyper-V: max %u virtual processors, %u logical processors\n", max_vp_index, max_lp_index)
242  如果CPUID functions returning a single datum大于等于HYPERV_CPUID_VERSION
244  hv_host_info_eax等于CPUID functions returning a single datum
245  hv_host_info_ebx等于cpuid_ebx(HYPERV_CPUID_VERSION)
246  hv_host_info_ecx等于cpuid_ecx(HYPERV_CPUID_VERSION)
247  hv_host_info_edx等于cpuid_edx(HYPERV_CPUID_VERSION)
249  打印信息("Hyper-V Host Build:%d-%d.%d-%d-%d.%d\n", hv_host_info_eax, hv_host_info_ebx >> 16, hv_host_info_ebx & 0xFFFF, hv_host_info_ecx, hv_host_info_edx >> 24, hv_host_info_edx & 0xFFFFFF)
255  如果features按位与There is a single feature flag that signifies if the partition has access* to MSRs with local APIC and TSC frequencies.misc_features按位与Frequency MSRs available
257  calibrate_tsc等于hv_get_tsc_khz
258  calibrate_cpu等于hv_get_tsc_khz
261  如果hints按位与Recommend using enlightened VMCS
262  nested_features等于CPUID functions returning a single datum
290  shutdown等于hv_machine_shutdown
291  crash_shutdown等于hv_machine_crash_shutdown
293  如果features按位与AccessTscInvariantControls privilege
294  wrmsrl(TSC invariant control , 0x1)
295  setup_force_cpu_cap(TSC is known to be reliable )
296  否则
297  mark_tsc_unstable("running on Hyper-V")
304  如果测试是否启用get_nmi_reason等于hv_get_nmi_reason
315  i8253_clear_counter_on_shutdown = false
321  apic_post_init等于hyperv_init
322  hyperv_setup_mmu_ops()
324  alloc_intr_gate(Vector on which hypervisor callbacks will be delivered , hyperv_callback_vector)
327  如果features按位与AccessReenlightenmentControls privilege alloc_intr_gate(HYPERV_REENLIGHTENMENT_VECTOR, hyperv_reenlightenment_vector)
332  如果misc_features按位与stimer Direct Mode is available alloc_intr_gate(HYPERV_STIMER0_VECTOR, hv_stimer0_callback_vector)
352  hv_init_clocksource()