HvGetLogicalProcessorRunTime function
The HvGetLogicalProcessorRunTime function queries for the run time of the logical processor that is associated with the caller's virtual processor.
Syntax
HV_STATUS HvGetLogicalProcessorRunTime( _Out_ PHV_NANO100_TIME GlobalTime, _Out_ PHV_NANO100_TIME LocalRunTime, _Out_ UINT64 RsvdZ, _Out_ PHV_NANO100_TIME HypervisorTime );
Parameters
- GlobalTime [out]
-
A pointer to an HV_NANO100_TIME variable in which HvGetLogicalProcessorRunTime stores the current global reference time. HV_NANO100_TIME is defined as an unsigned 64-bit (UINT64) value.
- LocalRunTime [out]
-
A pointer to an HV_NANO100_TIME variable in which HvGetLogicalProcessorRunTime stores the run time of the logical processor that is associated with the caller's virtual processor.
- RsvdZ [out]
-
Reserved. Do not use.
- HypervisorTime [out]
-
A pointer to an HV_NANO100_TIME variable in which HvGetLogicalProcessorRunTime stores the amount of time the hypervisor has executed on the logical processor.
Return value
HvGetLogicalProcessorRunTime returns one of the following values. In addition to these values, HvGetLogicalProcessorRunTime can also return one of the values that are specified in Common Hypercall Status Codes.
Return code | Description |
---|---|
|
HvGetLogicalProcessorRunTime successfully queried for the run time of the logical processor that is associated with the caller's virtual processor. |
|
The caller's partition does not possess the CPUManagement privilege. |
Remarks
HvGetLogicalProcessorRunTime requires that the calling partition possess the CPUManagement privilege. For more information on this privilege and its application, see the HV_PARTITION_PRIVILEGE_MASK union.
For more information about logical processor run time, see Hardware Management Data Types.
Utilization can be computed by calling HvGetLogicalProcessorRunTime twice and then dividing (LocalRunTimen - LocalRunTimen-1) by (GlobalTimen - GlobalTimen-1).
The information that HvGetLogicalProcessorRunTime receives can be used to determine whether the hypervisor is actively scheduling activity on the logical processor or whether the hypervisor is idle and can be placed into a low-power state without negatively impacting the system's performance.
HvGetLogicalProcessorRunTime has the following restriction:
-
The caller's partition must possess the CPUManagement privilege.
Native Interface
HvGetLogicalProcessorRunTime | |
---|---|
Call Code = 0x0004 | |
Output Parameters | |
0 |
GlobalTime (8 bytes) |
8 |
LocalRunTime (8 bytes) |
16 |
RsvdZ (8 bytes) |
24 |
HypervisorTime (8 bytes) |
Requirements
Version | HvGetLogicalProcessorRunTime is available in version 1.0 and later versions of the hypervisor. |
---|---|
Header |
|
IRQL | Any level |
See also
Send comments about this topic to Microsoft
Build date: 11/16/2013