HvCreatePartition function
The HvCreatePartition function creates a new child partition.
Syntax
HV_STATUS HvCreatePartition( _In_ UINT64 Flags, _In_ HV_PROXIMITY_DOMAIN_INFO ProximityDomainInfo, _Out_ PHV_PARTITION_ID NewPartitionId );
Parameters
- Flags [in]
-
A 64-bit value that specifies a mask of capabilities that are permanently assigned to the new partition. For more information about the capabilities that the caller can set, see Partition Creation Flags.
- ProximityDomainInfo [in]
-
An HV_PROXIMITY_DOMAIN_INFO structure that specifies the ACPI proximity domain information of the NUMA node where the partition's initial hypervisor data structures will reside. If there are no pages in the caller's pool for the partition identifier that HvCreatePartition stores in the variable that the NewPartitionId parameter specifies, the call will fail.
- NewPartitionId [out]
-
A pointer to an HV_PARTITION_ID variable in which HvCreatePartition stores the identifier for the new partition. HV_PARTITION_ID is defined as an unsigned 64-bit (UINT64) value. The identifier for the new partition is guaranteed to be unique within the current power cycle.
Return value
HvCreatePartition returns one of the following values. In addition to these values, HvCreatePartition can also return one of the values that are specified in Common Hypercall Status Codes.
Return code | Description |
---|---|
|
HvCreatePartition successfully created the child partition. |
|
The caller's partition privilege flag CreatePartitions is cleared. |
|
The Flags parameter includes bits for capabilities that are either undefined or reserved in the implementation. The Flags member of the HV_PROXIMITY_DOMAIN_INFO structure that the ProximityDomainInfo parameter specifies includes reserved bits. |
|
Creating a new partition would exceed the maximum depth in the partition hierarchy. |
|
The number of pages in the memory pool of the caller is insufficient to perform the operation. |
|
A required system resource is unavailable or an implementation limit has been reached. |
Remarks
To create a partition, the hypervisor must allocate a new partition data structure. The memory required for the partition's initial data structure comes from the caller's memory pool. For information on memory pools, see Memory Pools.
If the hypervisor successfully creates a partition, the partition begins in the uninitialized state. The new partition's memory pool is initially empty and the caller must populate it with sufficient pages to allow a subsequent HvInitializePartition hypercall to succeed.
The hypervisor restricts the maximum depth of the partition hierarchy. All hypervisor implementations must support a depth of at least two partitions (that is, the root partition and one descendent).
HvCreatePartition has the following restriction:
-
The caller must possess the CreatePartitions privilege from the HV_PARTITION_PRIVILEGE_MASK union.
Native Interface
HvCreatePartition | |
---|---|
Call Code = 0x0040 | |
Input Parameters | |
0 |
Flags (8 bytes) |
8 |
ProximityDomainInfo (8 bytes) |
Output Parameters | |
0 |
NewPartitionId (8 bytes) |
Requirements
Version | HvCreatePartition 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