mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-24 09:53:24 +00:00
Implement the stray marking in PT to ensure serializability
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
5b7637eac3
commit
54fbdcf059
@ -355,9 +355,16 @@ impl Vmar_ {
|
||||
|
||||
/// Clears all content of the root VMAR.
|
||||
fn clear_root_vmar(&self) -> Result<()> {
|
||||
self.vm_space.clear();
|
||||
let mut inner = self.inner.write();
|
||||
inner.vm_mappings.clear();
|
||||
{
|
||||
let full_range = 0..MAX_USERSPACE_VADDR;
|
||||
let mut cursor = self.vm_space.cursor_mut(&full_range).unwrap();
|
||||
cursor.unmap(full_range.len());
|
||||
cursor.flusher().sync_tlb_flush();
|
||||
}
|
||||
{
|
||||
let mut inner = self.inner.write();
|
||||
inner.vm_mappings.clear();
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user