HvConnectPort function
The HvConnectPort function creates a connection to a previously-created port in another partition.
Syntax
HV_STATUS HvConnectPort( _In_ HV_PARTITION_ID ConnectionPartition, _In_ HV_CONNECTION_ID ConnectionId, _In_ HV_PARTITION_ID PortPartition, _In_ HV_PORT_ID PortId, _In_ PCHV_CONNECTION_INFO ConnectionInfo );
Parameters
- ConnectionPartition [in]
-
An HV_PARTITION_ID value that identifies the partition that will send messages or signal events by using the connection that HvConnectPort creates. HV_PARTITION_ID is defined as an unsigned 64-bit (UINT64) value.
- ConnectionId [in]
-
An HV_CONNECTION_ID value that specifies an identifier that is unique among all connection identifiers for the partition that the ConnectionPartition parameter specifies. The connection identifier is used to refer to the connection.
- PortPartition [in]
-
An HV_PARTITION_ID value that identifies the partition whose port is being connected to.
- PortId [in]
-
An HV_PORT_ID value that identifies a previously-created port within the partition that PortPartition specifies.
- ConnectionInfo [in]
-
A pointer to an HV_CONNECTION_INFO structure that describes how the port should be connected. The connection depends on the type of the target port (that is, the port that the connection will be associated with).
Return value
HvConnectPort returns one of the following values. In addition to these values, HvConnectPort can also return one of the values that are specified in Common Hypercall Status Codes.
Return code | Description |
---|---|
|
HvConnectPort successfully created a connection to a port. |
|
Neither of the following is true:
|
|
One of the following invalid partition conditions exists:
|
|
One of the following invalid port conditions exists:
|
|
One of the following invalid port conditions exists:
|
|
The specified monitor overlay page GPA is not page aligned. |
|
The ConnectionInfo parameter is invalid. |
|
The specified port or connection partition is not in the active state. |
|
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
HvConnectPort allocates the memory for the connection object from the memory pool of the partition that the ConnectionPartition parameter identifies.
The connection identifier that the ConnectionId parameter specifies must be unique among all connections that are associated with the connection partition (that is, the partition that the ConnectionPartition parameter specifies).
HvConnectPort has the following restrictions:
-
The caller must possess the ConnectPort privilege.
-
The partitions that are specified by ConnectionPartition and PortPartition must be in the active state.
-
The caller must be the parent of the partition that is specified by ConnectionPartition, or the caller must specify its own partition identifier.
Native Interface
HvConnectPort | |
---|---|
Call Code = 0x0059 | |
Input Parameters | |
0 |
ConnectionPartition (8 bytes) |
8 |
ConnectionId (4 bytes) Padding (4 bytes) |
16 |
PortPartition (8 bytes) |
24 |
PortId (4 bytes) Padding (4 bytes) |
30 |
ConnectionInfo (8 bytes) |
Requirements
Version | HvConnectPort 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