+ if (!pa) {
+ goto oom;
+ }
+
+ *pte = *pte | pa | PG_PRESENT;
+ goto resolved;
+ }
+
+ // if mfile is set, then it is a mem map
+ if (hit_region->mfile) {
+ struct v_file* file = hit_region->mfile;
+ u32_t offset =
+ (ptr - hit_region->start) & (PG_SIZE - 1) + hit_region->offset;
+ uintptr_t pa = pmm_alloc_page(__current->pid, 0);
+
+ if (!pa) {
+ goto oom;
+ }
+
+ cpu_invplg(pte);