Memory Access Messages

The hypervisor sends memory access messages in response to certain memory accesses that are performed by a virtual processor or that are performed on behalf of the virtual processor by the hypervisor. Both of the following types of memory access messages share the same format:

Unmapped GPA Message

An unmapped GPA message is delivered by the hypervisor when a virtual processor (or the hypervisor on the virtual processor's behalf) accesses a GPA page for which no mapping has been indicated.

GPA Access Violation Message

A GPA access violation message is delivered by the hypervisor when a virtual processor (or the hypervisor on the virtual processor's behalf) accesses a GPA page and the access type is not allowed by the current mapping.

The format of memory access messages is shown in the following table. An HV_X64_MEMORY_INTERCEPT_MESSAGE structure is used to encode a memory access message.

Message Header

0

MessageType (4 bytes)

Rsvd (3 bytes)

PayloadSize

(1 byte)

8

SourcePartition (8 bytes)

Message Access Payload

16

VpIndex (4 bytes)

InstLen

(1 byte)

Access

Type

(1 byte)

ExecutionState

(2 bytes)

24

CsSegment[0] (8 bytes)

32

CsSegment[1] (8 bytes)

40

Rip (8 bytes)

48

Rflags (8 bytes)

56

Rsvd

(2 bytes)

Flags

(1 byte)

InstByteCount

(1 byte)

CacheType (4 bytes)

64

Gva (8 bytes)

72

Gpa (8 bytes)

80

InstructionBytes[0]

88

InstructionBytes[1]

96

DsSegment[0] (8 bytes)

104

DsSegment[1] (8 bytes)

112

SsSegment[0] (8 bytes)

120

SsSegment[1] (8 bytes)

128

Rax (8 bytes)

...

...

248

R15 (8 bytes)

 

The following list describes the fields of memory access messages:

Flags

Type HV_X64_MEMORY_ACCESS_INFO that provides information about the intercept.

InstByteCount

The number of instruction bytes that have been provided in the InstructionBytes fields. Valid values are in the range 0 through 16.

CacheType

Type HV_CACHE_TYPE. When the GvaValid member of HV_X64_MEMORY_ACCESS_INFO is set, this field is the cache type for the page that causes the access intercept that is obtained from the guest's page table. When GvaValid is clear, this field is HvCacheTypeX64WriteBack and the intercept was caused by an access to guest page table pages.

Gva

The guest virtual address of the access that was intercepted. This field is valid if GvaValid is set in Flags. GvaValid will not be set if the memory intercept was caused by an access to guest page table pages.

Gpa

The guest physical address of the access that was intercepted. If the intercepted instruction was attempting to perform a multi-byte memory access that crossed page boundaries, this value will indicate the lowest address that resulted in an intercept.

InstructionBytes

Includes up to 16 bytes from the instruction stream that starts at the current CS:RIP. The number of valid bytes is specified by the InstByteCount field. If the access was due to the delivery of an interruption (as indicated by the InterruptionPending bit in the ExecutionState field), the message will not include any instruction bytes. In other situations, the hypervisor might fetch only up to the next page boundary or up to the end of the code segment that results in an instruction byte count that is less than 16.

DsSegment

The selector, base, limit, and flags for the current data segment (DS).

SsSegment

The selector, base, limit, and flags for the current stack segment (SS).

Rax...R15

The current values of the virtual processor's sixteen 64-bit general purpose registers.

 

 

Send comments about this topic to Microsoft

Build date: 11/16/2013

Show:
© 2014 Microsoft. All rights reserved.