Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\espfix_64.c Create Date:2022-07-28 07:42:22
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:This returns the bottom address of the espfix stack for a specific CPU.* The math allows for a non-power-of-two ESPFIX_STACK_SIZE, in which case* we have to account for some amount of padding at the end of each page.

Proto:static inline unsigned long espfix_base_addr(unsigned int cpu)

Type:unsigned long

Parameter:

TypeParameterName
unsigned intcpu
80  page = cpu / ESPFIX_STACKS_PER_PAGE ^ page_random
81  slot = (cpu + slot_random) % ESPFIX_STACKS_PER_PAGE
82  addr = (page << PAGE_SHIFT determines the page size ) + slot * Note: we only need 6*8 = 48 bytes for the espfix stack, but round* it up to a cache line to avoid unnecessary sharing.
83  addr = addr & 0xffffUL | (addr & ~0xffffUL) << 16
84  addr += ESPFIX_BASE_ADDR
85  Return addr
Caller
NameDescribe
init_espfix_ap