mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-27 12:48:22 +00:00
vmm: properly handle direct physical mapping unmap
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
#define VMM_FLAGS_EXACT 16
|
||||
#define VMM_FLAGS_SHARED 32
|
||||
|
||||
#define VMM_PERMANENT_FLAGS_MASK (VMM_FLAGS_FILE | VMM_FLAGS_SHARED)
|
||||
#define VMM_PERMANENT_FLAGS_MASK (VMM_FLAGS_FILE | VMM_FLAGS_SHARED | VMM_FLAGS_PHYSICAL)
|
||||
|
||||
#define VMM_ACTION_READ 1
|
||||
#define VMM_ACTION_WRITE 2
|
||||
|
||||
+3
-2
@@ -243,9 +243,10 @@ static void destroyrange(vmmrange_t *range, uintmax_t _offset, size_t size, int
|
||||
pmm_release(physical);
|
||||
}
|
||||
} else {
|
||||
// anonymous or private non character device mapping
|
||||
// anonymous, physical or private non character device mapping
|
||||
arch_mmu_unmap(_cpu()->vmmctx->pagetable, vaddr);
|
||||
pmm_release(physical);
|
||||
if ((range->flags & VMM_FLAGS_PHYSICAL) == 0)
|
||||
pmm_release(physical);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user