HvRetrieveDebugData function

The HvRetrieveDebugData function retrieves available data that is received on a debugging connection.

Syntax


HV_STATUS  HvRetrieveDebugData(
  _In_   PUINT32 Count,
  _In_   HV_DEBUG_OPTIONS Options,
  _In_   HV_NANO100_TIME Timeout,
  _Out_  PUINT32 RetrievedCount,
  _In_   PUINT32 RemainingCount,
  _Out_  PUINT8 Data
);

Parameters

Count [in]

A pointer to a variable that contains the number of bytes that HvRetrieveDebugData should retrieve and put into the buffer to which the Data parameter points. This number can range from zero to HV_DEBUG_MAXIMUM_DATA_SIZE. HvRetrieveDebugData returns the actual number of bytes that it retrieved and put into the buffer.

Options [in]

A valid bitwise OR combination of HV_DEBUG_OPTIONS values that specify the retrieving options.

The HV_DEBUG_RETRIEVE_LOOP option indicates that if there is no immediately available data, the hypervisor should suspend the virtual processor for the interval that the Timeout parameter specifies.

The HV_DEBUG_RETRIEVE_TEST_ACTIVITY option indicates that if no receive activity (for any session) has occurred on the physical connection since the last HvRetrieveDebugData hypercall, an error should be returned to the caller. HvRetrieveDebugData performs this test before all other processing.

Timeout [in]

The maximum time, in 100 nanosecond units, that the hypervisor should suspend the virtual processor while waiting for data to arrive.

RetrievedCount [out]

A pointer to a variable that HvRetrieveDebugData fills with the number of bytes that HvRetrieveDebugData returned in the buffer to which Data points.

RemainingCount [in]

A pointer to a variable that HvRetrieveDebugData fills with the number of bytes in the buffer that Data points to that are pending retrieval, after HvRetrieveDebugData returns the number of bytes to which the Count parameter points.

Data [out]

A pointer to a buffer that HvRetrieveDebugData fills with the bytes received from the beginning of the session for the data stream connection.

Return value

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

Return codeDescription
HV_STATUS_SUCCESS

HvRetrieveDebugData successfully retrieved available data that was received on the connection.

HV_STATUS_FEATURE_UNAVAILABLE

Guest debugging support is not present or is not enabled in the hypervisor.

HV_STATUS_ACCESS_DENIED

The caller's partition does not possess the Debugging privilege.

HV_STATUS_OPERATION_DENIED

The partition's Debug Channel Identifier property has not been assigned a unique, nonzero value.

HV_STATUS_INVALID_PARAMETER

One of the following conditions exists:

  • The Count parameter specifies more than HV_DEBUG_MAXIMUM_DATA_SIZE bytes of data.

  • The area that is described by the Data and Count parameters crosses a page boundary.

  • An Options flag other than HV_DEBUG_RETRIEVE_LOOP and HV_DEBUG_RETRIEVE_TEST_ACTIVITY was specified.

HV_STATUS_INACTIVE

The HV_DEBUG_RETRIEVE_TEST_ACTIVITY option was specified and the hypervisor has not recorded any receive activity on the physical connection since the guest's last call to HvRetrieveDebugData.

HV_STATUS_NO_DATA

There is no data that is pending retrieval from the incoming session buffer.

 

Remarks

HvRetrieveDebugData retrieves up to HV_DEBUG_MAXIMUM_DATA_SIZE bytes from the session's received data stream. If no data is available, HvRetrieveDebugData returns HV_STATUS_NO_DATA. A caller can set the variable to which the Count parameter points to zero to determine whether any received data is present in the incoming session buffer. If data is present, HvRetrieveDebugData returns HV_STATUS_SUCCESS but does not return any data.

HvRetrieveDebugData has the following restrictions:

  • The partition must possess the Debugging privilege.

Native Interface

HvRetrieveDebugData

Call Code = 0x006A

Input Parameters

0

Count (4 bytes) Options (4 bytes)

8

Timeout (8 bytes)

Output Parameters

0

RetrievedCount (4 bytes) RemainingCount (4 bytes)

8

Data (up to HV_DEBUG_MAXIMUM_DATA_SIZE bytes)

 

Requirements

Version

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

Header

Hvgdk.h (include Hvgdk.h)

IRQL

Any level

 

 

Send comments about this topic to Microsoft

Build date: 11/16/2013

Show:
© 2014 Microsoft. All rights reserved.