summaryrefslogtreecommitdiff
path: root/Kernel
diff options
context:
space:
mode:
Diffstat (limited to 'Kernel')
-rw-r--r--Kernel/ACPI/DynamicParser.h2
-rw-r--r--Kernel/ACPI/MultiProcessorParser.cpp2
-rw-r--r--Kernel/ACPI/MultiProcessorParser.h2
-rw-r--r--Kernel/ACPI/Parser.cpp2
-rw-r--r--Kernel/ACPI/Parser.h2
-rw-r--r--Kernel/Arch/PC/BIOS.cpp4
-rw-r--r--Kernel/Arch/PC/BIOS.h4
-rw-r--r--Kernel/Arch/x86/common/Processor.cpp2
-rw-r--r--Kernel/Bus/PCI/MMIOAccess.cpp2
-rw-r--r--Kernel/Bus/PCI/MMIOAccess.h8
-rw-r--r--Kernel/Bus/PCI/WindowedMMIOAccess.cpp2
-rw-r--r--Kernel/Bus/PCI/WindowedMMIOAccess.h8
-rw-r--r--Kernel/Bus/USB/UHCIController.cpp4
-rw-r--r--Kernel/Bus/USB/UHCIController.h2
-rw-r--r--Kernel/Bus/USB/USBPipe.h2
-rw-r--r--Kernel/Bus/USB/USBTransfer.cpp2
-rw-r--r--Kernel/Bus/USB/USBTransfer.h6
-rw-r--r--Kernel/CMakeLists.txt36
-rw-r--r--Kernel/CoreDump.cpp2
-rw-r--r--Kernel/Devices/AsyncDeviceRequest.h2
-rw-r--r--Kernel/Devices/KCOVInstance.h2
-rw-r--r--Kernel/Devices/MemoryDevice.cpp2
-rw-r--r--Kernel/Devices/SB16.cpp4
-rw-r--r--Kernel/Devices/SB16.h2
-rw-r--r--Kernel/FileSystem/AnonymousFile.cpp2
-rw-r--r--Kernel/FileSystem/AnonymousFile.h2
-rw-r--r--Kernel/FileSystem/FileDescription.cpp2
-rw-r--r--Kernel/FileSystem/FileSystem.cpp2
-rw-r--r--Kernel/FileSystem/Inode.cpp2
-rw-r--r--Kernel/FileSystem/InodeFile.cpp4
-rw-r--r--Kernel/FutexQueue.h2
-rw-r--r--Kernel/Graphics/Bochs/GraphicsAdapter.cpp2
-rw-r--r--Kernel/Graphics/Bochs/GraphicsAdapter.h2
-rw-r--r--Kernel/Graphics/FramebufferDevice.cpp4
-rw-r--r--Kernel/Graphics/FramebufferDevice.h2
-rw-r--r--Kernel/Graphics/GraphicsManagement.cpp2
-rw-r--r--Kernel/Graphics/GraphicsManagement.h2
-rw-r--r--Kernel/Heap/SlabAllocator.cpp2
-rw-r--r--Kernel/Heap/kmalloc.cpp2
-rw-r--r--Kernel/Interrupts/APIC.cpp6
-rw-r--r--Kernel/Interrupts/APIC.h2
-rw-r--r--Kernel/Interrupts/IOAPIC.h2
-rw-r--r--Kernel/Interrupts/InterruptManagement.cpp2
-rw-r--r--Kernel/KBuffer.h4
-rw-r--r--Kernel/Memory/AllocationStrategy.h (renamed from Kernel/VM/AllocationStrategy.h)0
-rw-r--r--Kernel/Memory/AnonymousVMObject.cpp (renamed from Kernel/VM/AnonymousVMObject.cpp)6
-rw-r--r--Kernel/Memory/AnonymousVMObject.h (renamed from Kernel/VM/AnonymousVMObject.h)8
-rw-r--r--Kernel/Memory/InodeVMObject.cpp (renamed from Kernel/VM/InodeVMObject.cpp)2
-rw-r--r--Kernel/Memory/InodeVMObject.h (renamed from Kernel/VM/InodeVMObject.h)2
-rw-r--r--Kernel/Memory/MappedROM.h (renamed from Kernel/VM/MappedROM.h)2
-rw-r--r--Kernel/Memory/MemoryManager.cpp (renamed from Kernel/VM/MemoryManager.cpp)10
-rw-r--r--Kernel/Memory/MemoryManager.h (renamed from Kernel/VM/MemoryManager.h)10
-rw-r--r--Kernel/Memory/PageDirectory.cpp (renamed from Kernel/VM/PageDirectory.cpp)4
-rw-r--r--Kernel/Memory/PageDirectory.h (renamed from Kernel/VM/PageDirectory.h)4
-rw-r--r--Kernel/Memory/PageFaultResponse.h (renamed from Kernel/VM/PageFaultResponse.h)0
-rw-r--r--Kernel/Memory/PhysicalPage.cpp (renamed from Kernel/VM/PhysicalPage.cpp)4
-rw-r--r--Kernel/Memory/PhysicalPage.h (renamed from Kernel/VM/PhysicalPage.h)0
-rw-r--r--Kernel/Memory/PhysicalRegion.cpp (renamed from Kernel/VM/PhysicalRegion.cpp)6
-rw-r--r--Kernel/Memory/PhysicalRegion.h (renamed from Kernel/VM/PhysicalRegion.h)4
-rw-r--r--Kernel/Memory/PhysicalZone.cpp (renamed from Kernel/VM/PhysicalZone.cpp)6
-rw-r--r--Kernel/Memory/PhysicalZone.h (renamed from Kernel/VM/PhysicalZone.h)0
-rw-r--r--Kernel/Memory/PrivateInodeVMObject.cpp (renamed from Kernel/VM/PrivateInodeVMObject.cpp)2
-rw-r--r--Kernel/Memory/PrivateInodeVMObject.h (renamed from Kernel/VM/PrivateInodeVMObject.h)2
-rw-r--r--Kernel/Memory/ProcessPagingScope.cpp (renamed from Kernel/VM/ProcessPagingScope.cpp)4
-rw-r--r--Kernel/Memory/ProcessPagingScope.h (renamed from Kernel/VM/ProcessPagingScope.h)0
-rw-r--r--Kernel/Memory/Range.cpp (renamed from Kernel/VM/Range.cpp)4
-rw-r--r--Kernel/Memory/Range.h (renamed from Kernel/VM/Range.h)1
-rw-r--r--Kernel/Memory/RangeAllocator.cpp (renamed from Kernel/VM/RangeAllocator.cpp)2
-rw-r--r--Kernel/Memory/RangeAllocator.h (renamed from Kernel/VM/RangeAllocator.h)2
-rw-r--r--Kernel/Memory/Region.cpp (renamed from Kernel/VM/Region.cpp)10
-rw-r--r--Kernel/Memory/Region.h (renamed from Kernel/VM/Region.h)4
-rw-r--r--Kernel/Memory/RingBuffer.cpp (renamed from Kernel/VM/RingBuffer.cpp)4
-rw-r--r--Kernel/Memory/RingBuffer.h (renamed from Kernel/VM/RingBuffer.h)0
-rw-r--r--Kernel/Memory/ScatterGatherList.cpp (renamed from Kernel/VM/ScatterGatherList.cpp)2
-rw-r--r--Kernel/Memory/ScatterGatherList.h (renamed from Kernel/VM/ScatterGatherList.h)4
-rw-r--r--Kernel/Memory/SharedInodeVMObject.cpp (renamed from Kernel/VM/SharedInodeVMObject.cpp)2
-rw-r--r--Kernel/Memory/SharedInodeVMObject.h (renamed from Kernel/VM/SharedInodeVMObject.h)2
-rw-r--r--Kernel/Memory/Space.cpp (renamed from Kernel/VM/Space.cpp)8
-rw-r--r--Kernel/Memory/Space.h (renamed from Kernel/VM/Space.h)4
-rw-r--r--Kernel/Memory/TypedMapping.h (renamed from Kernel/VM/TypedMapping.h)2
-rw-r--r--Kernel/Memory/VMObject.cpp (renamed from Kernel/VM/VMObject.cpp)4
-rw-r--r--Kernel/Memory/VMObject.h (renamed from Kernel/VM/VMObject.h)2
-rw-r--r--Kernel/Net/NetworkingManagement.cpp2
-rw-r--r--Kernel/Net/NetworkingManagement.h2
-rw-r--r--Kernel/Process.cpp6
-rw-r--r--Kernel/Process.h2
-rw-r--r--Kernel/ProcessSpecificExposed.cpp4
-rw-r--r--Kernel/StdLib.cpp2
-rw-r--r--Kernel/Storage/AHCIController.cpp2
-rw-r--r--Kernel/Storage/AHCIPort.cpp6
-rw-r--r--Kernel/Storage/AHCIPort.h6
-rw-r--r--Kernel/Storage/AHCIPortHandler.h2
-rw-r--r--Kernel/Storage/IDEChannel.cpp2
-rw-r--r--Kernel/Storage/IDEChannel.h2
-rw-r--r--Kernel/Storage/StorageController.h2
-rw-r--r--Kernel/Syscall.cpp2
-rw-r--r--Kernel/Syscalls/anon_create.cpp2
-rw-r--r--Kernel/Syscalls/execve.cpp10
-rw-r--r--Kernel/Syscalls/fork.cpp2
-rw-r--r--Kernel/Syscalls/futex.cpp2
-rw-r--r--Kernel/Syscalls/get_stack_bounds.cpp2
-rw-r--r--Kernel/Syscalls/mmap.cpp12
-rw-r--r--Kernel/Syscalls/ptrace.cpp10
-rw-r--r--Kernel/Syscalls/purge.cpp6
-rw-r--r--Kernel/Syscalls/thread.cpp2
-rw-r--r--Kernel/Thread.cpp6
-rw-r--r--Kernel/Thread.h2
-rw-r--r--Kernel/Time/HPET.cpp4
-rw-r--r--Kernel/Time/HPET.h2
-rw-r--r--Kernel/UserOrKernelBuffer.cpp2
-rw-r--r--Kernel/UserOrKernelBuffer.h2
-rw-r--r--Kernel/VirtIO/VirtIO.h2
-rw-r--r--Kernel/VirtIO/VirtIOConsole.h2
-rw-r--r--Kernel/VirtIO/VirtIOConsolePort.h2
-rw-r--r--Kernel/VirtIO/VirtIOQueue.h4
-rw-r--r--Kernel/init.cpp2
116 files changed, 205 insertions, 204 deletions
diff --git a/Kernel/ACPI/DynamicParser.h b/Kernel/ACPI/DynamicParser.h
index 4fbff9e5a8..ecbb0829c1 100644
--- a/Kernel/ACPI/DynamicParser.h
+++ b/Kernel/ACPI/DynamicParser.h
@@ -9,9 +9,9 @@
#include <AK/RefPtr.h>
#include <Kernel/ACPI/Parser.h>
#include <Kernel/Interrupts/IRQHandler.h>
+#include <Kernel/Memory/PhysicalPage.h>
#include <Kernel/Mutex.h>
#include <Kernel/PhysicalAddress.h>
-#include <Kernel/VM/PhysicalPage.h>
namespace Kernel::ACPI {
diff --git a/Kernel/ACPI/MultiProcessorParser.cpp b/Kernel/ACPI/MultiProcessorParser.cpp
index b3c8ab8048..4e765acb39 100644
--- a/Kernel/ACPI/MultiProcessorParser.cpp
+++ b/Kernel/ACPI/MultiProcessorParser.cpp
@@ -10,9 +10,9 @@
#include <Kernel/Arch/PC/BIOS.h>
#include <Kernel/Debug.h>
#include <Kernel/Interrupts/IOAPIC.h>
+#include <Kernel/Memory/TypedMapping.h>
#include <Kernel/Sections.h>
#include <Kernel/StdLib.h>
-#include <Kernel/VM/TypedMapping.h>
namespace Kernel {
diff --git a/Kernel/ACPI/MultiProcessorParser.h b/Kernel/ACPI/MultiProcessorParser.h
index 405787c951..dcbed5950a 100644
--- a/Kernel/ACPI/MultiProcessorParser.h
+++ b/Kernel/ACPI/MultiProcessorParser.h
@@ -7,8 +7,8 @@
#pragma once
#include <AK/Types.h>
+#include <Kernel/Memory/Region.h>
#include <Kernel/PhysicalAddress.h>
-#include <Kernel/VM/Region.h>
#include <Kernel/VirtualAddress.h>
namespace Kernel {
diff --git a/Kernel/ACPI/Parser.cpp b/Kernel/ACPI/Parser.cpp
index b138547fda..5c903df14d 100644
--- a/Kernel/ACPI/Parser.cpp
+++ b/Kernel/ACPI/Parser.cpp
@@ -13,9 +13,9 @@
#include <Kernel/Bus/PCI/Access.h>
#include <Kernel/Debug.h>
#include <Kernel/IO.h>
+#include <Kernel/Memory/TypedMapping.h>
#include <Kernel/Sections.h>
#include <Kernel/StdLib.h>
-#include <Kernel/VM/TypedMapping.h>
namespace Kernel::ACPI {
diff --git a/Kernel/ACPI/Parser.h b/Kernel/ACPI/Parser.h
index 44d44f7da1..bd6d837544 100644
--- a/Kernel/ACPI/Parser.h
+++ b/Kernel/ACPI/Parser.h
@@ -10,8 +10,8 @@
#include <Kernel/ACPI/Definitions.h>
#include <Kernel/ACPI/Initialize.h>
#include <Kernel/FileSystem/SysFSComponent.h>
+#include <Kernel/Memory/Region.h>
#include <Kernel/PhysicalAddress.h>
-#include <Kernel/VM/Region.h>
#include <Kernel/VirtualAddress.h>
namespace Kernel::ACPI {
diff --git a/Kernel/Arch/PC/BIOS.cpp b/Kernel/Arch/PC/BIOS.cpp
index 6a03b6d126..784e773df3 100644
--- a/Kernel/Arch/PC/BIOS.cpp
+++ b/Kernel/Arch/PC/BIOS.cpp
@@ -9,9 +9,9 @@
#include <Kernel/Arch/PC/BIOS.h>
#include <Kernel/FileSystem/FileDescription.h>
#include <Kernel/KBufferBuilder.h>
+#include <Kernel/Memory/MemoryManager.h>
+#include <Kernel/Memory/TypedMapping.h>
#include <Kernel/Sections.h>
-#include <Kernel/VM/MemoryManager.h>
-#include <Kernel/VM/TypedMapping.h>
namespace Kernel {
diff --git a/Kernel/Arch/PC/BIOS.h b/Kernel/Arch/PC/BIOS.h
index e7e2f37afb..54ad1f1aa0 100644
--- a/Kernel/Arch/PC/BIOS.h
+++ b/Kernel/Arch/PC/BIOS.h
@@ -11,9 +11,9 @@
#include <AK/Vector.h>
#include <Kernel/FileSystem/SysFS.h>
#include <Kernel/KBuffer.h>
+#include <Kernel/Memory/MappedROM.h>
+#include <Kernel/Memory/Region.h>
#include <Kernel/PhysicalAddress.h>
-#include <Kernel/VM/MappedROM.h>
-#include <Kernel/VM/Region.h>
#include <Kernel/VirtualAddress.h>
namespace Kernel::SMBIOS {
diff --git a/Kernel/Arch/x86/common/Processor.cpp b/Kernel/Arch/x86/common/Processor.cpp
index 8f59b97dbb..e626d4d211 100644
--- a/Kernel/Arch/x86/common/Processor.cpp
+++ b/Kernel/Arch/x86/common/Processor.cpp
@@ -10,11 +10,11 @@
#include <AK/Types.h>
#include <Kernel/Interrupts/APIC.h>
+#include <Kernel/Memory/ProcessPagingScope.h>
#include <Kernel/Process.h>
#include <Kernel/Sections.h>
#include <Kernel/StdLib.h>
#include <Kernel/Thread.h>
-#include <Kernel/VM/ProcessPagingScope.h>
#include <Kernel/Arch/x86/CPUID.h>
#include <Kernel/Arch/x86/Interrupts.h>
diff --git a/Kernel/Bus/PCI/MMIOAccess.cpp b/Kernel/Bus/PCI/MMIOAccess.cpp
index f8d0945a1c..6811f4df8c 100644
--- a/Kernel/Bus/PCI/MMIOAccess.cpp
+++ b/Kernel/Bus/PCI/MMIOAccess.cpp
@@ -9,8 +9,8 @@
#include <Kernel/Arch/x86/InterruptDisabler.h>
#include <Kernel/Bus/PCI/MMIOAccess.h>
#include <Kernel/Debug.h>
+#include <Kernel/Memory/MemoryManager.h>
#include <Kernel/Sections.h>
-#include <Kernel/VM/MemoryManager.h>
namespace Kernel {
namespace PCI {
diff --git a/Kernel/Bus/PCI/MMIOAccess.h b/Kernel/Bus/PCI/MMIOAccess.h
index 82070e4449..fd94b4b65c 100644
--- a/Kernel/Bus/PCI/MMIOAccess.h
+++ b/Kernel/Bus/PCI/MMIOAccess.h
@@ -12,11 +12,11 @@
#include <AK/Types.h>
#include <Kernel/ACPI/Definitions.h>
#include <Kernel/Bus/PCI/Access.h>
+#include <Kernel/Memory/AnonymousVMObject.h>
+#include <Kernel/Memory/PhysicalRegion.h>
+#include <Kernel/Memory/Region.h>
+#include <Kernel/Memory/VMObject.h>
#include <Kernel/SpinLock.h>
-#include <Kernel/VM/AnonymousVMObject.h>
-#include <Kernel/VM/PhysicalRegion.h>
-#include <Kernel/VM/Region.h>
-#include <Kernel/VM/VMObject.h>
namespace Kernel {
namespace PCI {
diff --git a/Kernel/Bus/PCI/WindowedMMIOAccess.cpp b/Kernel/Bus/PCI/WindowedMMIOAccess.cpp
index 77da10c148..9f7af0feb5 100644
--- a/Kernel/Bus/PCI/WindowedMMIOAccess.cpp
+++ b/Kernel/Bus/PCI/WindowedMMIOAccess.cpp
@@ -10,8 +10,8 @@
#include <Kernel/Arch/x86/InterruptDisabler.h>
#include <Kernel/Bus/PCI/WindowedMMIOAccess.h>
#include <Kernel/Debug.h>
+#include <Kernel/Memory/MemoryManager.h>
#include <Kernel/Sections.h>
-#include <Kernel/VM/MemoryManager.h>
namespace Kernel {
namespace PCI {
diff --git a/Kernel/Bus/PCI/WindowedMMIOAccess.h b/Kernel/Bus/PCI/WindowedMMIOAccess.h
index d2cbbe0dbd..4c7b2789d4 100644
--- a/Kernel/Bus/PCI/WindowedMMIOAccess.h
+++ b/Kernel/Bus/PCI/WindowedMMIOAccess.h
@@ -13,10 +13,10 @@
#include <Kernel/ACPI/Definitions.h>
#include <Kernel/Bus/PCI/Access.h>
#include <Kernel/Bus/PCI/MMIOAccess.h>
-#include <Kernel/VM/AnonymousVMObject.h>
-#include <Kernel/VM/PhysicalRegion.h>
-#include <Kernel/VM/Region.h>
-#include <Kernel/VM/VMObject.h>
+#include <Kernel/Memory/AnonymousVMObject.h>
+#include <Kernel/Memory/PhysicalRegion.h>
+#include <Kernel/Memory/Region.h>
+#include <Kernel/Memory/VMObject.h>
namespace Kernel {
namespace PCI {
diff --git a/Kernel/Bus/USB/UHCIController.cpp b/Kernel/Bus/USB/UHCIController.cpp
index a0564103cd..e1032254c7 100644
--- a/Kernel/Bus/USB/UHCIController.cpp
+++ b/Kernel/Bus/USB/UHCIController.cpp
@@ -14,12 +14,12 @@
#include <Kernel/Debug.h>
#include <Kernel/FileSystem/SysFS.h>
#include <Kernel/KBufferBuilder.h>
+#include <Kernel/Memory/AnonymousVMObject.h>
+#include <Kernel/Memory/MemoryManager.h>
#include <Kernel/Process.h>
#include <Kernel/Sections.h>
#include <Kernel/StdLib.h>
#include <Kernel/Time/TimeManagement.h>
-#include <Kernel/VM/AnonymousVMObject.h>
-#include <Kernel/VM/MemoryManager.h>
static constexpr u8 MAXIMUM_NUMBER_OF_TDS = 128; // Upper pool limit. This consumes the second page we have allocated
static constexpr u8 MAXIMUM_NUMBER_OF_QHS = 64;
diff --git a/Kernel/Bus/USB/UHCIController.h b/Kernel/Bus/USB/UHCIController.h
index 82056ded9c..7adecd67b4 100644
--- a/Kernel/Bus/USB/UHCIController.h
+++ b/Kernel/Bus/USB/UHCIController.h
@@ -15,9 +15,9 @@
#include <Kernel/Bus/USB/USBDevice.h>
#include <Kernel/Bus/USB/USBTransfer.h>
#include <Kernel/IO.h>
+#include <Kernel/Memory/AnonymousVMObject.h>
#include <Kernel/Process.h>
#include <Kernel/Time/TimeManagement.h>
-#include <Kernel/VM/AnonymousVMObject.h>
namespace Kernel::USB {
diff --git a/Kernel/Bus/USB/USBPipe.h b/Kernel/Bus/USB/USBPipe.h
index eeffde745b..ce1af94bd0 100644
--- a/Kernel/Bus/USB/USBPipe.h
+++ b/Kernel/Bus/USB/USBPipe.h
@@ -9,7 +9,7 @@
#include <AK/OwnPtr.h>
#include <AK/Types.h>
#include <Kernel/Bus/USB/USBDescriptors.h>
-#include <Kernel/VM/Region.h>
+#include <Kernel/Memory/Region.h>
namespace Kernel::USB {
diff --git a/Kernel/Bus/USB/USBTransfer.cpp b/Kernel/Bus/USB/USBTransfer.cpp
index f0504010f5..51f26c91a8 100644
--- a/Kernel/Bus/USB/USBTransfer.cpp
+++ b/Kernel/Bus/USB/USBTransfer.cpp
@@ -5,7 +5,7 @@
*/
#include <Kernel/Bus/USB/USBTransfer.h>
-#include <Kernel/VM/MemoryManager.h>
+#include <Kernel/Memory/MemoryManager.h>
namespace Kernel::USB {
diff --git a/Kernel/Bus/USB/USBTransfer.h b/Kernel/Bus/USB/USBTransfer.h
index 5eca252aa8..796407c206 100644
--- a/Kernel/Bus/USB/USBTransfer.h
+++ b/Kernel/Bus/USB/USBTransfer.h
@@ -10,9 +10,9 @@
#include <AK/RefPtr.h>
#include <Kernel/Bus/USB/PacketTypes.h>
#include <Kernel/Bus/USB/USBPipe.h>
-#include <Kernel/VM/AnonymousVMObject.h>
-#include <Kernel/VM/PhysicalPage.h>
-#include <Kernel/VM/Region.h>
+#include <Kernel/Memory/AnonymousVMObject.h>
+#include <Kernel/Memory/PhysicalPage.h>
+#include <Kernel/Memory/Region.h>
// TODO: Callback stuff in this class please!
namespace Kernel::USB {
diff --git a/Kernel/CMakeLists.txt b/Kernel/CMakeLists.txt
index 40f2ee11cd..b41596d8ee 100644
--- a/Kernel/CMakeLists.txt
+++ b/Kernel/CMakeLists.txt
@@ -131,6 +131,23 @@ set(KERNEL_SOURCES
KLexicalPath.cpp
KString.cpp
KSyms.cpp
+ Memory/AnonymousVMObject.cpp
+ Memory/InodeVMObject.cpp
+ Memory/MemoryManager.cpp
+ Memory/PageDirectory.cpp
+ Memory/PhysicalPage.cpp
+ Memory/PhysicalRegion.cpp
+ Memory/PhysicalZone.cpp
+ Memory/PrivateInodeVMObject.cpp
+ Memory/ProcessPagingScope.cpp
+ Memory/Range.cpp
+ Memory/RangeAllocator.cpp
+ Memory/Region.cpp
+ Memory/RingBuffer.cpp
+ Memory/ScatterGatherList.cpp
+ Memory/SharedInodeVMObject.cpp
+ Memory/Space.cpp
+ Memory/VMObject.cpp
MiniStdLib.cpp
Mutex.cpp
Net/E1000ENetworkAdapter.cpp
@@ -140,8 +157,8 @@ set(KERNEL_SOURCES
Net/LoopbackAdapter.cpp
Net/NE2000NetworkAdapter.cpp
Net/NetworkAdapter.cpp
- Net/NetworkingManagement.cpp
Net/NetworkTask.cpp
+ Net/NetworkingManagement.cpp
Net/RTL8139NetworkAdapter.cpp
Net/RTL8168NetworkAdapter.cpp
Net/Routing.cpp
@@ -255,23 +272,6 @@ set(KERNEL_SOURCES
VirtIO/VirtIOConsolePort.cpp
VirtIO/VirtIOQueue.cpp
VirtIO/VirtIORNG.cpp
- VM/AnonymousVMObject.cpp
- VM/InodeVMObject.cpp
- VM/MemoryManager.cpp
- VM/PageDirectory.cpp
- VM/PhysicalPage.cpp
- VM/PhysicalRegion.cpp
- VM/PhysicalZone.cpp
- VM/PrivateInodeVMObject.cpp
- VM/ProcessPagingScope.cpp
- VM/Range.cpp
- VM/RangeAllocator.cpp
- VM/Region.cpp
- VM/RingBuffer.cpp
- VM/ScatterGatherList.cpp
- VM/SharedInodeVMObject.cpp
- VM/Space.cpp
- VM/VMObject.cpp
WaitQueue.cpp
WorkQueue.cpp
init.cpp
diff --git a/Kernel/CoreDump.cpp b/Kernel/CoreDump.cpp
index 135579b820..ce4009fa9b 100644
--- a/Kernel/CoreDump.cpp
+++ b/Kernel/CoreDump.cpp
@@ -14,10 +14,10 @@
#include <Kernel/FileSystem/FileDescription.h>
#include <Kernel/FileSystem/VirtualFileSystem.h>
#include <Kernel/KLexicalPath.h>
+#include <Kernel/Memory/ProcessPagingScope.h>
#include <Kernel/Process.h>
#include <Kernel/RTC.h>
#include <Kernel/SpinLock.h>
-#include <Kernel/VM/ProcessPagingScope.h>
#include <LibC/elf.h>
#include <LibELF/CoreDump.h>
diff --git a/Kernel/Devices/AsyncDeviceRequest.h b/Kernel/Devices/AsyncDeviceRequest.h
index b7692020d3..d5914fdfd7 100644
--- a/Kernel/Devices/AsyncDeviceRequest.h
+++ b/Kernel/Devices/AsyncDeviceRequest.h
@@ -8,10 +8,10 @@
#include <AK/IntrusiveList.h>
#include <AK/NonnullRefPtr.h>
+#include <Kernel/Memory/ProcessPagingScope.h>
#include <Kernel/Process.h>
#include <Kernel/Thread.h>
#include <Kernel/UserOrKernelBuffer.h>
-#include <Kernel/VM/ProcessPagingScope.h>
#include <Kernel/WaitQueue.h>
namespace Kernel {
diff --git a/Kernel/Devices/KCOVInstance.h b/Kernel/Devices/KCOVInstance.h
index 2694ad1d87..3a585af192 100644
--- a/Kernel/Devices/KCOVInstance.h
+++ b/Kernel/Devices/KCOVInstance.h
@@ -6,8 +6,8 @@
#pragma once
+#include <Kernel/Memory/AnonymousVMObject.h>
#include <Kernel/SpinLock.h>
-#include <Kernel/VM/AnonymousVMObject.h>
namespace Kernel {
diff --git a/Kernel/Devices/MemoryDevice.cpp b/Kernel/Devices/MemoryDevice.cpp
index dee2c1c5de..5b03516994 100644
--- a/Kernel/Devices/MemoryDevice.cpp
+++ b/Kernel/Devices/MemoryDevice.cpp
@@ -8,8 +8,8 @@
#include <AK/StdLibExtras.h>
#include <Kernel/Arch/PC/BIOS.h>
#include <Kernel/Devices/MemoryDevice.h>
+#include <Kernel/Memory/AnonymousVMObject.h>
#include <Kernel/Sections.h>
-#include <Kernel/VM/AnonymousVMObject.h>
namespace Kernel {
diff --git a/Kernel/Devices/SB16.cpp b/Kernel/Devices/SB16.cpp
index db0c2ae644..d495dc47ed 100644
--- a/Kernel/Devices/SB16.cpp
+++ b/Kernel/Devices/SB16.cpp
@@ -11,10 +11,10 @@
#include <Kernel/Debug.h>
#include <Kernel/Devices/SB16.h>
#include <Kernel/IO.h>
+#include <Kernel/Memory/AnonymousVMObject.h>
+#include <Kernel/Memory/MemoryManager.h>
#include <Kernel/Sections.h>
#include <Kernel/Thread.h>
-#include <Kernel/VM/AnonymousVMObject.h>
-#include <Kernel/VM/MemoryManager.h>
namespace Kernel {
#define SB16_DEFAULT_IRQ 5
diff --git a/Kernel/Devices/SB16.h b/Kernel/Devices/SB16.h
index af4e02db8b..32b8c7712c 100644
--- a/Kernel/Devices/SB16.h
+++ b/Kernel/Devices/SB16.h
@@ -8,8 +8,8 @@
#include <Kernel/Devices/CharacterDevice.h>
#include <Kernel/Interrupts/IRQHandler.h>
+#include <Kernel/Memory/PhysicalPage.h>
#include <Kernel/PhysicalAddress.h>
-#include <Kernel/VM/PhysicalPage.h>
#include <Kernel/WaitQueue.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/AnonymousFile.cpp b/Kernel/FileSystem/AnonymousFile.cpp
index 90e4503e11..580a5906f4 100644
--- a/Kernel/FileSystem/AnonymousFile.cpp
+++ b/Kernel/FileSystem/AnonymousFile.cpp
@@ -5,8 +5,8 @@
*/
#include <Kernel/FileSystem/AnonymousFile.h>
+#include <Kernel/Memory/AnonymousVMObject.h>
#include <Kernel/Process.h>
-#include <Kernel/VM/AnonymousVMObject.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/AnonymousFile.h b/Kernel/FileSystem/AnonymousFile.h
index 1008389754..361143ba67 100644
--- a/Kernel/FileSystem/AnonymousFile.h
+++ b/Kernel/FileSystem/AnonymousFile.h
@@ -7,7 +7,7 @@
#pragma once
#include <Kernel/FileSystem/File.h>
-#include <Kernel/VM/AnonymousVMObject.h>
+#include <Kernel/Memory/AnonymousVMObject.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/FileDescription.cpp b/Kernel/FileSystem/FileDescription.cpp
index ed4a488c51..6d795f81bc 100644
--- a/Kernel/FileSystem/FileDescription.cpp
+++ b/Kernel/FileSystem/FileDescription.cpp
@@ -14,12 +14,12 @@
#include <Kernel/FileSystem/FileSystem.h>
#include <Kernel/FileSystem/InodeFile.h>
#include <Kernel/FileSystem/InodeWatcher.h>
+#include <Kernel/Memory/MemoryManager.h>
#include <Kernel/Net/Socket.h>
#include <Kernel/Process.h>
#include <Kernel/TTY/MasterPTY.h>
#include <Kernel/TTY/TTY.h>
#include <Kernel/UnixTypes.h>
-#include <Kernel/VM/MemoryManager.h>
#include <LibC/errno_numbers.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/FileSystem.cpp b/Kernel/FileSystem/FileSystem.cpp
index c88dda3352..74cb86acce 100644
--- a/Kernel/FileSystem/FileSystem.cpp
+++ b/Kernel/FileSystem/FileSystem.cpp
@@ -10,8 +10,8 @@
#include <Kernel/Arch/x86/InterruptDisabler.h>
#include <Kernel/FileSystem/FileSystem.h>
#include <Kernel/FileSystem/Inode.h>
+#include <Kernel/Memory/MemoryManager.h>
#include <Kernel/Net/LocalSocket.h>
-#include <Kernel/VM/MemoryManager.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/Inode.cpp b/Kernel/FileSystem/Inode.cpp
index abf4b1128a..37b20b1c66 100644
--- a/Kernel/FileSystem/Inode.cpp
+++ b/Kernel/FileSystem/Inode.cpp
@@ -16,9 +16,9 @@
#include <Kernel/FileSystem/InodeWatcher.h>
#include <Kernel/FileSystem/VirtualFileSystem.h>
#include <Kernel/KBufferBuilder.h>
+#include <Kernel/Memory/SharedInodeVMObject.h>
#include <Kernel/Net/LocalSocket.h>
#include <Kernel/Process.h>
-#include <Kernel/VM/SharedInodeVMObject.h>
namespace Kernel {
diff --git a/Kernel/FileSystem/InodeFile.cpp b/Kernel/FileSystem/InodeFile.cpp
index c7462ac42e..876224b165 100644
--- a/Kernel/FileSystem/InodeFile.cpp
+++ b/Kernel/FileSystem/InodeFile.cpp
@@ -9,9 +9,9 @@
#include <Kernel/FileSystem/Inode.h>
#include <Kernel/FileSystem/InodeFile.h>
#include <Kernel/FileSystem/VirtualFileSystem.h>
+#include <Kernel/Memory/PrivateInodeVMObject.h>
+#include <Kernel/Memory/SharedInodeVMObject.h>
#include <Kernel/Process.h>
-#include <Kernel/VM/PrivateInodeVMObject.h>
-#include <Kernel/VM/SharedInodeVMObject.h>
#include <LibC/errno_numbers.h>
#include <LibC/sys/ioctl_numbers.h>
diff --git a/Kernel/FutexQueue.h b/Kernel/FutexQueue.h
index bc61ed66cd..cc8a144f99 100644
--- a/Kernel/FutexQueue.h
+++ b/Kernel/FutexQueue.h
@@ -8,9 +8,9 @@
#include <AK/Atomic.h>
#include <AK/RefCounted.h>
+#include <Kernel/Memory/VMObject.h>
#include <Kernel/SpinLock.h>
#include <Kernel/Thread.h>
-#include <Kernel/VM/VMObject.h>
namespace Kernel {
diff --git a/Kernel/Graphics/Bochs/GraphicsAdapter.cpp b/Kernel/Graphics/Bochs/GraphicsAdapter.cpp
index 8a2367a5ed..0c6df23049 100644
--- a/Kernel/Graphics/Bochs/GraphicsAdapter.cpp
+++ b/Kernel/Graphics/Bochs/GraphicsAdapter.cpp
@@ -13,8 +13,8 @@
#include <Kernel/Graphics/Console/ContiguousFramebufferConsole.h>
#include <Kernel/Graphics/GraphicsManagement.h>
#include <Kernel/IO.h>
+#include <Kernel/Memory/TypedMapping.h>
#include <Kernel/Sections.h>
-#include <Kernel/VM/TypedMapping.h>
#define VBE_DISPI_IOPORT_INDEX 0x01CE
#define VBE_DISPI_IOPORT_DATA 0x01CF
diff --git a/Kernel/Graphics/Bochs/GraphicsAdapter.h b/Kernel/Graphics/Bochs/GraphicsAdapter.h
index 993a7ae2f8..a10c3f1fb4 100644
--- a/Kernel/Graphics/Bochs/GraphicsAdapter.h
+++ b/Kernel/Graphics/Bochs/GraphicsAdapter.h
@@ -12,8 +12,8 @@
#include <Kernel/Graphics/Console/GenericFramebufferConsole.h>
#include <Kernel/Graphics/FramebufferDevice.h>
#include <Kernel/Graphics/GraphicsDevice.h>
+#include <Kernel/Memory/TypedMapping.h>
#include <Kernel/PhysicalAddress.h>
-#include <Kernel/VM/TypedMapping.h>
namespace Kernel {
diff --git a/Kernel/Graphics/FramebufferDevice.cpp b/Kernel/Graphics/FramebufferDevice.cpp
index a283797375..e4a1061a43 100644
--- a/Kernel/Graphics/FramebufferDevice.cpp
+++ b/Kernel/Graphics/FramebufferDevice.cpp
@@ -8,10 +8,10 @@
#include <Kernel/Debug.h>
#include <Kernel/Graphics/FramebufferDevice.h>
#include <Kernel/Graphics/GraphicsManagement.h>
+#include <Kernel/Memory/AnonymousVMObject.h>
+#include <Kernel/Memory/MemoryManager.h>
#include <Kernel/Process.h>
#include <Kernel/Sections.h>
-#include <Kernel/VM/AnonymousVMObject.h>
-#include <Kernel/VM/MemoryManager.h>
#include <LibC/errno_numbers.h>
#include <LibC/sys/ioctl_numbers.h>
diff --git a/Kernel/Graphics/FramebufferDevice.h b/Kernel/Graphics/FramebufferDevice.h
index 60e130461a..e240d10a41 100644
--- a/Kernel/Graphics/FramebufferDevice.h
+++ b/Kernel/Graphics/FramebufferDevice.h
@@ -11,9 +11,9 @@
#include <AK/Types.h>
#include <Kernel/Devices/BlockDevice.h>
#include <Kernel/Graphics/GraphicsDevice.h>
+#include <Kernel/Memory/AnonymousVMObject.h>
#include <Kernel/PhysicalAddress.h>
#include <Kernel/SpinLock.h>
-#include <Kernel/VM/AnonymousVMObject.h>
namespace Kernel {
diff --git a/Kernel/Graphics/GraphicsManagement.cpp b/Kernel/Graphics/GraphicsManagement.cpp
index 3b77b17836..5e5b4b63a5 100644
--- a/Kernel/Graphics/GraphicsManagement.cpp
+++ b/Kernel/Graphics/GraphicsManagement.cpp
@@ -13,9 +13,9 @@
#include <Kernel/Graphics/VGACompatibleAdapter.h>
#include <Kernel/Graphics/VirtIOGPU/GraphicsAdapter.h>
#include <Kernel/IO.h>
+#include <Kernel/Memory/AnonymousVMObject.h>
#include <Kernel/Multiboot.h>
#include <Kernel/Sections.h>
-#include <Kernel/VM/AnonymousVMObject.h>
namespace Kernel {
diff --git a/Kernel/Graphics/GraphicsManagement.h b/Kernel/Graphics/GraphicsManagement.h
index 8ecc31447f..ca39d787b6 100644
--- a/Kernel/Graphics/GraphicsManagement.h
+++ b/Kernel/Graphics/GraphicsManagement.h
@@ -15,7 +15,7 @@
#include <Kernel/Graphics/GraphicsDevice.h>
#include <Kernel/Graphics/VGACompatibleAdapter.h>
#include <Kernel/Graphics/VirtIOGPU/GraphicsAdapter.h>
-#include <Kernel/VM/Region.h>
+#include <Kernel/Memory/Region.h>
namespace Kernel {
diff --git a/Kernel/Heap/SlabAllocator.cpp b/Kernel/Heap/SlabAllocator.cpp
index a7a19de3c2..4057cbafcc 100644
--- a/Kernel/Heap/SlabAllocator.cpp
+++ b/Kernel/Heap/SlabAllocator.cpp
@@ -8,8 +8,8 @@
#include <AK/Memory.h>
#include <Kernel/Heap/SlabAllocator.h>
#include <Kernel/Heap/kmalloc.h>
+#include <Kernel/Memory/Region.h>
#include <Kernel/Sections.h>
-#include <Kernel/VM/Region.h>
#define SANITIZE_SLABS
diff --git a/Kernel/Heap/kmalloc.cpp b/Kernel/Heap/kmalloc.cpp
index 4546f43c15..89257ee798 100644
--- a/Kernel/Heap/kmalloc.cpp
+++ b/Kernel/Heap/kmalloc.cpp
@@ -16,12 +16,12 @@
#include <Kernel/Heap/Heap.h>
#include <Kernel/Heap/kmalloc.h>
#include <Kernel/KSyms.h>
+#include <Kernel/Memory/MemoryManager.h>
#include <Kernel/Panic.h>
#include <Kernel/PerformanceManager.h>
#include <Kernel/Sections.h>
#include <Kernel/SpinLock.h>
#include <Kernel/StdLib.h>
-#include <Kernel/VM/MemoryManager.h>
#define CHUNK_SIZE 32
#define POOL_SIZE (2 * MiB)
diff --git a/Kernel/Interrupts/APIC.cpp b/Kernel/Interrupts/APIC.cpp
index 5122f52fe7..714c85791e 100644
--- a/Kernel/Interrupts/APIC.cpp
+++ b/Kernel/Interrupts/APIC.cpp
@@ -15,13 +15,13 @@
#include <Kernel/IO.h>
#include <Kernel/Interrupts/APIC.h>
#include <Kernel/Interrupts/SpuriousInterruptHandler.h>
+#include <Kernel/Memory/MemoryManager.h>
+#include <Kernel/Memory/PageDirectory.h>
+#include <Kernel/Memory/TypedMapping.h>
#include <Kernel/Panic.h>
#include <Kernel/Sections.h>
#include <Kernel/Thread.h>
#include <Kernel/Time/APICTimer.h>
-#include <Kernel/VM/MemoryManager.h>
-#include <Kernel/VM/PageDirectory.h>
-#include <Kernel/VM/TypedMapping.h>
#define IRQ_APIC_TIMER (0xfc - IRQ_VECTOR_BASE)
#define IRQ_APIC_IPI (0xfd - IRQ_VECTOR_BASE)
diff --git a/Kernel/Interrupts/APIC.h b/Kernel/Interrupts/APIC.h
index ba1c983827..507dd8e0b2 100644
--- a/Kernel/Interrupts/APIC.h
+++ b/Kernel/Interrupts/APIC.h
@@ -7,8 +7,8 @@
#pragma once
#include <AK/Types.h>
+#include <Kernel/Memory/MemoryManager.h>
#include <Kernel/Time/HardwareTimer.h>
-#include <Kernel/VM/MemoryManager.h>
namespace Kernel {
diff --git a/Kernel/Interrupts/IOAPIC.h b/Kernel/Interrupts/IOAPIC.h
index c5dca40d80..1e71e78a32 100644
--- a/Kernel/Interrupts/IOAPIC.h
+++ b/Kernel/Interrupts/IOAPIC.h
@@ -7,7 +7,7 @@
#pragma once
#include <Kernel/Interrupts/IRQController.h>
-#include <Kernel/VM/TypedMapping.h>
+#include <Kernel/Memory/TypedMapping.h>
namespace Kernel {
struct [[gnu::packed]] ioapic_mmio_regs {
diff --git a/Kernel/Interrupts/InterruptManagement.cpp b/Kernel/Interrupts/InterruptManagement.cpp
index c7e277226a..0101e1fd6e 100644
--- a/Kernel/Interrupts/InterruptManagement.cpp
+++ b/Kernel/Interrupts/InterruptManagement.cpp
@@ -16,8 +16,8 @@
#include <Kernel/Interrupts/PIC.h>
#include <Kernel/Interrupts/SharedIRQHandler.h>
#include <Kernel/Interrupts/SpuriousInterruptHandler.h>
+#include <Kernel/Memory/TypedMapping.h>
#include <Kernel/Sections.h>
-#include <Kernel/VM/TypedMapping.h>
#define PCAT_COMPAT_FLAG 0x1
diff --git a/Kernel/KBuffer.h b/Kernel/KBuffer.h
index 4730faf4bc..218925f216 100644
--- a/Kernel/KBuffer.h
+++ b/Kernel/KBuffer.h
@@ -20,8 +20,8 @@
#include <AK/ByteBuffer.h>
#include <AK/Memory.h>
#include <AK/StringView.h>
-#include <Kernel/VM/MemoryManager.h>
-#include <Kernel/VM/Region.h>
+#include <Kernel/Memory/MemoryManager.h>
+#include <Kernel/Memory/Region.h>
namespace Kernel {
diff --git a/Kernel/VM/AllocationStrategy.h b/Kernel/Memory/AllocationStrategy.h
index 28cff4c9c0..28cff4c9c0 100644
--- a/Kernel/VM/AllocationStrategy.h
+++ b/Kernel/Memory/AllocationStrategy.h
diff --git a/Kernel/VM/AnonymousVMObject.cpp b/Kernel/Memory/AnonymousVMObject.cpp
index 8602567693..7c34d57c31 100644
--- a/Kernel/VM/AnonymousVMObject.cpp
+++ b/Kernel/Memory/AnonymousVMObject.cpp
@@ -6,10 +6,10 @@
#include <Kernel/Arch/x86/SmapDisabler.h>
#include <Kernel/Debug.h>
+#include <Kernel/Memory/AnonymousVMObject.h>
+#include <Kernel/Memory/MemoryManager.h>
+#include <Kernel/Memory/PhysicalPage.h>
#include <Kernel/Process.h>
-#include <Kernel/VM/AnonymousVMObject.h>
-#include <Kernel/VM/MemoryManager.h>
-#include <Kernel/VM/PhysicalPage.h>
namespace Kernel {
diff --git a/Kernel/VM/AnonymousVMObject.h b/Kernel/Memory/AnonymousVMObject.h
index 0a6d38aadd..a0b4082c7e 100644
--- a/Kernel/VM/AnonymousVMObject.h
+++ b/Kernel/Memory/AnonymousVMObject.h
@@ -6,11 +6,11 @@
#pragma once
+#include <Kernel/Memory/AllocationStrategy.h>
+#include <Kernel/Memory/MemoryManager.h>
+#include <Kernel/Memory/PageFaultResponse.h>
+#include <Kernel/Memory/VMObject.h>
#include <Kernel/PhysicalAddress.h>
-#include <Kernel/VM/AllocationStrategy.h>
-#include <Kernel/VM/MemoryManager.h>
-#include <Kernel/VM/PageFaultResponse.h>
-#include <Kernel/VM/VMObject.h>
namespace Kernel {
diff --git a/Kernel/VM/InodeVMObject.cpp b/Kernel/Memory/InodeVMObject.cpp
index 3ad2ac3d7d..44392cf616 100644
--- a/Kernel/VM/InodeVMObject.cpp
+++ b/Kernel/Memory/InodeVMObject.cpp
@@ -5,7 +5,7 @@
*/
#include <Kernel/FileSystem/Inode.h>
-#include <Kernel/VM/InodeVMObject.h>
+#include <Kernel/Memory/InodeVMObject.h>
namespace Kernel {
diff --git a/Kernel/VM/InodeVMObject.h b/Kernel/Memory/InodeVMObject.h
index 85cde2ca1b..f2f72ce577 100644
--- a/Kernel/VM/InodeVMObject.h
+++ b/Kernel/Memory/InodeVMObject.h
@@ -7,8 +7,8 @@
#pragma once
#include <AK/Bitmap.h>
+#include <Kernel/Memory/VMObject.h>
#include <Kernel/UnixTypes.h>
-#include <Kernel/VM/VMObject.h>
namespace Kernel {
diff --git a/Kernel/VM/MappedROM.h b/Kernel/Memory/MappedROM.h
index e00d47a0cf..9f377df1b6 100644
--- a/Kernel/VM/MappedROM.h
+++ b/Kernel/Memory/MappedROM.h
@@ -7,8 +7,8 @@
#pragma once
#include <AK/OwnPtr.h>
+#include <Kernel/Memory/Region.h>
#include <Kernel/PhysicalAddress.h>
-#include <Kernel/VM/Region.h>
namespace Kernel {
diff --git a/Kernel/VM/MemoryManager.cpp b/Kernel/Memory/MemoryManager.cpp
index 239b95ad39..08fde5429b 100644
--- a/Kernel/VM/MemoryManager.cpp
+++ b/Kernel/Memory/MemoryManager.cpp
@@ -11,16 +11,16 @@
#include <Kernel/CMOS.h>
#include <Kernel/FileSystem/Inode.h>
#include <Kernel/Heap/kmalloc.h>
+#include <Kernel/Memory/AnonymousVMObject.h>
+#include <Kernel/Memory/MemoryManager.h>
+#include <Kernel/Memory/PageDirectory.h>
+#include <Kernel/Memory/PhysicalRegion.h>
+#include <Kernel/Memory/SharedInodeVMObject.h>
#include <Kernel/Multiboot.h>
#include <Kernel/Panic.h>
#include <Kernel/Process.h>
#include <Kernel/Sections.h>
#include <Kernel/StdLib.h>
-#include <Kernel/VM/AnonymousVMObject.h>
-#include <Kernel/VM/MemoryManager.h>
-#include <Kernel/VM/PageDirectory.h>
-#include <Kernel/VM/PhysicalRegion.h>
-#include <Kernel/VM/SharedInodeVMObject.h>
extern u8 start_of_kernel_image[];
extern u8 end_of_kernel_image[];
diff --git a/Kernel/VM/MemoryManager.h b/Kernel/Memory/MemoryManager.h
index 20aafea3d4..1067e6e2d1 100644
--- a/Kernel/VM/MemoryManager.h
+++ b/Kernel/Memory/MemoryManager.h
@@ -14,12 +14,12 @@
#include <Kernel/Arch/x86/PageFault.h>
#include <Kernel/Arch/x86/TrapFrame.h>
#include <Kernel/Forward.h>
+#include <Kernel/Memory/AllocationStrategy.h>
+#include <Kernel/Memory/PhysicalPage.h>
+#include <Kernel/Memory/PhysicalRegion.h>
+#include <Kernel/Memory/Region.h>
+#include <Kernel/Memory/VMObject.h>
#include <Kernel/SpinLock.h>
-#include <Kernel/VM/AllocationStrategy.h>
-#include <Kernel/VM/PhysicalPage.h>
-#include <Kernel/VM/PhysicalRegion.h>
-#include <Kernel/VM/Region.h>
-#include <Kernel/VM/VMObject.h>
namespace Kernel {
diff --git a/Kernel/VM/PageDirectory.cpp b/Kernel/Memory/PageDirectory.cpp
index b49c6f3987..3b5fb07f08 100644
--- a/Kernel/VM/PageDirectory.cpp
+++ b/Kernel/Memory/PageDirectory.cpp
@@ -6,12 +6,12 @@
#include <AK/Memory.h>
#include <AK/Singleton.h>
+#include <Kernel/Memory/MemoryManager.h>
+#include <Kernel/Memory/PageDirectory.h>
#include <Kernel/Prekernel/Prekernel.h>
#include <Kernel/Process.h>
#include <Kernel/Random.h>
#include <Kernel/Sections.h>
-#include <Kernel/VM/MemoryManager.h>
-#include <Kernel/VM/PageDirectory.h>
extern u8 end_of_kernel_image[];
diff --git a/Kernel/VM/PageDirectory.h b/Kernel/Memory/PageDirectory.h
index 28832056ea..2caabdc79e 100644
--- a/Kernel/VM/PageDirectory.h
+++ b/Kernel/Memory/PageDirectory.h
@@ -10,8 +10,8 @@
#include <AK/RefCounted.h>
#include <AK/RefPtr.h>
#include <Kernel/Forward.h>
-#include <Kernel/VM/PhysicalPage.h>
-#include <Kernel/VM/RangeAllocator.h>
+#include <Kernel/Memory/PhysicalPage.h>
+#include <Kernel/Memory/RangeAllocator.h>
namespace Kernel {
diff --git a/Kernel/VM/PageFaultResponse.h b/Kernel/Memory/PageFaultResponse.h
index 56297f6268..56297f6268 100644
--- a/Kernel/VM/PageFaultResponse.h
+++ b/Kernel/Memory/PageFaultResponse.h
diff --git a/Kernel/VM/PhysicalPage.cpp b/Kernel/Memory/PhysicalPage.cpp
index bc215c6b5d..fda876dc0d 100644
--- a/Kernel/VM/PhysicalPage.cpp
+++ b/Kernel/Memory/PhysicalPage.cpp
@@ -5,8 +5,8 @@
*/
#include <Kernel/Heap/kmalloc.h>
-#include <Kernel/VM/MemoryManager.h>
-#include <Kernel/VM/PhysicalPage.h>
+#include <Kernel/Memory/MemoryManager.h>
+#include <Kernel/Memory/PhysicalPage.h>
namespace Kernel {
diff --git a/Kernel/VM/PhysicalPage.h b/Kernel/Memory/PhysicalPage.h
index ab22be3534..ab22be3534 100644
--- a/Kernel/VM/PhysicalPage.h
+++ b/Kernel/Memory/PhysicalPage.h
diff --git a/Kernel/VM/PhysicalRegion.cpp b/Kernel/Memory/PhysicalRegion.cpp
index 42b5c7022b..f778fdfa39 100644
--- a/Kernel/VM/PhysicalRegion.cpp
+++ b/Kernel/Memory/PhysicalRegion.cpp
@@ -7,10 +7,10 @@
#include <AK/NonnullRefPtr.h>
#include <AK/RefPtr.h>
#include <Kernel/Assertions.h>
+#include <Kernel/Memory/MemoryManager.h>
+#include <Kernel/Memory/PhysicalRegion.h>
+#include <Kernel/Memory/PhysicalZone.h>
#include <Kernel/Random.h>
-#include <Kernel/VM/MemoryManager.h>
-#include <Kernel/VM/PhysicalRegion.h>
-#include <Kernel/VM/PhysicalZone.h>
namespace Kernel {
diff --git a/Kernel/VM/PhysicalRegion.h b/Kernel/Memory/PhysicalRegion.h
index c6962768c8..ba7b4957b9 100644
--- a/Kernel/VM/PhysicalRegion.h
+++ b/Kernel/Memory/PhysicalRegion.h
@@ -7,8 +7,8 @@
#pragma once
#include <AK/OwnPtr.h>
-#include <Kernel/VM/PhysicalPage.h>
-#include <Kernel/VM/PhysicalZone.h>
+#include <Kernel/Memory/PhysicalPage.h>
+#include <Kernel/Memory/PhysicalZone.h>
namespace Kernel {
diff --git a/Kernel/VM/PhysicalZone.cpp b/Kernel/Memory/PhysicalZone.cpp
index 180f14fef8..71cb9624ed 100644
--- a/Kernel/VM/PhysicalZone.cpp
+++ b/Kernel/Memory/PhysicalZone.cpp
@@ -5,9 +5,9 @@
*/
#include <AK/Format.h>
-#include <Kernel/VM/MemoryManager.h>
-#include <Kernel/VM/PhysicalPage.h>
-#include <Kernel/VM/PhysicalZone.h>
+#include <Kernel/Memory/MemoryManager.h>
+#include <Kernel/Memory/PhysicalPage.h>
+#include <Kernel/Memory/PhysicalZone.h>
namespace Kernel {
diff --git a/Kernel/VM/PhysicalZone.h b/Kernel/Memory/PhysicalZone.h
index bd3bba924e..bd3bba924e 100644
--- a/Kernel/VM/PhysicalZone.h
+++ b/Kernel/Memory/PhysicalZone.h
diff --git a/Kernel/VM/PrivateInodeVMObject.cpp b/Kernel/Memory/PrivateInodeVMObject.cpp
index c000fb4e14..143b351c00 100644
--- a/Kernel/VM/PrivateInodeVMObject.cpp
+++ b/Kernel/Memory/PrivateInodeVMObject.cpp
@@ -5,7 +5,7 @@
*/
#include <Kernel/FileSystem/Inode.h>
-#include <Kernel/VM/PrivateInodeVMObject.h>
+#include <Kernel/Memory/PrivateInodeVMObject.h>
namespace Kernel {
diff --git a/Kernel/VM/PrivateInodeVMObject.h b/Kernel/Memory/PrivateInodeVMObject.h
index 55b80680f8..5e8c8f1372 100644
--- a/Kernel/VM/PrivateInodeVMObject.h
+++ b/Kernel/Memory/PrivateInodeVMObject.h
@@ -7,8 +7,8 @@
#pragma once
#include <AK/Bitmap.h>
+#include <Kernel/Memory/InodeVMObject.h>
#include <Kernel/UnixTypes.h>
-#include <Kernel/VM/InodeVMObject.h>
namespace Kernel {
diff --git a/Kernel/VM/ProcessPagingScope.cpp b/Kernel/Memory/ProcessPagingScope.cpp
index 9d018e35d8..a9a4dbd1a9 100644
--- a/Kernel/VM/ProcessPagingScope.cpp
+++ b/Kernel/Memory/ProcessPagingScope.cpp
@@ -5,8 +5,8 @@
*/
#include <Kernel/Arch/x86/InterruptDisabler.h>
-#include <Kernel/VM/MemoryManager.h>
-#include <Kernel/VM/ProcessPagingScope.h>
+#include <Kernel/Memory/MemoryManager.h>
+#include <Kernel/Memory/ProcessPagingScope.h>
namespace Kernel {
diff --git a/Kernel/VM/ProcessPagingScope.h b/Kernel/Memory/ProcessPagingScope.h
index c2b88a896b..c2b88a896b 100644
--- a/Kernel/VM/ProcessPagingScope.h
+++ b/Kernel/Memory/ProcessPagingScope.h
diff --git a/Kernel/VM/Range.cpp b/Kernel/Memory/Range.cpp
index 4dc3c01bbc..4b8ad0912d 100644
--- a/Kernel/VM/Range.cpp
+++ b/Kernel/Memory/Range.cpp
@@ -6,8 +6,8 @@
*/
#include <AK/Vector.h>
-#include <Kernel/VM/MemoryManager.h>
-#include <Kernel/VM/Range.h>
+#include <Kernel/Memory/MemoryManager.h>
+#include <Kernel/Memory/Range.h>
#include <LibC/limits.h>
namespace Kernel {
diff --git a/Kernel/VM/Range.h b/Kernel/Memory/Range.h
index e9693a44dd..c2305acedc 100644
--- a/Kernel/VM/Range.h
+++ b/Kernel/Memory/Range.h
@@ -7,6 +7,7 @@
#pragma once
+#include <Kernel/KResult.h>
#include <Kernel/VirtualAddress.h>
namespace Kernel {
diff --git a/Kernel/VM/RangeAllocator.cpp b/Kernel/Memory/RangeAllocator.cpp
index 3ab88abdea..2014c22e34 100644
--- a/Kernel/VM/RangeAllocator.cpp
+++ b/Kernel/Memory/RangeAllocator.cpp
@@ -5,8 +5,8 @@
*/
#include <AK/Checked.h>
+#include <Kernel/Memory/RangeAllocator.h>
#include <Kernel/Random.h>
-#include <Kernel/VM/RangeAllocator.h>
#define VM_GUARD_PAGES
diff --git a/Kernel/VM/RangeAllocator.h b/Kernel/Memory/RangeAllocator.h
index c7e2962f2b..c299e08ef3 100644
--- a/Kernel/VM/RangeAllocator.h
+++ b/Kernel/Memory/RangeAllocator.h
@@ -8,8 +8,8 @@
#include <AK/RedBlackTree.h>
#include <AK/Traits.h>
+#include <Kernel/Memory/Range.h>
#include <Kernel/SpinLock.h>
-#include <Kernel/VM/Range.h>
namespace Kernel {
diff --git a/Kernel/VM/Region.cpp b/Kernel/Memory/Region.cpp
index cbe625aa64..0c63bea8d0 100644
--- a/Kernel/VM/Region.cpp
+++ b/Kernel/Memory/Region.cpp
@@ -8,14 +8,14 @@
#include <AK/StringView.h>
#include <Kernel/Debug.h>
#include <Kernel/FileSystem/Inode.h>
+#include <Kernel/Memory/AnonymousVMObject.h>
+#include <Kernel/Memory/MemoryManager.h>
+#include <Kernel/Memory/PageDirectory.h>
+#include <Kernel/Memory/Region.h>
+#include <Kernel/Memory/SharedInodeVMObject.h>
#include <Kernel/Panic.h>
#include <Kernel/Process.h>
#include <Kernel/Thread.h>
-#include <Kernel/VM/AnonymousVMObject.h>
-#include <Kernel/VM/MemoryManager.h>
-#include <Kernel/VM/PageDirectory.h>
-#include <Kernel/VM/Region.h>
-#include <Kernel/VM/SharedInodeVMObject.h>
namespace Kernel {
diff --git a/Kernel/VM/Region.h b/Kernel/Memory/Region.h
index e312e98a04..38cecb474c 100644
--- a/Kernel/VM/Region.h
+++ b/Kernel/Memory/Region.h
@@ -13,10 +13,10 @@
#include <Kernel/Forward.h>
#include <Kernel/Heap/SlabAllocator.h>
#include <Kernel/KString.h>
+#include <Kernel/Memory/PageFaultResponse.h>
+#include <Kernel/Memory/RangeAllocator.h>
#include <Kernel/Sections.h>
#include <Kernel/UnixTypes.h>
-#include <Kernel/VM/PageFaultResponse.h>
-#include <Kernel/VM/RangeAllocator.h>
namespace Kernel {
diff --git a/Kernel/VM/RingBuffer.cpp b/Kernel/Memory/RingBuffer.cpp
index bfaa8da326..9c62a53a9d 100644
--- a/Kernel/VM/RingBuffer.cpp
+++ b/Kernel/Memory/RingBuffer.cpp
@@ -4,9 +4,9 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
+#include <Kernel/Memory/MemoryManager.h>
+#include <Kernel/Memory/RingBuffer.h>
#include <Kernel/UserOrKernelBuffer.h>
-#include <Kernel/VM/MemoryManager.h>
-#include <Kernel/VM/RingBuffer.h>
namespace Kernel {
diff --git a/Kernel/VM/RingBuffer.h b/Kernel/Memory/RingBuffer.h
index 8a748e4b65..8a748e4b65 100644
--- a/Kernel/VM/RingBuffer.h
+++ b/Kernel/Memory/RingBuffer.h
diff --git a/Kernel/VM/ScatterGatherList.cpp b/Kernel/Memory/ScatterGatherList.cpp
index 9bca559616..c3b65f31df 100644
--- a/Kernel/VM/ScatterGatherList.cpp
+++ b/Kernel/Memory/ScatterGatherList.cpp
@@ -4,7 +4,7 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
-#include <Kernel/VM/ScatterGatherList.h>
+#include <Kernel/Memory/ScatterGatherList.h>
namespace Kernel {
diff --git a/Kernel/VM/ScatterGatherList.h b/Kernel/Memory/ScatterGatherList.h
index 1a087095c2..a94ce00b72 100644
--- a/Kernel/VM/ScatterGatherList.h
+++ b/Kernel/Memory/ScatterGatherList.h
@@ -8,9 +8,9 @@
#include <AK/Vector.h>
#include <Kernel/Devices/BlockDevice.h>
+#include <Kernel/Memory/AnonymousVMObject.h>
+#include <Kernel/Memory/MemoryManager.h>
#include <Kernel/PhysicalAddress.h>
-#include <Kernel/VM/AnonymousVMObject.h>
-#include <Kernel/VM/MemoryManager.h>
namespace Kernel {
diff --git a/Kernel/VM/SharedInodeVMObject.cpp b/Kernel/Memory/SharedInodeVMObject.cpp
index e603f70504..1c8c7b2ae3 100644
--- a/Kernel/VM/SharedInodeVMObject.cpp
+++ b/Kernel/Memory/SharedInodeVMObject.cpp
@@ -5,7 +5,7 @@
*/
#include <Kernel/FileSystem/Inode.h>
-#include <Kernel/VM/SharedInodeVMObject.h>
+#include <Kernel/Memory/SharedInodeVMObject.h>
namespace Kernel {
diff --git a/Kernel/VM/SharedInodeVMObject.h b/Kernel/Memory/SharedInodeVMObject.h
index ef5b828b5e..05fb8968eb 100644
--- a/Kernel/VM/SharedInodeVMObject.h
+++ b/Kernel/Memory/SharedInodeVMObject.h
@@ -7,8 +7,8 @@
#pragma once
#include <AK/Bitmap.h>
+#include <Kernel/Memory/InodeVMObject.h>
#include <Kernel/UnixTypes.h>
-#include <Kernel/VM/InodeVMObject.h>
namespace Kernel {
diff --git a/Kernel/VM/Space.cpp b/Kernel/Memory/Space.cpp
index 9196bfe78b..63fcf1814f 100644
--- a/Kernel/VM/Space.cpp
+++ b/Kernel/Memory/Space.cpp
@@ -5,13 +5,13 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
+#include <Kernel/Memory/AnonymousVMObject.h>
+#include <Kernel/Memory/InodeVMObject.h>
+#include <Kernel/Memory/MemoryManager.h>
+#include <Kernel/Memory/Space.h>
#include <Kernel/PerformanceManager.h>
#include <Kernel/Process.h>
#include <Kernel/SpinLock.h>
-#include <Kernel/VM/AnonymousVMObject.h>
-#include <Kernel/VM/InodeVMObject.h>
-#include <Kernel/VM/MemoryManager.h>
-#include <Kernel/VM/Space.h>
namespace Kernel {
diff --git a/Kernel/VM/Space.h b/Kernel/Memory/Space.h
index 4efa5f53fa..cdd8d51a01 100644
--- a/Kernel/VM/Space.h
+++ b/Kernel/Memory/Space.h
@@ -10,9 +10,9 @@
#include <AK/RedBlackTree.h>
#include <AK/Vector.h>
#include <AK/WeakPtr.h>
+#include <Kernel/Memory/AllocationStrategy.h>
+#include <Kernel/Memory/PageDirectory.h>
#include <Kernel/UnixTypes.h>
-#include <Kernel/VM/AllocationStrategy.h>
-#include <Kernel/VM/PageDirectory.h>
namespace Kernel {
diff --git a/Kernel/VM/TypedMapping.h b/Kernel/Memory/TypedMapping.h
index b9cc3ac36c..ebc9c33770 100644
--- a/Kernel/VM/TypedMapping.h
+++ b/Kernel/Memory/TypedMapping.h
@@ -7,7 +7,7 @@
#pragma once
#include <AK/StringView.h>
-#include <Kernel/VM/MemoryManager.h>
+#include <Kernel/Memory/MemoryManager.h>
namespace Kernel {
diff --git a/Kernel/VM/VMObject.cpp b/Kernel/Memory/VMObject.cpp
index fd22c92c7f..b5e0459d48 100644
--- a/Kernel/VM/VMObject.cpp
+++ b/Kernel/Memory/VMObject.cpp
@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
-#include <Kernel/VM/MemoryManager.h>
-#include <Kernel/VM/VMObject.h>
+#include <Kernel/Memory/MemoryManager.h>
+#include <Kernel/Memory/VMObject.h>
namespace Kernel {
diff --git a/Kernel/VM/VMObject.h b/Kernel/Memory/VMObject.h
index 45a5976af8..0184533325 100644
--- a/Kernel/VM/VMObject.h
+++ b/Kernel/Memory/VMObject.h
@@ -14,8 +14,8 @@
#include <AK/Vector.h>
#include <AK/Weakable.h>
#include <Kernel/Forward.h>
+#include <Kernel/Memory/Region.h>
#include <Kernel/Mutex.h>
-#include <Kernel/VM/Region.h>
namespace Kernel {
diff --git a/Kernel/Net/NetworkingManagement.cpp b/Kernel/Net/NetworkingManagement.cpp
index f05ef83f00..a01be93f82 100644
--- a/Kernel/Net/NetworkingManagement.cpp
+++ b/Kernel/Net/NetworkingManagement.cpp
@@ -7,6 +7,7 @@
#include <AK/Singleton.h>
#include <Kernel/CommandLine.h>
#include <Kernel/IO.h>
+#include <Kernel/Memory/AnonymousVMObject.h>
#include <Kernel/Multiboot.h>
#include <Kernel/Net/E1000ENetworkAdapter.h>
#include <Kernel/Net/E1000NetworkAdapter.h>
@@ -16,7 +17,6 @@
#include <Kernel/Net/RTL8139NetworkAdapter.h>
#include <Kernel/Net/RTL8168NetworkAdapter.h>
#include <Kernel/Sections.h>
-#include <Kernel/VM/AnonymousVMObject.h>
namespace Kernel {
diff --git a/Kernel/Net/NetworkingManagement.h b/Kernel/Net/NetworkingManagement.h
index a7ea001bcc..6669d54a2a 100644
--- a/Kernel/Net/NetworkingManagement.h
+++ b/Kernel/Net/NetworkingManagement.h
@@ -12,7 +12,7 @@
#include <AK/NonnullRefPtrVector.h>
#include <AK/Types.h>
#include <Kernel/Bus/PCI/Definitions.h>
-#include <Kernel/VM/Region.h>
+#include <Kernel/Memory/Region.h>
namespace Kernel {
diff --git a/Kernel/Process.cpp b/Kernel/Process.cpp
index 5c5dc8c3c9..e0a4f799a6 100644
--- a/Kernel/Process.cpp
+++ b/Kernel/Process.cpp
@@ -21,6 +21,9 @@
#include <Kernel/FileSystem/VirtualFileSystem.h>
#include <Kernel/KBufferBuilder.h>
#include <Kernel/KSyms.h>
+#include <Kernel/Memory/AnonymousVMObject.h>
+#include <Kernel/Memory/PageDirectory.h>
+#include <Kernel/Memory/SharedInodeVMObject.h>
#include <Kernel/Module.h>
#include <Kernel/PerformanceEventBuffer.h>
#include <Kernel/PerformanceManager.h>
@@ -32,9 +35,6 @@
#include <Kernel/TTY/TTY.h>
#include <Kernel/Thread.h>
#include <Kernel/ThreadTracer.h>
-#include <Kernel/VM/AnonymousVMObject.h>
-#include <Kernel/VM/PageDirectory.h>
-#include <Kernel/VM/SharedInodeVMObject.h>
#include <LibC/errno_numbers.h>
#include <LibC/limits.h>
diff --git a/Kernel/Process.h b/Kernel/Process.h
index c50a714d8b..b252fa702b 100644
--- a/Kernel/Process.h
+++ b/Kernel/Process.h
@@ -20,6 +20,7 @@
#include <Kernel/FileSystem/InodeMetadata.h>
#include <Kernel/Forward.h>
#include <Kernel/FutexQueue.h>
+#include <Kernel/Memory/Space.h>
#include <Kernel/Mutex.h>
#include <Kernel/PerformanceEventBuffer.h>
#include <Kernel/ProcessGroup.h>
@@ -27,7 +28,6 @@
#include <Kernel/Thread.h>
#include <Kernel/UnixTypes.h>
#include <Kernel/UnveilNode.h>
-#include <Kernel/VM/Space.h>
#include <LibC/elf.h>
#include <LibC/signal_numbers.h>
diff --git a/Kernel/ProcessSpecificExposed.cpp b/Kernel/ProcessSpecificExposed.cpp
index 5b2feebf63..046dd88032 100644
--- a/Kernel/ProcessSpecificExposed.cpp
+++ b/Kernel/ProcessSpecificExposed.cpp
@@ -10,9 +10,9 @@
#include <Kernel/Arch/x86/InterruptDisabler.h>
#include <Kernel/FileSystem/Custody.h>
#include <Kernel/KBufferBuilder.h>
+#include <Kernel/Memory/AnonymousVMObject.h>
+#include <Kernel/Memory/MemoryManager.h>
#include <Kernel/ProcessExposed.h>
-#include <Kernel/VM/AnonymousVMObject.h>
-#include <Kernel/VM/MemoryManager.h>
namespace Kernel {
diff --git a/Kernel/StdLib.cpp b/Kernel/StdLib.cpp
index a4487d36c6..c4460918d3 100644
--- a/Kernel/StdLib.cpp
+++ b/Kernel/StdLib.cpp
@@ -10,8 +10,8 @@
#include <AK/Types.h>
#include <Kernel/Arch/x86/SmapDisabler.h>
#include <Kernel/Heap/kmalloc.h>
+#include <Kernel/Memory/MemoryManager.h>
#include <Kernel/StdLib.h>
-#include <Kernel/VM/MemoryManager.h>
String copy_string_from_user(const char* user_str, size_t user_str_size)
{
diff --git a/Kernel/Storage/AHCIController.cpp b/Kernel/Storage/AHCIController.cpp
index a89e725ac5..f71172592d 100644
--- a/Kernel/Storage/AHCIController.cpp
+++ b/Kernel/Storage/AHCIController.cpp
@@ -8,9 +8,9 @@
#include <AK/OwnPtr.h>
#include <AK/RefPtr.h>
#include <AK/Types.h>
+#include <Kernel/Memory/MemoryManager.h>
#include <Kernel/Storage/AHCIController.h>
#include <Kernel/Storage/SATADiskDevice.h>
-#include <Kernel/VM/MemoryManager.h>
namespace Kernel {
diff --git a/Kernel/Storage/AHCIPort.cpp b/Kernel/Storage/AHCIPort.cpp
index e9231fcc93..e0fd9fb542 100644
--- a/Kernel/Storage/AHCIPort.cpp
+++ b/Kernel/Storage/AHCIPort.cpp
@@ -8,13 +8,13 @@
// please look at Documentation/Kernel/AHCILocking.md
#include <AK/Atomic.h>
+#include <Kernel/Memory/MemoryManager.h>
+#include <Kernel/Memory/ScatterGatherList.h>
+#include <Kernel/Memory/TypedMapping.h>
#include <Kernel/SpinLock.h>
#include <Kernel/Storage/AHCIPort.h>
#include <Kernel/Storage/ATA.h>
#include <Kernel/Storage/SATADiskDevice.h>
-#include <Kernel/VM/MemoryManager.h>
-#include <Kernel/VM/ScatterGatherList.h>
-#include <Kernel/VM/TypedMapping.h>
#include <Kernel/WorkQueue.h>
namespace Kernel {
diff --git a/Kernel/Storage/AHCIPort.h b/Kernel/Storage/AHCIPort.h
index da16679794..488b095b12 100644
--- a/Kernel/Storage/AHCIPort.h
+++ b/Kernel/Storage/AHCIPort.h
@@ -11,6 +11,9 @@
#include <Kernel/Devices/Device.h>
#include <Kernel/IO.h>
#include <Kernel/Interrupts/IRQHandler.h>
+#include <Kernel/Memory/AnonymousVMObject.h>
+#include <Kernel/Memory/PhysicalPage.h>
+#include <Kernel/Memory/ScatterGatherList.h>
#include <Kernel/Mutex.h>
#include <Kernel/PhysicalAddress.h>
#include <Kernel/Random.h>
@@ -19,9 +22,6 @@
#include <Kernel/Storage/AHCI.h>
#include <Kernel/Storage/AHCIPortHandler.h>
#include <Kernel/Storage/StorageDevice.h>
-#include <Kernel/VM/AnonymousVMObject.h>
-#include <Kernel/VM/PhysicalPage.h>
-#include <Kernel/VM/ScatterGatherList.h>
#include <Kernel/WaitQueue.h>
namespace Kernel {
diff --git a/Kernel/Storage/AHCIPortHandler.h b/Kernel/Storage/AHCIPortHandler.h
index fa75283c4c..d717eb740a 100644
--- a/Kernel/Storage/AHCIPortHandler.h
+++ b/Kernel/Storage/AHCIPortHandler.h
@@ -10,6 +10,7 @@
#include <Kernel/Devices/Device.h>
#include <Kernel/IO.h>
#include <Kernel/Interrupts/IRQHandler.h>
+#include <Kernel/Memory/PhysicalPage.h>
#include <Kernel/Mutex.h>
#include <Kernel/PhysicalAddress.h>
#include <Kernel/Random.h>
@@ -17,7 +18,6 @@
#include <Kernel/Storage/AHCIController.h>
#include <Kernel/Storage/AHCIPort.h>
#include <Kernel/Storage/StorageDevice.h>
-#include <Kernel/VM/PhysicalPage.h>
#include <Kernel/WaitQueue.h>
namespace Kernel {
diff --git a/Kernel/Storage/IDEChannel.cpp b/Kernel/Storage/IDEChannel.cpp
index 10d7f777ea..5cd1eccb96 100644
--- a/Kernel/Storage/IDEChannel.cpp
+++ b/Kernel/Storage/IDEChannel.cpp
@@ -8,13 +8,13 @@
#include <AK/Singleton.h>
#include <AK/StringView.h>
#include <Kernel/IO.h>
+#include <Kernel/Memory/MemoryManager.h>
#include <Kernel/Process.h>
#include <Kernel/Sections.h>
#include <Kernel/Storage/ATA.h>
#include <Kernel/Storage/IDEChannel.h>
#include <Kernel/Storage/IDEController.h>
#include <Kernel/Storage/PATADiskDevice.h>
-#include <Kernel/VM/MemoryManager.h>
#include <Kernel/WorkQueue.h>
namespace Kernel {
diff --git a/Kernel/Storage/IDEChannel.h b/Kernel/Storage/IDEChannel.h
index 012259598b..63f673adf0 100644
--- a/Kernel/Storage/IDEChannel.h
+++ b/Kernel/Storage/IDEChannel.h
@@ -21,11 +21,11 @@
#include <Kernel/Devices/Device.h>
#include <Kernel/IO.h>
#include <Kernel/Interrupts/IRQHandler.h>
+#include <Kernel/Memory/PhysicalPage.h>
#include <Kernel/Mutex.h>
#include <Kernel/PhysicalAddress.h>
#include <Kernel/Random.h>
#include <Kernel/Storage/StorageDevice.h>
-#include <Kernel/VM/PhysicalPage.h>
#include <Kernel/WaitQueue.h>
namespace Kernel {
diff --git a/Kernel/Storage/StorageController.h b/Kernel/Storage/StorageController.h
index 1989cef86c..0a0871b656 100644
--- a/Kernel/Storage/StorageController.h
+++ b/Kernel/Storage/StorageController.h
@@ -12,10 +12,10 @@
#include <Kernel/Bus/PCI/DeviceController.h>
#include <Kernel/Devices/Device.h>
#include <Kernel/IO.h>
+#include <Kernel/Memory/PhysicalPage.h>
#include <Kernel/Mutex.h>
#include <Kernel/PhysicalAddress.h>
#include <Kernel/Random.h>
-#include <Kernel/VM/PhysicalPage.h>
#include <Kernel/WaitQueue.h>
namespace Kernel {
diff --git a/Kernel/Syscall.cpp b/Kernel/Syscall.cpp
index ae32b62d94..e9fd4e3391 100644
--- a/Kernel/Syscall.cpp
+++ b/Kernel/Syscall.cpp
@@ -7,11 +7,11 @@
#include <Kernel/API/Syscall.h>
#include <Kernel/Arch/x86/Interrupts.h>
#include <Kernel/Arch/x86/TrapFrame.h>
+#include <Kernel/Memory/MemoryManager.h>
#include <Kernel/Panic.h>
#include <Kernel/Process.h>
#include <Kernel/Sections.h>
#include <Kernel/ThreadTracer.h>
-#include <Kernel/VM/MemoryManager.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/anon_create.cpp b/Kernel/Syscalls/anon_create.cpp
index 67073993ff..2308d75aff 100644
--- a/Kernel/Syscalls/anon_create.cpp
+++ b/Kernel/Syscalls/anon_create.cpp
@@ -6,8 +6,8 @@
#include <Kernel/FileSystem/AnonymousFile.h>
#include <Kernel/FileSystem/FileDescription.h>
+#include <Kernel/Memory/AnonymousVMObject.h>
#include <Kernel/Process.h>
-#include <Kernel/VM/AnonymousVMObject.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/execve.cpp b/Kernel/Syscalls/execve.cpp
index 093cdbdee1..7f401837e9 100644
--- a/Kernel/Syscalls/execve.cpp
+++ b/Kernel/Syscalls/execve.cpp
@@ -10,16 +10,16 @@
#include <Kernel/Debug.h>
#include <Kernel/FileSystem/Custody.h>
#include <Kernel/FileSystem/FileDescription.h>
+#include <Kernel/Memory/AllocationStrategy.h>
+#include <Kernel/Memory/MemoryManager.h>
+#include <Kernel/Memory/PageDirectory.h>
+#include <Kernel/Memory/Region.h>
+#include <Kernel/Memory/SharedInodeVMObject.h>
#include <Kernel/Panic.h>
#include <Kernel/PerformanceManager.h>
#include <Kernel/Process.h>
#include <Kernel/Random.h>
#include <Kernel/Time/TimeManagement.h>
-#include <Kernel/VM/AllocationStrategy.h>
-#include <Kernel/VM/MemoryManager.h>
-#include <Kernel/VM/PageDirectory.h>
-#include <Kernel/VM/Region.h>
-#include <Kernel/VM/SharedInodeVMObject.h>
#include <LibC/limits.h>
#include <LibELF/AuxiliaryVector.h>
#include <LibELF/Image.h>
diff --git a/Kernel/Syscalls/fork.cpp b/Kernel/Syscalls/fork.cpp
index 7aab257713..fdb6074230 100644
--- a/Kernel/Syscalls/fork.cpp
+++ b/Kernel/Syscalls/fork.cpp
@@ -7,9 +7,9 @@
#include <Kernel/Debug.h>
#include <Kernel/FileSystem/Custody.h>
#include <Kernel/FileSystem/FileDescription.h>
+#include <Kernel/Memory/Region.h>
#include <Kernel/PerformanceManager.h>
#include <Kernel/Process.h>
-#include <Kernel/VM/Region.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/futex.cpp b/Kernel/Syscalls/futex.cpp
index 5897cc7ee5..637cb6742b 100644
--- a/Kernel/Syscalls/futex.cpp
+++ b/Kernel/Syscalls/futex.cpp
@@ -6,8 +6,8 @@
#include <AK/Singleton.h>
#include <Kernel/Debug.h>
+#include <Kernel/Memory/MemoryManager.h>
#include <Kernel/Process.h>
-#include <Kernel/VM/MemoryManager.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/get_stack_bounds.cpp b/Kernel/Syscalls/get_stack_bounds.cpp
index cb372ed20d..f27e041dd9 100644
--- a/Kernel/Syscalls/get_stack_bounds.cpp
+++ b/Kernel/Syscalls/get_stack_bounds.cpp
@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
+#include <Kernel/Memory/Region.h>
#include <Kernel/Process.h>
-#include <Kernel/VM/Region.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/mmap.cpp b/Kernel/Syscalls/mmap.cpp
index 515b054d9b..2e85b1a7b3 100644
--- a/Kernel/Syscalls/mmap.cpp
+++ b/Kernel/Syscalls/mmap.cpp
@@ -9,15 +9,15 @@
#include <Kernel/Arch/x86/MSR.h>
#include <Kernel/Arch/x86/SmapDisabler.h>
#include <Kernel/FileSystem/FileDescription.h>
+#include <Kernel/Memory/AnonymousVMObject.h>
+#include <Kernel/Memory/MemoryManager.h>
+#include <Kernel/Memory/PageDirectory.h>
+#include <Kernel/Memory/PrivateInodeVMObject.h>
+#include <Kernel/Memory/Region.h>
+#include <Kernel/Memory/SharedInodeVMObject.h>
#include <Kernel/PerformanceEventBuffer.h>
#include <Kernel/PerformanceManager.h>
#include <Kernel/Process.h>
-#include <Kernel/VM/AnonymousVMObject.h>
-#include <Kernel/VM/MemoryManager.h>
-#include <Kernel/VM/PageDirectory.h>
-#include <Kernel/VM/PrivateInodeVMObject.h>
-#include <Kernel/VM/Region.h>
-#include <Kernel/VM/SharedInodeVMObject.h>
#include <LibC/limits.h>
#include <LibELF/Validation.h>
diff --git a/Kernel/Syscalls/ptrace.cpp b/Kernel/Syscalls/ptrace.cpp
index 19961a6534..1c98f20c1a 100644
--- a/Kernel/Syscalls/ptrace.cpp
+++ b/Kernel/Syscalls/ptrace.cpp
@@ -6,13 +6,13 @@
*/
#include <AK/ScopeGuard.h>
+#include <Kernel/Memory/MemoryManager.h>
+#include <Kernel/Memory/PrivateInodeVMObject.h>
+#include <Kernel/Memory/ProcessPagingScope.h>
+#include <Kernel/Memory/Region.h>
+#include <Kernel/Memory/SharedInodeVMObject.h>
#include <Kernel/Process.h>
#include <Kernel/ThreadTracer.h>
-#include <Kernel/VM/MemoryManager.h>
-#include <Kernel/VM/PrivateInodeVMObject.h>
-#include <Kernel/VM/ProcessPagingScope.h>
-#include <Kernel/VM/Region.h>
-#include <Kernel/VM/SharedInodeVMObject.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/purge.cpp b/Kernel/Syscalls/purge.cpp
index 6b3d8ba256..ede1413eb7 100644
--- a/Kernel/Syscalls/purge.cpp
+++ b/Kernel/Syscalls/purge.cpp
@@ -5,10 +5,10 @@
*/
#include <AK/NonnullRefPtrVector.h>
+#include <Kernel/Memory/AnonymousVMObject.h>
+#include <Kernel/Memory/InodeVMObject.h>
+#include <Kernel/Memory/MemoryManager.h>
#include <Kernel/Process.h>
-#include <Kernel/VM/AnonymousVMObject.h>
-#include <Kernel/VM/InodeVMObject.h>
-#include <Kernel/VM/MemoryManager.h>
namespace Kernel {
diff --git a/Kernel/Syscalls/thread.cpp b/Kernel/Syscalls/thread.cpp
index a26e7f27a0..c13eec5d88 100644
--- a/Kernel/Syscalls/thread.cpp
+++ b/Kernel/Syscalls/thread.cpp
@@ -7,9 +7,9 @@
#include <AK/Checked.h>
#include <AK/String.h>
#include <AK/StringBuilder.h>
+#include <Kernel/Memory/MemoryManager.h>
#include <Kernel/PerformanceManager.h>
#include <Kernel/Process.h>
-#include <Kernel/VM/MemoryManager.h>
namespace Kernel {
diff --git a/Kernel/Thread.cpp b/Kernel/Thread.cpp
index 7e496c65ca..8841819014 100644
--- a/Kernel/Thread.cpp
+++ b/Kernel/Thread.cpp
@@ -13,6 +13,9 @@
#include <Kernel/Devices/KCOVDevice.h>
#include <Kernel/FileSystem/FileDescription.h>
#include <Kernel/KSyms.h>
+#include <Kernel/Memory/MemoryManager.h>
+#include <Kernel/Memory/PageDirectory.h>
+#include <Kernel/Memory/ProcessPagingScope.h>
#include <Kernel/Panic.h>
#include <Kernel/PerformanceEventBuffer.h>
#include <Kernel/Process.h>
@@ -22,9 +25,6 @@
#include <Kernel/Thread.h>
#include <Kernel/ThreadTracer.h>
#include <Kernel/TimerQueue.h>
-#include <Kernel/VM/MemoryManager.h>
-#include <Kernel/VM/PageDirectory.h>
-#include <Kernel/VM/ProcessPagingScope.h>
#include <LibC/signal_numbers.h>
namespace Kernel {
diff --git a/Kernel/Thread.h b/Kernel/Thread.h
index 933a3e95e7..e4d9de0587 100644
--- a/Kernel/Thread.h
+++ b/Kernel/Thread.h
@@ -28,10 +28,10 @@
#include <Kernel/KResult.h>
#include <Kernel/KString.h>
#include <Kernel/LockMode.h>
+#include <Kernel/Memory/Range.h>
#include <Kernel/Scheduler.h>
#include <Kernel/TimerQueue.h>
#include <Kernel/UnixTypes.h>
-#include <Kernel/VM/Range.h>
#include <LibC/fd_set.h>
#include <LibC/signal_numbers.h>
diff --git a/Kernel/Time/HPET.cpp b/Kernel/Time/HPET.cpp
index a7e331138e..0dbb2bb24c 100644
--- a/Kernel/Time/HPET.cpp
+++ b/Kernel/Time/HPET.cpp
@@ -8,12 +8,12 @@
#include <Kernel/ACPI/Parser.h>
#include <Kernel/Debug.h>
#include <Kernel/Interrupts/InterruptManagement.h>
+#include <Kernel/Memory/MemoryManager.h>
+#include <Kernel/Memory/TypedMapping.h>
#include <Kernel/Sections.h>
#include <Kernel/Time/HPET.h>
#include <Kernel/Time/HPETComparator.h>
#include <Kernel/Time/TimeManagement.h>
-#include <Kernel/VM/MemoryManager.h>
-#include <Kernel/VM/TypedMapping.h>
namespace Kernel {
diff --git a/Kernel/Time/HPET.h b/Kernel/Time/HPET.h
index 04e21714ce..be92d9eb77 100644
--- a/Kernel/Time/HPET.h
+++ b/Kernel/Time/HPET.h
@@ -10,8 +10,8 @@
#include <AK/OwnPtr.h>
#include <AK/Types.h>
#include <AK/Vector.h>
+#include <Kernel/Memory/Region.h>
#include <Kernel/PhysicalAddress.h>
-#include <Kernel/VM/Region.h>
namespace Kernel {
diff --git a/Kernel/UserOrKernelBuffer.cpp b/Kernel/UserOrKernelBuffer.cpp
index c4a176bda0..55b5abd8b9 100644
--- a/Kernel/UserOrKernelBuffer.cpp
+++ b/Kernel/UserOrKernelBuffer.cpp
@@ -4,8 +4,8 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
+#include <Kernel/Memory/MemoryManager.h>
#include <Kernel/UserOrKernelBuffer.h>
-#include <Kernel/VM/MemoryManager.h>
namespace Kernel {
diff --git a/Kernel/UserOrKernelBuffer.h b/Kernel/UserOrKernelBuffer.h
index 88af8b11bd..1357be4a9a 100644
--- a/Kernel/UserOrKernelBuffer.h
+++ b/Kernel/UserOrKernelBuffer.h
@@ -9,9 +9,9 @@
#include <AK/String.h>
#include <AK/Types.h>
#include <AK/Userspace.h>
+#include <Kernel/Memory/MemoryManager.h>
#include <Kernel/StdLib.h>
#include <Kernel/UnixTypes.h>
-#include <Kernel/VM/MemoryManager.h>
#include <LibC/errno_numbers.h>
namespace Kernel {
diff --git a/Kernel/VirtIO/VirtIO.h b/Kernel/VirtIO/VirtIO.h
index 8ba6f1cf3e..c6d5faa320 100644
--- a/Kernel/VirtIO/VirtIO.h
+++ b/Kernel/VirtIO/VirtIO.h
@@ -11,7 +11,7 @@
#include <Kernel/Bus/PCI/Device.h>
#include <Kernel/IO.h>
#include <Kernel/Interrupts/IRQHandler.h>
-#include <Kernel/VM/MemoryManager.h>
+#include <Kernel/Memory/MemoryManager.h>
#include <Kernel/VirtIO/VirtIOQueue.h>
namespace Kernel {
diff --git a/Kernel/VirtIO/VirtIOConsole.h b/Kernel/VirtIO/VirtIOConsole.h
index a31907f252..3a056b39ad 100644
--- a/Kernel/VirtIO/VirtIOConsole.h
+++ b/Kernel/VirtIO/VirtIOConsole.h
@@ -7,7 +7,7 @@
#pragma once
-#include <Kernel/VM/RingBuffer.h>
+#include <Kernel/Memory/RingBuffer.h>
#include <Kernel/VirtIO/VirtIO.h>
#include <Kernel/VirtIO/VirtIOConsolePort.h>
diff --git a/Kernel/VirtIO/VirtIOConsolePort.h b/Kernel/VirtIO/VirtIOConsolePort.h
index 2180c52124..9fbfe661ed 100644
--- a/Kernel/VirtIO/VirtIOConsolePort.h
+++ b/Kernel/VirtIO/VirtIOConsolePort.h
@@ -9,7 +9,7 @@
#include <Kernel/Devices/CharacterDevice.h>
#include <Kernel/FileSystem/FileDescription.h>
-#include <Kernel/VM/RingBuffer.h>
+#include <Kernel/Memory/RingBuffer.h>
#include <Kernel/VirtIO/VirtIO.h>
namespace Kernel {
diff --git a/Kernel/VirtIO/VirtIOQueue.h b/Kernel/VirtIO/VirtIOQueue.h
index 7e7fab667a..41d742cbc9 100644
--- a/Kernel/VirtIO/VirtIOQueue.h
+++ b/Kernel/VirtIO/VirtIOQueue.h
@@ -6,9 +6,9 @@
#pragma once
+#include <Kernel/Memory/MemoryManager.h>
+#include <Kernel/Memory/ScatterGatherList.h>
#include <Kernel/SpinLock.h>
-#include <Kernel/VM/MemoryManager.h>
-#include <Kernel/VM/ScatterGatherList.h>
namespace Kernel {
diff --git a/Kernel/init.cpp b/Kernel/init.cpp
index 39d2ec7ed5..34cf9e82d9 100644
--- a/Kernel/init.cpp
+++ b/Kernel/init.cpp
@@ -37,6 +37,7 @@
#include <Kernel/Interrupts/InterruptManagement.h>
#include <Kernel/Interrupts/PIC.h>
#include <Kernel/KSyms.h>
+#include <Kernel/Memory/MemoryManager.h>
#include <Kernel/Multiboot.h>
#include <Kernel/Net/NetworkTask.h>
#include <Kernel/Net/NetworkingManagement.h>
@@ -55,7 +56,6 @@
#include <Kernel/Tasks/FinalizerTask.h>
#include <Kernel/Tasks/SyncTask.h>
#include <Kernel/Time/TimeManagement.h>
-#include <Kernel/VM/MemoryManager.h>
#include <Kernel/VirtIO/VirtIO.h>
#include <Kernel/WorkQueue.h>
#include <Kernel/kstdio.h>