Commit Graph

112 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 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 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 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 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 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 f7bffacef0 Implement Drop for AddrSpace. 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 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 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
4lDO2 e7d94ddff5 WIP: Lazy zeroed mapping and page fault handler. 2023-07-25 10:52:18 +02:00
4lDO2 8dfa73db35 Post-refactor fixes. 2023-07-25 10:52:18 +02:00
4lDO2 34b4512dbd Refactor Grants.
Page alignment is now verified at compile time, for example.
2023-07-25 10:52:13 +02:00
4lDO2 d4b5899c53 Remove allocator_owned hack. 2023-07-25 10:49:55 +02:00
bjorn3 7500ffaa5a Remove uses of the arbitrary_self_types feature 2023-07-10 17:03:36 +02:00
4lDO2 3ded84c945 Simplify x86_64 percpu and GSBASE calculation 2023-07-10 14:13:12 +00:00
4lDO2 56f88e80c2 Usercopy migration 2023-07-06 13:03:21 +00:00
Jeremy Soller 8e0f54cb31 Clippy fixes 2022-11-11 13:19:14 -07:00
Jeremy Soller 6753251af3 Do not allow mmap with page_count 0 2022-08-31 16:14:27 -06:00