Andrey Turkin
d2ebc7ff05
Wholesale fix of warnings
...
Pretty straightforward changes. This commit tries to avoid making any non-trivial fixes.
2024-09-04 10:55:01 +03:00
4lDO2
4158d899b5
Probably fix TLB shootdown "diagonal" livelock.
...
Diagonal as in
Thread A Thread B
Send to B Send to A
Wait for B Wait for A.
I haven't reproduced this bug, but this should fix it, since the wait
steps now checks the local percpu block for pending TLB shootdowns onto
itself.
2024-07-24 22:48:56 +02:00
4lDO2
49b94047a8
Fix significant memory leak.
2024-07-24 22:48:56 +02:00
4lDO2
80fe891c6e
WIP: Replace ContextId with direct Arcs.
2024-07-15 18:08:42 +02:00
4lDO2
d94baa2712
Run rustfmt.
2024-07-15 17:50:18 +02:00
4lDO2
5e7db80285
Fix a bunch of warnings.
2024-07-15 17:48:45 +02:00
4lDO2
9b68d4de80
Fix add_ref(Shared) refcounting bug.
2024-07-15 17:20:55 +02:00
4lDO2
295cc820e6
WIP: userspace signal handling
2024-07-15 17:20:55 +02:00
Andrey Turkin
9c639af217
Fix debug assertion bug
2024-07-12 23:15:33 +03:00
Jeremy Soller
81e6fc70d2
Enable use of MmapMode::Cow
2024-06-05 12:56:29 -06:00
4lDO2
161a92c9c2
Forbid strong fdtbl refs after setting context's.
...
This fixes a possible file table leak if a filetable contains an fd
referring (strongly) to the filetable itself. Now, it will automatically
be downgraded to a weak reference after it becomes a context's active
file table.
TODO: maybe support consuming a context's filetable to get a strong
reference back, provided it's exclusively owned.
2024-04-10 21:49:43 +02:00
4lDO2
b5523df187
Only support power-of-two frame allocations.
2024-03-24 14:40:15 +01:00
4lDO2
e6dc0e96f0
Fix aarch64.
2024-03-23 19:16:53 +01:00
4lDO2
7261dccb72
Fix i686.
2024-03-23 16:54:47 +01:00
4lDO2
d2dc3302a7
Remove RefCount::Zero.
...
Only the allocator is allowed to switch between 0 and 1. Refcounts above
1 are however controlled by the virtual memory system.
2024-03-22 13:31:22 +01:00
4lDO2
2ba9ff720c
Doubly-linked list.
2024-03-22 13:25:07 +01:00
4lDO2
d5b1ad2cd5
WIP: Improve allocation performance
2024-03-22 13:17:59 +01:00
4lDO2
776a140212
Fix rax being overwritten, and compile on i686.
2024-03-16 17:49:31 +01:00
4lDO2
239bd317e9
Fix signal ordering wrt syscall return.
2024-03-16 17:49:31 +01:00
bjorn3
b5f94a5a2e
Fix bug in the unmapping code
...
Previously trying to funmap an address after the start of the grant
would result in an overflow only caught when compiling the kernel with
debug assertions enabled.
2024-03-14 12:15:43 +01:00
4lDO2
b35c9d1e62
Properly free phys-contiguous grants, TLB-delayed.
2024-03-04 19:03:01 +01:00
4lDO2
4e392d05e4
Delay cow() dealloc until after TLB shootdown.
2024-03-04 19:03:01 +01:00
4lDO2
fa3e2a24d4
Optimize TLB flushing.
2024-03-04 19:03:01 +01:00
4lDO2
846d914a55
Improve synchronization.
2024-03-04 19:03:01 +01:00
4lDO2
1f8d7bc67c
Always check shootdown reqs when locking addrsp.
2024-03-04 19:03:01 +01:00
4lDO2
3a915c7fd5
Fix lock/guard mismatch, move r#move to wrapper.
2024-03-04 19:03:00 +01:00
4lDO2
098cdd6067
Fix flusher, currently only with -smp 1
2024-03-04 19:03:00 +01:00
4lDO2
79381249a2
Implement a TLB shootdown draft.
2024-03-04 19:03:00 +01:00
4lDO2
6bf90f9eee
Build the foundation for TLB shootdown.
2024-03-04 19:03:00 +01:00
4lDO2
156017a25d
Refactor: wrap RwLock<AddrSpace>.
2024-03-04 19:03:00 +01:00
4lDO2
749df4c869
Fail successfully with todo!
2024-03-04 19:03:00 +01:00
4lDO2
bb30530ea0
Track which CPUs are using any given AddrSpace.
2024-03-04 19:03:00 +01:00
Jeremy Soller
45f1c4e29e
Add rustfmt from relibc and apply it with cargo fmt
2024-01-17 13:52:01 -07:00
4lDO2
ee3aafa1d9
Remove PhysBorrowed hacks.
2023-12-15 15:14:40 +01:00
4lDO2
d4a120188f
Ensure PhysBorrowed iff !alloc-owned, vice versa.
...
This is allowed now that the old physalloc/physfree syscalls have been
removed.
2023-12-15 15:14:40 +01:00
4lDO2
a42e406569
Fix contiguous mmap.
2023-12-15 15:14:40 +01:00
4lDO2
77400f63ee
Add a memory: file for phys-contiguous mmaps.
2023-12-15 15:14:36 +01:00
bjorn3
2d065083df
Use HashMap instead of BTreeMap where possible
...
This shrinks the kernel from 905840 bytes to 862408 bytes.
2023-12-13 19:55:20 +01:00
4lDO2
88508a2cb7
Remove as_user_inner.
2023-12-13 11:08:12 +01:00
4lDO2
679c26c03b
s/Arc<dyn KernelScheme>/enum, but deref as dyn.
2023-12-13 11:08:07 +01:00
bjorn3
017702d3d2
Remove a lot of dead code
2023-12-12 15:01:29 +00:00
4lDO2
f025ece614
Replace from/into with get/new when necessary.
2023-09-06 08:38:10 +02:00
4lDO2
8f98d5b987
Extend mremap, eager mappings for real hardware.
2023-08-03 12:37:58 +02:00
4lDO2
c7714992f3
Fix clone_grant_using_fmap test.
2023-08-02 14:17:26 +02:00
4lDO2
2070fa44b7
Fix warnings.
2023-08-02 13:07:49 +02:00
4lDO2
05a9530ac7
Temporarily disable CoW fmaps.
2023-08-01 17:29:36 +02:00
4lDO2
fe88b23d09
Use a single cow zeroed page for RO maps + eager mapping.
2023-08-01 13:11:00 +02:00
4lDO2
ec9c24f841
WIP: aarch64
2023-07-27 19:05:33 +02:00
4lDO2
3cfec39b47
Pass MunmapFlags to scheme.
2023-07-25 10:52:24 +02:00
4lDO2
c9aa5ca851
WIP: Add SYS_MREMAP.
2023-07-25 10:52:24 +02:00