SPT vs SLAT comparison

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.
Post Reply
cianfa72
Member
Member
Posts: 73
Joined: Sat Dec 22, 2012 12:01 pm

SPT vs SLAT comparison

Post by cianfa72 »

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 :wink:
Korona
Member
Member
Posts: 1000
Joined: Thu May 17, 2007 1:27 pm
Contact:

Re: SPT vs SLAT comparison

Post by Korona »

In none.

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].
cianfa72
Member
Member
Posts: 73
Joined: Sat Dec 22, 2012 12:01 pm

Re: SPT vs SLAT comparison

Post by cianfa72 »

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)
Korona
Member
Member
Posts: 1000
Joined: Thu May 17, 2007 1:27 pm
Contact:

Re: SPT vs SLAT comparison

Post by Korona »

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].
Post Reply