Function report | 
Source Code:mm\hmm.c | 
Create Date:2022-07-28 16:37:14 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:hmm_vma_handle_pte
Proto:static int hmm_vma_handle_pte(struct mm_walk *walk, unsigned long addr, unsigned long end, pmd_t *pmdp, pte_t *ptep, uint64_t *pfn)
Type:int
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct mm_walk * | walk | |
| unsigned long | addr | |
| unsigned long | end | |
| pmd_t * | pmdp | |
| pte_t * | ptep | |
| uint64_t * | pfn | 
| 268 | hmm_vma_walk = private | 
| 276 | fault = write_fault = false | 
| 279 | hmm_pte_need_fault(hmm_vma_walk, orig_pfn, 0, & fault, & write_fault) | 
| 281 | If fault || write_fault Then Go to fault | 
| 283 | Return 0 | 
| 286 | If Not pte_present(pte) Then | 
| 287 | entry = Convert the arch-dependent pte representation of a swp_entry_t into an* arch-independent swp_entry_t. | 
| 289 | If Not non_swap_entry(entry) Then | 
| 290 | cpu_flags = pte_to_hmm_pfn_flags(range, pte) | 
| 291 | hmm_pte_need_fault(hmm_vma_walk, orig_pfn, cpu_flags, & fault, & write_fault) | 
| 293 | If fault || write_fault Then Go to fault | 
| 295 | Return 0 | 
| 302 | If is_device_private_entry(entry) Then | 
| 303 | cpu_flags = flags[ pfn is valid. It has, at least, read permission.] | flags[ private device memory (ZONE_DEVICE)] | 
| 305 | cpu_flags |= If is_write_device_private_entry(entry) Then flags[ CPU page table has write permission set] Else 0 | 
| 307 | hmm_pte_need_fault(hmm_vma_walk, orig_pfn, cpu_flags, & fault, & write_fault) | 
| 309 | If fault || write_fault Then Go to fault | 
| 314 | Return 0 | 
| 317 | If is_migration_entry(entry) Then | 
| 318 | If fault || write_fault Then | 
| 324 | Return 0 | 
| 329 | Return -EFAULT | 
| 330 | Else | 
| 331 | cpu_flags = pte_to_hmm_pfn_flags(range, pte) | 
| 332 | hmm_pte_need_fault(hmm_vma_walk, orig_pfn, cpu_flags, & fault, & write_fault) | 
| 336 | If fault || write_fault Then Go to fault | 
| 339 | If pte_devmap(pte) Then | 
| 340 | pgmap = get_dev_pagemap(pte_pfn(pte), pgmap) | 
| 342 | If Value for the false possibility is greater at compile time(!pgmap) Then Return -EBUSY | 
| 345 | If Not is_zero_pfn(pte_pfn(pte)) Then | 
| 347 | Return -EFAULT | 
| 356 | Return 0 | 
| 358 | fault : | 
| 359 | If pgmap Then | 
| 360 | put_dev_pagemap(pgmap) | 
| 361 | pgmap = NULL | 
| Name | Describe | 
|---|---|
| hmm_vma_walk_pmd | 
| Source code conversion tool public plug-in interface  | X | 
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion  |