Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7690333
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T20:22:17+00:00 2026-05-31T20:22:17+00:00

My understanding is that shadow page tables eliminate the need to emulate physical memory

  • 0

My understanding is that shadow page tables eliminate the need to emulate physical memory inside of the VM.

ie.

Instead of:

guest OS -> VMM + virtual physical memory -> host OS -> host hardware

It’s just:

guest OS -> VMM -> host OS -> host hardware

The shadow page tables just allows the process to access the host hardware’s memory properly. I also do not understand how page faults would work (or since all physical memory is handled by the host, the host takes care of page faults, swap, etc).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T20:22:18+00:00Added an answer on May 31, 2026 at 8:22 pm

    Shadow page tables are used by the hypervisor to keep track of the state in which the guest “thinks” its page tables should be. The guest can’t be allowed access to the hardware page tables because then it would essentially have control of the machine. So, the hypervisor keeps the “real” mappings (guest virtual -> host physical) in the hardware when the relevant guest is executing, and keeps a representation of the page tables that the guest thinks it’s using “in the shadows,” or at least that’s how I like to think about it.

    Notice that this avoids the GVA->GPA translation step.

    As far as page faults go, nothing changes from the hardware’s point of view (remember, the hypervisor makes it so the page tables used by the hardware contain GVA->HPA mappings), a page fault will simply generate an exception and redirect to the appropriate exception handler. However, when a page fault occurs while a VM is running, this exception can be “forwarded” to the hypervisor, which can then handle it appropriately.

    The hypervisor must build up these shadow page tables as it sees page faults generated by the guest. When the guest writes a mapping into one of its page tables, the hypervisor won’t know right away, so the shadow page tables won’t instantly “be in sync” with what the guest intends. So the hypervisor will build up the shadow page tables in, e.g., the following way:

    • Guest writes a mapping for VA 0xdeadbeef into it’s page tables (a location in memory), but remember, this mapping isn’t being used by the hardware.
    • Guest accesses 0xdeadbeef, which causes a page fault because the real page tables haven’t been updated to add the mapping
    • Page fault is forwarded to hypervisor
    • Hypervisor looks at guest page tables and notices they’re different from shadow page tables, says “hey, I haven’t created a real mapping for 0xdeadbeef yet”
    • So it updates its shadow page tables and creates a corresponding 0xdeadbeef->HPA mapping for the hardware to use.

    The previous case is called a shadow page fault because it is caused solely by the introduction of memory virtualization. So the handling of the page fault will stop at the hypervisor and the guest OS will have no idea that it even occurred. Note that the guest can also generate genuine page faults because of mappings it hasn’t tried to create yet, and the hypervisor will forward these back up into the guest. Also realize that this entire process implies that every page fault that occurs while the guest is executing must cause an exit to the VMM so the shadow page tables can be kept fresh. This is expensive, and one of the reasons why hardware support was introduced for memory virtualization. (here is one quick intro to nested, or extended page tables)

    A good reference for this is this book

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Memory management with delegates, it is my understanding that I don't retain delegates, I
It is my understanding that, in addition to allocating memory, alloc sets all instance
It is my understanding that page level caching does not take into account that,
Understanding that I should probably just dig into the source to come up with
It's my understanding that nulls are not indexable in DB2, so assuming we have
It's my understanding that common wisdom says to only use exceptions for truly exceptional
It is my understanding that I can test that a method call will occur
It is to my understanding that one should use a forward-class declaration in the
It is my understanding that the default behavior when creating a table in SQL
It's my understanding that StackOverflow (SO) was built using ASP.NET. What surprised me is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.