Implement VM #63

Merged
td1223 merged 94 commits from vm/merged/themis into master 2024-12-06 05:07:14 +00:00
10 changed files with 190 additions and 62 deletions
Showing only changes of commit 05a48cf9c6 - Show all commits

View File

@@ -148,17 +148,18 @@ page_fault (struct intr_frame *f)
if (user && not_present) if (user && not_present)
{ {
if (try_alloc_new_page (fault_addr, f->esp)) if (try_alloc_new_page (fault_addr, f->esp))
return; return;
} }
else else
{ {
if (try_alloc_new_page (fault_addr, thread_current ()->curr_esp)) if (try_alloc_new_page (fault_addr, thread_current ()->curr_esp))
return; return;
f->eip = (void *)f->eax;
f->eip = (void *)f->eax;
f->eax = 0xffffffff; f->eax = 0xffffffff;
return; return;
} }
/* To implement virtual memory, delete the rest of the function /* To implement virtual memory, delete the rest of the function
body, and replace it with code that brings in the page to body, and replace it with code that brings in the page to