HvCreateVp function
The HvCreateVp function creates a new virtual processor (VP) in a partition.
Syntax
HV_STATUS HvCreateVp( _In_ HV_PARTITION_ID PartitionId, _In_ HV_PROXIMITY_DOMAIN_INFO ProximityDomainInfo, _In_ HV_VP_INDEX VpIndex, _In_ UINT64 Flags );
Parameters
- PartitionId [in]
-
An HV_PARTITION_ID value that identifies the partition that HvCreateVp creates a new virtual processor in. 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 where the virtual processor's initial data structures will reside. If there are no pages in the caller's pool for the partition identifier that the PartitionId parameter specifies, the call will fail. The HV_PROXIMITY_DOMAIN_INFO structure is described in Resource Management Proximity Domains Data Types.
- VpIndex [in]
-
An HV_VP_INDEX value that specifies the index of the virtual processor that HvCreateVp creates. HV_VP_INDEX is defined as an unsigned 32-bit (UINT32) value.
- Flags [in]
-
Reserved for flags. The caller should set this parameter to zeros.
Return value
HvCreateVp returns one of the following values. In addition to these values, HvCreateVp can also return one of the values that are specified in Common Hypercall Status Codes.
Return code | Description |
---|---|
|
HvCreateVp successfully created a new virtual processor in the specified partition. |
|
The caller is not the parent of the specified partition. |
|
The partition has a per-VP reserve or capacity property value defined and the creation of a virtual processor would cause the total reserve or capacity to exceed 100%. |
|
The specified partition identifier is invalid. |
|
One of the following invalid VP-index conditions exists:
|
|
The value that is specified in the Flags parameter is not zero. |
|
The specified partition is not in the active state. |
|
The number of pages in the specified partition's memory pool is insufficient to perform the operation. |
|
A required system resource is unavailable or an implementation limit has been reached. |
Remarks
The virtual processor index that the VpIndex parameter specifies must be below the maximum virtual processor index that the hypervisor supports.
When HvCreateVp successfully creates a virtual processor, the hypervisor has initialized the virtual processor's architected state consistent with the reset state of a real processor. The initial Advanced Programmable Interrupt Controller (APIC) identifier is set to the specified virtual processor index. The parent partition can call the HvSetVpRegisters function to modify this value and can specify the register HvX64RegisterInitialApicId. The hypervisor has also initialized the guest-programmable APIC identifier, which is accessible through the APIC's memory-mapped I/O (MMIO) space, based on the specified virtual processor index.
Upon creation, the hypervisor has marked a virtual processor as suspended (that is, HvRegisterExplicitSuspend contains a value of 1). This value must be cleared before the virtual processor can begin executing instructions.
A virtual processor that is created with an index of zero is designated as the boot processor and placed in the ready state. This virtual processor will begin executing instructions after its HvExplicitSuspendRegister is cleared. Virtual processors that are created with a nonzero index are application processors and placed in the waiting state. Such processors must receive an SIPI interrupt (HvX64InterruptTypeSipi) to begin execution.
HvCreateVp has the following restrictions:
-
The partition that PartitionId specifies must be in the active state.
-
The caller must be the parent of the partition that is specified by PartitionId.
Native Interface
HvCreateVp | |
---|---|
Call Code = 0x004E | |
Input Parameters | |
0 |
PartitionId (8 bytes) |
8 |
VpIndex (4 bytes) Padding (4 bytes) |
16 |
ProximityDomainInfo (8 bytes) |
24 |
Flags (8 bytes) |
Requirements
Version | HvCreateVp 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