函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\process.c Create Date:2022-07-27 08:48:47
Last Modify:2020-03-16 17:03:44 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:__switch_to_xtra

函数原型:void __switch_to_xtra(struct task_struct *prev_p, struct task_struct *next_p)

返回类型:void

参数:

类型参数名称
struct task_struct *prev_p
struct task_struct *next_p
621  prev等于* New fields for task_struct should be added above here, so that * they are included in the randomized portion of task_struct.
622  next等于* New fields for task_struct should be added above here, so that * they are included in the randomized portion of task_struct.
624  tifn等于READ_ONCE(任务标志)
625  tifp等于READ_ONCE(任务标志)
627  switch_to_bitmap(tifp)
629  propagate_user_return_notify(prev_p, next_p)
631  如果tifp按位与_TIF_BLOCKSTEPtifn按位与_TIF_BLOCKSTEP的值且arch_has_block_step()则
635  rdmsrl(MSR_IA32_DEBUGCTLMSR, debugctl)
636  debugctl与等于single-step on branches 的反
637  msk等于tifn按位与_TIF_BLOCKSTEP
638  debugctl或等于msk右移set when we want DEBUGCTLMSR_BTF 位左移DEBUGCTLMSR_BTF_SHIFT
639  wrmsrl(MSR_IA32_DEBUGCTLMSR, debugctl)
642  如果tifp按位异或tifn的值按位与_TIF_NOTSCcr4_toggle_bits_irqsoff(X86_CR4_TSD)
645  如果tifp按位异或tifn的值按位与_TIF_NOCPUIDset_cpuid_faulting(!!(tifn & _TIF_NOCPUID))
648  如果此条件成立可能性大(为编译器优化)(!((tifp | tifn) & _TIF_SPEC_FORCE_UPDATE))则
649  Update the MSRs managing speculation control, during context switch.
650  否则
651  speculation_ctrl_update_tif(prev_p)
652  tifn等于speculation_ctrl_update_tif(next_p)
655  Update the MSRs managing speculation control, during context switch.