1
0
mirror of https://github.com/taigrr/gopher-os synced 2026-03-23 04:42:25 -07:00
Files
gopher-os/kernel/mem/vmm/vmm.go
Achilleas Anagnostopoulos 32a10601ac Add support for copy-on-write to the page fault handler
Page faults occurring on RO pages with the CopyOnWrite flag set will be
handled by the page handler as follows:
- allocate new frame
- establish temporary mapping for new frame
- copy original page to new frame
- update entry for the page where the fault occurred:
  - set physical frame address to the allocated frame
  - clear CoW flag and set Present, RW flags
- return from the fault handler to resume execution at the instruction
  that caused the fault

Any other page faults will still cause a kernel panic
2017-06-22 07:44:55 +01:00

4.0 KiB