From 700123106b48f23fd083cfbc0f8a6d9d7364c1cb Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Fri, 13 Nov 2026 17:57:23 +0100 Subject: x86_64/memory: flush TLB on page unmap --- arch/x86_64/arch/memory/higher_half_mapper.cpp | 2 ++ arch/x86_64/arch/memory/mmu.hpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/arch/x86_64/arch/memory/higher_half_mapper.cpp b/arch/x86_64/arch/memory/higher_half_mapper.cpp index 9019e25b..ee11d50a 100644 --- a/arch/x86_64/arch/memory/higher_half_mapper.cpp +++ b/arch/x86_64/arch/memory/higher_half_mapper.cpp @@ -1,5 +1,6 @@ #include +#include #include #include @@ -99,6 +100,7 @@ namespace arch::memory } } + tlb_flush(page.start_address()); return unmapped_frame; } diff --git a/arch/x86_64/arch/memory/mmu.hpp b/arch/x86_64/arch/memory/mmu.hpp index 9bd95b43..934aa63f 100644 --- a/arch/x86_64/arch/memory/mmu.hpp +++ b/arch/x86_64/arch/memory/mmu.hpp @@ -7,7 +7,7 @@ namespace arch::memory { //! Invalidate a translation lookaside buffer (TLB) entry for a given address //! - //! @param address The physical address for which to flush the TLB entries + //! @param address The linear address for which to flush the TLB entries auto tlb_flush(kapi::memory::linear_address address) -> void; //! Invalidate all translation lookaside buffer (TLB) entries -- cgit v1.2.3