GPA Space

The size of the guest physical address (GPA) space for a partition is in the range from 0 to some maximum address that depends on architectural attributes of the virtual computer that the partition exposes.

Each page within a GPA space is in one of the following states:

Mapped

A mapped GPA page is associated with a RAM system physical address (SPA) page.

Inaccessible

An inaccessible GPA page cannot be read, written, or executed by the partition.

Unmapped

An unmapped GPA page is not associated with a RAM SPA page.

The way in which the GPA space is defined and the behavior that is associated with unmapped page accesses differs between the root partition and non-root partitions.

For the root partition, the following behaviors are defined:

  • Its GPA space is identity mapped--that is, all mapped GPA pages map directly to the SPA page with the same address.

  • The hypervisor defines the GPA mappings at boot time or when SPA RAM ranges are added or removed. Therefore, all valid SPA RAM pages are always mapped within the root partition's GPA space. The root partition is not allowed to unmap these pages except by calling HvUnmapGpaPages. The root partition can, however, modify its access rights to its mapped pages.

  • Unmapped GPA pages within the root partition's GPA space (that is, SPA pages that are not part of known SPA RAM ranges) can be accessed by the root partition. This allows the partition to access memory-mapped registers, video memory buffers, and so on. Some unmapped pages are off limits even to the root partition. These unmapped pages include SPA pages that correspond to hardware resources that must be managed by the hypervisor for correct operation. For example, the hypervisor does not allow the root partition to directly access the local APIC's memory-mapped registers.

For each non-root partition, the following behaviors are defined:

  • Its GPA mappings are not necessarily identity-mapped. That is, a GPA does not necessarily refer to the same SPA.

  • The GPA mappings are defined by the partition's parent. At the time they are mapped (through a call to HvMapGpaPages), they are specified in terms of the parent's GPA space. Therefore, these pages must be mapped into the parent's GPA space; however, the parent is not required to have read, write, or execute access to these mapped pages.

  • When a virtual processor accesses an unmapped GPA page, the hypervisor suspends the virtual processor and sends a message to the partition's parent. Code within the parent will typically respond by creating a mapping or by emulating the instruction that generated the memory access. In either case, the software in the parent partition must "unsuspend" the child's virtual processor. For more information about memory access messages, see Memory Access Messages.

 

 

Send comments about this topic to Microsoft

Build date: 11/16/2013

Show:
© 2014 Microsoft. All rights reserved.