Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\hmm.c Create Date:2022-07-28 16:36:48
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:hmm_vma_do_fault

Proto:static int hmm_vma_do_fault(struct mm_walk *walk, unsigned long addr, bool write_fault, uint64_t *pfn)

Type:int

Parameter:

TypeParameterName
struct mm_walk *walk
unsigned longaddr
boolwrite_fault
uint64_t *pfn
39  flags = aulting for non current tsk/mm
40  hmm_vma_walk = private
41  range = range
42  vma = vma
45  If Not vma Then Go to err
48  If flags & Retry fault if non-blocking, drop mmap_sem and return -EAGAIN in that case. Then flags |= Retry fault if blocking
50  If write_fault Then flags |= Fault was a write access
53  ret = By the time we get here, we already hold the mm semaphore* The mmap_sem may have been released depending on flags and our* return value. See filemap_fault() and __lock_page_or_retry().
54  If ret & VM_FAULT_RETRY Then
56  Return -EAGAIN
58  If ret & VM_FAULT_ERROR Then Go to err
61  Return -EBUSY
63  err :
64  pfn = values[ corresponding CPU page table entry points to poisoned memory]
65  Return -EFAULT
Caller
NameDescribe
hmm_vma_walk_hole_hmm_vma_walk_hole_() - handle a range lacking valid pmd or pte(s)*@addr: range virtual start address (inclusive)*@end: range virtual end address (exclusive)*@fault: should we fault or not ?*@write_fault: write fault ?*@walk: mm_walk structure* Return: 0