HvGetMemoryBalance function
The HvGetMemoryBalance function queries the state of the memory pool of a child partition.
Syntax
HV_STATUS HvGetMemoryBalance( _In_ HV_PARTITION_ID PartitionId, _In_ HV_PROXIMITY_DOMAIN_INFO ProximityDomainInfo, _Out_ PUINT64 PagesAvailable, _Out_ PUINT64 PagesInUse );
Parameters
- PartitionId [in]
-
An HV_PARTITION_ID value that identifies the partition from which to query the state of the partition's memory pool. HV_PARTITION_ID is defined as an unsigned 64-bit (UINT64) value.
- ProximityDomainInfo [in]
-
An HV_PROXIMITY_DOMAIN_INFO structure that specifies the ACPI proximity domain information of the NUMA node from which to query the memory balance. The proximity domain specifier is described in Resource Management Proximity Domains Data Types.
- PagesAvailable [out]
-
A pointer to a variable that HvGetMemoryBalance fills with the number of guest physical address (GPA) pages that are available.
- PagesInUse [out]
-
A pointer to a variable that HvGetMemoryBalance fills with the number of guest physical address (GPA) pages that are in use.
Return value
HvGetMemoryBalance returns one of the following values. In addition to these values, HvGetMemoryBalance can also return one of the values that are specified in Common Hypercall Status Codes.
Return code | Description |
---|---|
|
HvGetMemoryBalance successfully queried the state of the child partition's memory pool. |
|
Neither of the following items is true:
|
|
The specified partition is invalid. |
|
The ProximityDomainInfo parameter specifies an invalid flag bit or an invalid domain identifier. |
Remarks
HvGetMemoryBalance has the following restrictions:
-
The caller must possess the AccessMemoryPool privilege.
-
The caller must either be the parent of the partition that is specified by PartitionId or the root partition that specifies its own partition identifier.
Native Interface
HvGetMemoryBalance | |
---|---|
Call Code = 0x004A | |
Input Parameters | |
0 |
PartitionId (8 bytes) |
8 |
ProximityDomainInfo (8 bytes) |
Output Parameters | |
0 |
PagesAvailable (8 bytes) |
8 |
PagesInUse (8 bytes) |
Requirements
Version | HvGetMemoryBalance 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