Commit Graph

1551 Commits

Author SHA1 Message Date
4lDO2 113cb5ed4e Ensure pages cannot be both CoW and shared. 2023-07-25 10:52:23 +02:00
4lDO2 d3ecedefd9 Notify schemes when mmaps are unmapped. 2023-07-25 10:52:23 +02:00
4lDO2 02f04752e8 Use proper locks for PageInfo. 2023-07-25 10:52:23 +02:00
4lDO2 7bdf5e9af3 Pass unaligned length to scheme for fmap. 2023-07-25 10:52:23 +02:00
4lDO2 afa3d7dc7b Support anonymous MAP_SHARED mmaps. 2023-07-25 10:52:23 +02:00
4lDO2 70b4d99c96 Implement MAP_FIXED without MAP_FIXED_NOREPLACE. 2023-07-25 10:52:23 +02:00
4lDO2 f0341280f7 Fix frame deallocation. 2023-07-25 10:52:23 +02:00
4lDO2 3a80528d13 Fix MAP_LAZY mappings. 2023-07-25 10:52:23 +02:00
4lDO2 cbec83215a Lazy-evaluate pages returned by fmap. 2023-07-25 10:52:22 +02:00
4lDO2 9182722f84 WIP: Allow listing address space grants again. 2023-07-25 10:52:22 +02:00
4lDO2 0466e87e59 Error if scheme fmap returns unaligned address. 2023-07-25 10:52:22 +02:00
4lDO2 ba62c0606e Pin PhysBorrowed head/tail UserScheme grants too. 2023-07-25 10:52:22 +02:00
4lDO2 329d60848c WIP: Support CoW fmap. 2023-07-25 10:52:22 +02:00
4lDO2 b24cf821c2 Support transferring grants again. 2023-07-25 10:52:22 +02:00
4lDO2 55f1829e77 Call funmap if applicable. 2023-07-25 10:52:22 +02:00
4lDO2 4ec8712fb0 Adjust fmap offsets in Grant::extract. 2023-07-25 10:52:22 +02:00
4lDO2 c5eb44d968 Increase refcount for borrowed fmap too. 2023-07-25 10:52:22 +02:00
4lDO2 b3a6a6744a Pin grants that are used in UserScheme. 2023-07-25 10:52:22 +02:00
4lDO2 954a8d00fe Make page fault handler recursive.
This is probably a bad idea, but it works for now, and can only cause
problems, if grants that borrow grants that borrow grants etc., are
used.
2023-07-25 10:52:21 +02:00
4lDO2 da6f6a316c Return only one grant, External, for Grant::borrow. 2023-07-25 10:52:21 +02:00
4lDO2 b5430359d8 Forbid scheme calls with non-RAM physmapped memory. 2023-07-25 10:52:21 +02:00
4lDO2 43c433a3f0 Remove FmapCtxt. 2023-07-25 10:52:21 +02:00
4lDO2 bf6ad5c41a Disable debugging again. 2023-07-25 10:52:21 +02:00
4lDO2 8553bc7a59 WIP: Support userspace-backed borrowing mmaps. 2023-07-25 10:52:21 +02:00
4lDO2 024f3e3828 Fix deadlock, booting to shell works now. 2023-07-25 10:52:21 +02:00
4lDO2 ad78dcc5a1 WIP: Rudimentary MAP_SHARED fmap implementation. 2023-07-25 10:52:21 +02:00
4lDO2 afa61601c4 Add ContextStatus::HardBlocked. 2023-07-25 10:52:21 +02:00
4lDO2 23fede5db0 Remove scheme funmap methods. 2023-07-25 10:52:20 +02:00
4lDO2 0c365f54e6 WIP: FmapBorrowed. 2023-07-25 10:52:20 +02:00
4lDO2 20c3adf38d WIP: Start rewriting fmap impl. 2023-07-25 10:52:20 +02:00
4lDO2 99975c0e42 WIP: Ensure that Grant::borrow does not borrow nonpresent grants. 2023-07-25 10:52:20 +02:00
4lDO2 dffc8ec9fc Do not expect PageInfo for PhysMap grants. 2023-07-25 10:52:20 +02:00
4lDO2 20a84decdf Fix MemoryScheme fmap. 2023-07-25 10:52:20 +02:00
4lDO2 15ce84164b Reminder that borrow does handle "lack of grant". 2023-07-25 10:52:20 +02:00
4lDO2 50e2f51ab3 Remove outdated #[must_use]. 2023-07-25 10:52:20 +02:00
4lDO2 f7bffacef0 Implement Drop for AddrSpace. 2023-07-25 10:52:20 +02:00
4lDO2 829d2276fb Remove Context::vfork.
Since clone is no longer exists as a syscall, it makes little sense to
manage vfork in the kernel. Implementing vfork in userspace would still
be possible.
2023-07-25 10:52:20 +02:00
4lDO2 e34a3cee42 Fix mmap/munmap, invert borrowed/owned refcount. 2023-07-25 10:52:19 +02:00
4lDO2 45ec3ecc70 Track Allocated and CoW External the same way. 2023-07-25 10:52:19 +02:00
4lDO2 7aca53753e Call init_mm from correct function. 2023-07-25 10:52:19 +02:00
4lDO2 a599d9b389 WIP: Store PageInfo in separate data structure. 2023-07-25 10:52:19 +02:00
4lDO2 760fc2ba5a WIP: Global page info structs. 2023-07-25 10:52:19 +02:00
4lDO2 593e21d95e Support schemes. 2023-07-25 10:52:19 +02:00
4lDO2 f53a1ffd53 Remove proc:pid/memory. 2023-07-25 10:52:19 +02:00
4lDO2 0a5b6ce656 Reach proc:memory access in userspace. 2023-07-25 10:52:19 +02:00
4lDO2 11fdb3bb46 Copy on writes to CoW pages. 2023-07-25 10:52:19 +02:00
4lDO2 565db7694f Add cow_refcount. 2023-07-25 10:52:19 +02:00
4lDO2 276f051d19 Further userspace progress, fix RMM bug. 2023-07-25 10:52:18 +02:00
4lDO2 8cfbc39b9f Get further in userspace. 2023-07-25 10:52:18 +02:00
4lDO2 490e1b2777 WIP: Track grant ownership. 2023-07-25 10:52:18 +02:00