Page 1 of 1

SPT vs SLAT comparison

Posted: Wed Oct 20, 2021 1:53 am
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:

Re: SPT vs SLAT comparison

Posted: Wed Oct 20, 2021 6:36 am
by Korona
In none.

Shadow paging is generally used in situations where full virtualization is not possible.

Re: SPT vs SLAT comparison

Posted: Wed Oct 20, 2021 7:17 am
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)

Re: SPT vs SLAT comparison

Posted: Thu Oct 21, 2021 12:30 pm
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.