HvSetVpRegisters function
The HvSetVpRegisters function writes the architectural state of a virtual processor.
Syntax
HV_STATUS HvSetVpRegisters( _In_ HV_PARTITION_ID PartitionId, _In_ HV_VP_INDEX VpIndex, _Inout_ PUINT32 RegisterCount, _In_ PCHV_REGISTER_NAME RegisterNameList, _Out_ PCHV_REGISTER_VALUE RegisterValueList );
Parameters
- PartitionId [in]
-
An HV_PARTITION_ID value that identifies the partition on which HvSetVpRegisters writes the architectural state of a virtual processor. HV_PARTITION_ID is defined as an unsigned 64-bit (UINT64) value.
- VpIndex [in]
-
An HV_VP_INDEX value that specifies the index of the virtual processor of which HvSetVpRegisters writes the architectural state. HV_VP_INDEX is defined as an unsigned 32-bit (UINT32) value.
- RegisterCount [in, out]
-
A pointer to a variable that contains the number of registers to modify. HvSetVpRegisters specifies the actual number of registers that it modified.
- RegisterNameList [in]
-
A pointer to an array of HV_REGISTER_NAME variables for the names of the registers that HvSetVpRegisters modifies.
- RegisterValueList [out]
-
A pointer to an array of HV_REGISTER_VALUE variables that contain the new values for the registers that the RegisterNameList array specifies.
Return value
HvSetVpRegisters returns one of the following values. In addition to these values, HvSetVpRegisters can also return one of the values that are specified in Common Hypercall Status Codes.
| Return code | Description |
|---|---|
|
HvSetVpRegisters successfully wrote the architectural state of a virtual processor. |
|
The caller is neither the partition itself nor the parent of the specified partition. |
|
The specified partition identifier is invalid. |
|
The specified VP index does not reference a virtual processor within the specified partition. |
|
One of the following invalid parameter conditions exists:
|
|
The specified partition is not in the active state. |
Remarks
The HvSetVpRegisters function is a rep call. The caller passes a valid value to the RegisterCount parameter in a call to HvSetVpRegisters as the rep count. For more information about hypercall inputs, see Hypercall Inputs.
HvSetVpRegisters writes the state of a virtual processor as a series of register values that are contained in the array that the RegisterValueList parameter specifies. Each register value that HvSetVpRegisters writes corresponds to a register name that the caller provided as input to the array that the RegisterNameList parameter specifies.
HvSetVpRegisters performs minimal error checking when it modifies a register value. In particular, the hypervisor will validate that reserved bits of a register are set to zero, bits that are architecturally defined as always containing a zero or a one are set appropriately, and specified bits beyond the architectural size of the register are zeroed.
HvSetVpRegisters cannot be used to modify the value of a read-only register.
HvSetVpRegisters does not perform any side-effects of modifying a register, which includes generation of exceptions, pipeline synchronizations, TLB flushes, and so on.
HvSetVpRegisters 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 or the partition that specifies its own partition identifier.
Native Interface
| HvSetVpRegisters [rep] | |
|---|---|
|
Call Code = 0x0051 | |
| Input Parameter Header | |
|
0 |
PartitionId (8 bytes) |
|
8 |
VpIndex (4 bytes) RsvdZ (4 bytes) |
| Input List Element | |
|
0 |
RegisterName[0] (4 bytes) Padding (4 bytes) |
|
8 |
Padding (8 bytes) |
|
16 |
RegisterValue (low-order) (8 bytes) |
|
24 |
RegisterValue (high-order) (8 bytes) |
Requirements
|
Version | HvSetVpRegisters 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
