OSDev.org

The Place to Start for Operating System Developers
It is currently Wed Dec 01, 2021 7:23 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: SPT vs SLAT comparison
PostPosted: Wed Oct 20, 2021 1:53 am 
Offline
Member
Member

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


Top
 Profile  
 
 Post subject: Re: SPT vs SLAT comparison
PostPosted: Wed Oct 20, 2021 6:36 am 
Offline
Member
Member

Joined: Thu May 17, 2007 1:27 pm
Posts: 995
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].


Top
 Profile  
 
 Post subject: Re: SPT vs SLAT comparison
PostPosted: Wed Oct 20, 2021 7:17 am 
Offline
Member
Member

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


Top
 Profile  
 
 Post subject: Re: SPT vs SLAT comparison
PostPosted: Thu Oct 21, 2021 12:30 pm 
Offline
Member
Member

Joined: Thu May 17, 2007 1:27 pm
Posts: 995
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].


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 33 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group