Hi,
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 ?
Thank you
SPT vs SLAT comparison
Re: SPT vs SLAT comparison
In none.
Shadow paging is generally used in situations where full virtualization is not possible.
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].
Re: SPT vs SLAT comparison
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)Korona wrote:In none.
Shadow paging is generally used in situations where full virtualization is not possible.
Re: SPT vs SLAT comparison
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.
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].