HvPostMessage function
The HvPostMessage function attempts to post (that is, send asynchronously) a message to the specified connection, which has an associated destination port.
Syntax
HV_STATUS HvPostMessage( _In_ HV_CONNECTION_ID ConnectionId, _In_ HV_MESSAGE_TYPE MessageType, _In_ UINT32 PayloadSize, _In_ PCVOID Message );
Parameters
- ConnectionId [in]
-
An HV_CONNECTION_ID value that specifies an identifier for the connection that HvConnectPort creates.
- MessageType [in]
-
An HV_MESSAGE_TYPE value that specifies the message type that will appear within the message header. The caller can specify any 32-bit message type whose most significant bit is cleared, with the exception of zero. Message types with the high bit set are reserved for use by the hypervisor.
- PayloadSize [in]
-
The number of bytes that are included in the message to which the Message parameter points.
- Message [in]
-
A pointer to a buffer that contains the payload of the message--up to 240 bytes total. The hypervisor sends only the first n bytes to the destination partition, where the caller provides n in the PayloadSize parameter.
Return value
HvPostMessage returns one of the following values. In addition to these values, HvPostMessage can also return one of the values that are specified in Common Hypercall Status Codes.
Return code | Description |
---|---|
|
HvPostMessage successfully sent a message. |
|
The caller's partition privilege flag PostMessages is cleared. |
|
The specified connection identifier is invalid. |
|
One of the following invalid port conditions exists:
|
|
One of the following invalid parameter conditions exists:
|
|
The port has no available guest message buffers. |
|
The target VP no longer exists or there are no available VPs to which the message can be posted. |
|
One of the following invalid SynIC conditions exists:
|
Remarks
If HvPostMessage successfully posts the message, the message will be queued for delivery to a virtual processor within the partition that is associated with the port that is associated with the connection that the ConnectionId parameter identifies.
HvPostMessage has the following restriction:
-
The partition that is the target of the connection must be in the active state.
Native Interface
HvPostMessage | |
---|---|
Call Code = 0x005C | |
Input Parameters | |
0 |
ConnectionId (4 bytes) Padding (4 bytes) |
8 |
MessageType (4 bytes) PayloadSize (4 bytes) |
16 |
Message[0] (8 bytes) |
... | |
248 |
Message[29] (8 bytes) |
Requirements
Version | HvPostMessage 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