函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\kvmclock.c Create Date:2022-07-27 09:44:21
Last Modify:2020-03-18 12:41:45 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:kvmclock_init_mem

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

返回类型:void

参数:

231  如果HVC_BOOT_ARRAY_SIZE大于等于num_possible_cpus()则返回
234  ncpus等于num_possible_cpus()减HVC_BOOT_ARRAY_SIZE
235  order等于get_order - Determine the allocation order of a memory size*@size: The size for which to get the order* Determine the allocation order of a particular sized block of memory
237  p等于alloc_pages(GFP_KERNEL, order)
238  如果非p
239  打印警告信息("%s: failed to alloc %d pages", __func__, (1U << order))
240  返回
243  hvclock_mem等于page_address(p)
249  如果sev_active()则
250  r等于set_memory_decrypted((unsignedlong)hvclock_mem, 1UL << order)
252  如果r
253  __free_pages(p, order)
254  hvclock_mem = NULL
255  打印警告信息("kvmclock: set_memory_decrypted() failed. Disabling\n")
256  返回
260  memset(hvclock_mem, 0, PAGE_SIZE << order)
调用者
名称描述
kvm_setup_vsyscall_timeinfo