HvMapEventLogBuffer function

The HvMapEventLogBuffer function returns the buffer's guest physical address (GPA) pages and maps them as read-only into the guest's address space.

Syntax


HV_STATUS  HvMapEventLogBuffer(
  _In_   HV_EVENTLOG_TYPE Type,
  _In_   HV_EVENT BufferIndex,
  _Out_  PHV_GPA_PAGE_NUMBER GpaPages
);

Parameters

Type [in]

An HV_EVENTLOG_TYPE value that specifies the type of the event log buffer group whose pages are mapped.

BufferIndex [in]

An HV_EVENTLOG_BUFFER_INDEX value that specifies the index of the buffer within the buffer group that is associated with the event log type that the Type parameter specifies.

GpaPages [out]

A pointer to an array of HV_GPA_PAGE_NUMBER variables for the GPA pages that HvMapEventLogBuffer returns and that constitute the event log buffer. All buffers for a specific event log group are the same size. The size is established by the guest by using the HvInitializeEventLogBufferGroup function. HV_GPA_PAGE_NUMBER is defined as an unsigned 64-bit (UINT64) value.

Return value

HvMapEventLogBuffer returns one of the following values. In addition to these values, HvMapEventLogBuffer can also return one of the values that are specified in Common Hypercall Status Codes.

Return codeDescription
HV_STATUS_SUCCESS

HvMapEventLogBuffer successfully mapped a single event log buffer.

HV_STATUS_ACCESS_DENIED

The caller is not the root partition.

HV_STATUS_INVALID_PARAMETER

One of the following invalid parameter conditions exists:

  • The specified event log type is invalid.

  • A buffer with the specified index does not exist.

HV_STATUS_OPERATION_DENIED

One of the following conditions exists:

  • The event log buffer group that is associated with this type has not been initialized.

  • The event log buffer that is associated with the specified index and type is already mapped.

HV_STATUS_INSUFFICIENT_MEMORY

Insufficient memory exists for the call to succeed.

 

Remarks

The HvMapEventLogBuffer hypercall is used to read-only map the GPA pages of the specified event log buffer into the guest's address space and to return the list of GPA pages that constitute the buffer. Buffers that are successfully mapped are placed onto the free buffer list, which makes them available for the hypervisor to use for event logging.

HvMapEventLogBuffer has the following restrictions:

  • The caller must be the root partition.

Native Interface

HvMapEventLogBuffer

Call Code = 0x0064

Input Parameters

0

Type (4 bytes) BufferIndex (4 bytes)

Output Parameters

0

GpaPages (8 bytes)
(Array of HV_GPA_PAGE_NUMBER values, the number determined by the BufferPages parameter in a call to the HvInitializeEventLogBufferGroup function)

 

Requirements

Version

HvMapEventLogBuffer is available in version 1.0 and later versions of the hypervisor.

Header

Hvgdk.h (include Hvgdk.h)

IRQL

Any level

See also

HV_EVENTLOG_TYPE
HvInitializeEventLogBufferGroup

 

 

Send comments about this topic to Microsoft

Build date: 11/16/2013

Show:
© 2014 Microsoft. All rights reserved.