Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\process.c Create Date:2022-07-28 07:48:46
Last Modify:2020-03-16 17:03:44 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:__switch_to_xtra

Proto:void __switch_to_xtra(struct task_struct *prev_p, struct task_struct *next_p)

Type:void

Parameter:

TypeParameterName
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( Per task flags (PF_*), defined further below: )
625  tifp = READ_ONCE( Per task flags (PF_*), defined further below: )
627  switch_to_bitmap(tifp)
629  propagate_user_return_notify(prev_p, next_p)
631  If ( tifp & _TIF_BLOCKSTEP || tifn & _TIF_BLOCKSTEP ) && arch_has_block_step() Then
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  If (tifp ^ tifn) & _TIF_NOTSC Then cr4_toggle_bits_irqsoff(X86_CR4_TSD)
645  If (tifp ^ tifn) & _TIF_NOCPUID Then set_cpuid_faulting(!!(tifn & _TIF_NOCPUID))
648  If Value is more likely to compile time(!((tifp | tifn) & _TIF_SPEC_FORCE_UPDATE)) Then
649  Update the MSRs managing speculation control, during context switch.
650  Else
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.