Implement VM #63

Merged
td1223 merged 94 commits from vm/merged/themis into master 2024-12-06 05:07:14 +00:00
9 changed files with 201 additions and 61 deletions
Showing only changes of commit 6190d1bee6 - Show all commits

View File

@@ -1,7 +1,7 @@
# -*- makefile -*-
kernel.bin: DEFINES = -DUSERPROG -DFILESYS
KERNEL_SUBDIRS = threads devices lib lib/kernel userprog filesys vm
KERNEL_SUBDIRS = threads devices lib lib/kernel userprog filesys
TEST_SUBDIRS = tests/userprog tests/userprog/no-vm tests/filesys/base
GRADING_FILE = $(SRCDIR)/tests/userprog/Grading
SIMULATOR = --qemu

View File

@@ -146,6 +146,7 @@ page_fault (struct intr_frame *f)
write = (f->error_code & PF_W) != 0;
user = (f->error_code & PF_U) != 0;
#ifdef VM
if (user && not_present)
{
if (handle_stack_fault (fault_addr, f->esp))
@@ -160,6 +161,7 @@ page_fault (struct intr_frame *f)
f->eax = 0xffffffff;
return;
}
#endif
/* To implement virtual memory, delete the rest of the function
body, and replace it with code that brings in the page to