* pmap_is_prefaultable: * * Return whether or not the specified virtual address is eligible * for prefault. */
| 8287 | * for prefault. |
| 8288 | */ |
| 8289 | boolean_t |
| 8290 | pmap_is_prefaultable(pmap_t pmap, vm_offset_t addr) |
| 8291 | { |
| 8292 | pd_entry_t *pde; |
| 8293 | pt_entry_t *pte, PG_V; |
| 8294 | boolean_t rv; |
| 8295 | |
| 8296 | PG_V = pmap_valid_bit(pmap); |
| 8297 | rv = FALSE; |
| 8298 | PMAP_LOCK(pmap); |
| 8299 | pde = pmap_pde(pmap, addr); |
| 8300 | if (pde != NULL && (*pde & (PG_PS | PG_V)) == PG_V) { |
| 8301 | pte = pmap_pde_to_pte(pde, addr); |
| 8302 | rv = (*pte & PG_V) == 0; |
| 8303 | } |
| 8304 | PMAP_UNLOCK(pmap); |
| 8305 | return (rv); |
| 8306 | } |
| 8307 | |
| 8308 | /* |
| 8309 | * pmap_is_referenced: |
nothing calls this directly
no test coverage detected