Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
I would like to ask for clarification in the context of virtualization about the use cases for which Shadow Page Translation (SPT) might perform better than SLAT (i.e. Intel EPT/ AMD NPT).
I'm aware of in case of SPT there are actually two page table set in memory: the first one is the (original) Guest page table set while the second set (managed by VMM/Hypervisor) is actually the SPT pointed to by the CR3 register within the physical CPU.
In which use cases SPT could be preferable over SLAT ?
Shadow paging is generally used in situations where full virtualization is not possible.
managarm: Microkernel-based OS capable of running a Wayland desktop (Discord: https://discord.gg/7WB6Ur3). My OS-dev projects: [mlibc: Portable C library for managarm, qword, Linux, Sigma, ...] [LAI: AML interpreter] [xbstrap: Build system for OS distributions].
Korona wrote:In none.
Shadow paging is generally used in situations where full virtualization is not possible.
What about a VM that uses only a 'restricted working set' ? Maybe in that case SPT could provide better performance since the 'reduced' number of page fault occurred (no 'tax' for the nested table walking required with SLAT)
Well, if the guest doesn't change its page tables at all (or nearly at all), it might indeed be (very slightly) faster to not have a second translation layer.
In practice, all (or nearly all) interesting guests do need to change their PTs frequently.
managarm: Microkernel-based OS capable of running a Wayland desktop (Discord: https://discord.gg/7WB6Ur3). My OS-dev projects: [mlibc: Portable C library for managarm, qword, Linux, Sigma, ...] [LAI: AML interpreter] [xbstrap: Build system for OS distributions].