Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\kvmclock.c Create Date:2022-07-28 08:45:13
Last Modify:2020-03-18 12:41:45 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:kvmclock_init_mem

Proto:static void __init kvmclock_init_mem(void)

Type:void

Parameter:Nothing

231  If HVC_BOOT_ARRAY_SIZE >= num_possible_cpus() Then Return
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  If Not p Then
239  pr_warn("%s: failed to alloc %d pages", __func__, (1U << order))
240  Return
243  hvclock_mem = page_address(p)
249  If sev_active() Then
250  r = set_memory_decrypted((unsignedlong)hvclock_mem, 1UL << order)
252  If r Then
253  __free_pages(p, order)
254  hvclock_mem = NULL
255  pr_warn("kvmclock: set_memory_decrypted() failed. Disabling\n")
256  Return
260  memset(hvclock_mem, 0, PAGE_SIZE << order)
Caller
NameDescribe
kvm_setup_vsyscall_timeinfo