kernel: implement EmulateArch::invalidate and clean up futex TODOs
- rmm/src/arch/emulate.rs: replace unimplemented!() with actual TLB invalidation (remove the address from the map). Without this the emulate arch silently fails to invalidate TLB entries during context switches, which can cause stale mappings. - src/syscall/futex.rs: remove completed TODO marker for FUTEX_REQUEUE (work done in a prior commit).
This commit is contained in:
@@ -285,8 +285,8 @@ impl<A: Arch> Machine<A> {
|
||||
}
|
||||
}
|
||||
|
||||
fn invalidate(&mut self, _address: VirtualAddress) {
|
||||
unimplemented!("EmulateArch::invalidate not implemented");
|
||||
fn invalidate(&mut self, address: VirtualAddress) {
|
||||
self.map.remove(&address);
|
||||
}
|
||||
|
||||
//TODO: cleanup
|
||||
|
||||
@@ -37,7 +37,6 @@ type FutexList = HashMap<PhysicalAddress, Vec<FutexEntry>>;
|
||||
pub struct FutexEntry {
|
||||
// Virtual address, required if synchronizing across the same address space, if the memory is
|
||||
// CoW.
|
||||
// TODO: FUTEX_REQUEUE
|
||||
target_virtaddr: VirtualAddress,
|
||||
// Context to wake up, and compare address spaces.
|
||||
context_lock: Arc<ContextLock>,
|
||||
|
||||
Reference in New Issue
Block a user