Commit Graph

230 Commits

Author SHA1 Message Date
YanWQ-monad ccc4e6ec6b Move whole kernel ELF to VMA 2024-05-15 21:31:09 +08:00
Ruihan Li dbc234ada6 Rename `cx_ptr` to `ctx_ptr` 2024-05-14 10:00:59 +08:00
Ruihan Li 47fe10f17b Avoid poorly chosen variable names 2024-05-14 10:00:59 +08:00
Ruihan Li a215cb54d9 Use `UnsafeCell` to store `UserContext` 2024-05-14 10:00:59 +08:00
Ruihan Li 83c2aba0b0 Use `SpinLock` to protect `PROCESSOR` 2024-05-13 19:39:50 +08:00
LI Qing 81cca42205 Refine `WaitQueue` with fast path to return early 2024-05-11 11:11:12 +08:00
Zhang Junyang 035e12a4bd Identify the page table free-reuse-then-read problem and feature gate it 2024-05-10 19:07:05 +08:00
Zhang Junyang 679e5dac68 Remove the VA to PA API and tidy up kernel space 2024-05-10 19:07:05 +08:00
Zhang Junyang cf5cfb3475 Enable global page and add a global TLB flushing function 2024-05-10 19:07:05 +08:00
Zhang Junyang 989970429a Refactor the definition of page properties and permissions 2024-05-10 19:07:05 +08:00
Zhang Junyang 351e08c897 Escalate page table consts to be paging consts 2024-05-10 19:07:05 +08:00
Zhang Junyang 2dbeb92326 Implement fine grained locks for the page table and adjust APIs 2024-05-10 19:07:05 +08:00
Zhang Junyang ef1ab72ebe Let page table own frames and remove MemorySet 2024-05-10 19:07:05 +08:00
Zhang Junyang b6f8661abb Add unit tests for the page table 2024-05-10 19:07:05 +08:00
Zhang Junyang 82bdadf754 Add a PTE extension mechanism 2024-05-10 19:07:05 +08:00
Zhang Junyang 513ac97969 Add shortcuts for writing page table protections 2024-05-10 19:07:05 +08:00
Zhang Junyang 24a868a670 Implement an efficient ranged page table 2024-05-10 19:07:05 +08:00
Chen Chengjun c9cfb98746 Improve the efficiency of fill method in VmWriter 2024-05-10 11:08:51 +08:00
Chuandong Li a6055bb092 Fix a deadlock issue in ramfs 2024-05-10 11:05:41 +08:00
Zhang Junyang d1990869ae Make ID allocator a separate crate and use it in the frame 2024-05-09 14:35:12 +08:00
LI Qing 8f3b1f8ddf Reduce some redundant usage of `current!` and `current_thread!` 2024-05-09 14:33:21 +08:00
Zhang Junyang da5873e990 Allow implementations for dynamically borrowed `RwMutex` guards 2024-05-09 10:41:21 +08:00
Zhang Junyang d15b4d9115 Allow dynamically borrowed mutex guard 2024-05-09 10:41:21 +08:00
Zhang Junyang 11e4984df2 Allow dynamically borrowed `RwLock` guards 2024-05-09 10:41:21 +08:00
Zhang Junyang 3dd6f71936 Allow dynamically borrowed spinlock guard 2024-05-09 10:41:21 +08:00
Zhang Junyang 57f4ed778d Update proper dep for builder in OSDK and allow publishing 2024-05-08 15:41:32 +08:00
Jianfeng Jiang cd3faa8123 Inherit HasDaddr for reference type 2024-04-29 20:33:57 +08:00
Jianfeng Jiang 345ab8f838 Add write_vals for VmIo 2024-04-29 20:33:57 +08:00
Jianfeng Jiang cd1575bc6d Refactor virtio drivers with DMA APIs 2024-04-29 20:33:57 +08:00
Hsy-Intel 5e127b2da0 Remove local tdx-guest crate 2024-04-29 10:13:04 +08:00
LI Qing b7131e721c Modify the virtio-blk to async 2024-04-26 14:36:46 +08:00
徐启航 3b47143875 Add user preemption functionality 2024-04-26 13:35:23 +08:00
Ruihan Li 822f2b97c4 Use a spin lock to protect `APIC_INSTANCE` 2024-04-26 11:35:13 +08:00
Fabing Li c335873d12 Enable kernel mode unit tests in kernel threads 2024-04-22 13:57:22 +08:00
Ruihan Li 4851204059 Implement a safe and race-free `Waiter` 2024-04-17 11:07:07 +08:00
Fabing Li dac41e9a2f Support T:?Sized as type parameter for Mutex, SpinLock, RwLock, and RwMutex 2024-04-17 08:51:59 +08:00
LeslieKid e8a991048f Fix typos in comments 2024-04-12 13:28:08 +08:00
LI Qing c3c6b0c19d Use Dma APIs for virtio-block driver 2024-04-11 15:22:18 +08:00
Jianfeng Jiang d8a841f88a Add DmaBuf for DMA-capable memory areas 2024-04-11 15:22:18 +08:00
Zhang Junyang e3cb4d25e3 Fix the kernel stack alignment 2024-04-09 16:59:21 +08:00
Chen Chengjun 33c8727a13 Introduce XArray and refactor the COW mechanism of Vmo 2024-04-08 18:54:46 +08:00
Chen Chengjun 233e1fac98 Add more getter methods for VmSpace 2024-04-08 18:54:46 +08:00
Ruihan Li acf956fa03 Fix the kernel page fault handler 2024-04-08 17:02:38 +08:00
Ruihan Li 849c6e3259 Introduce `PHYS_MEM_VADDR_RANGE` 2024-04-08 17:02:38 +08:00
nishirong 02e4cdc80e Fix kernel stack's underflowing initial rsp 2024-04-07 18:05:36 +08:00
Zhang Junyang 4dd707488d Fix a code format error in the trap handler 2024-04-03 15:19:08 +08:00
Yuke Peng e7e613db4e Implement kernel page fault handler 2024-04-03 13:34:20 +08:00
Ruihan Li 198363c2d3 Speed up stack unwinding 2024-04-03 08:17:58 +08:00
fgh1999 54109e7e9e Remove IRQ guard in `preempt()`
Fix #478.
Kernel preemption is not taken into account currently.
2024-04-02 09:03:59 +08:00
Jianfeng Jiang 8f51259a10 Remove unused fields from waiter 2024-03-29 15:04:29 +08:00