hyperv/vmbus: Define type for channel messages.
And fix message processing; only channel messages are supported. MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6706
This commit is contained in:
parent
10afae237a
commit
bacfbc0952
@ -373,8 +373,8 @@ int hv_vmbus_post_message(void *buffer, size_t bufferLen)
|
||||
* insufficient resources. 20 times should suffice in practice.
|
||||
*/
|
||||
for (retries = 0; retries < 20; retries++) {
|
||||
ret = hv_vmbus_post_msg_via_msg_ipc(connId, 1, buffer,
|
||||
bufferLen);
|
||||
ret = hv_vmbus_post_msg_via_msg_ipc(connId,
|
||||
VMBUS_MSGTYPE_CHANNEL, buffer, bufferLen);
|
||||
if (ret == HV_STATUS_SUCCESS)
|
||||
return (0);
|
||||
|
||||
|
@ -85,8 +85,13 @@ vmbus_msg_task(void *xsc, int pending __unused)
|
||||
hv_vmbus_channel_msg_header *hdr;
|
||||
hv_vmbus_channel_msg_type msg_type;
|
||||
|
||||
if (msg->msg_type == VMBUS_MSGTYPE_NONE)
|
||||
break; /* no message */
|
||||
if (msg->msg_type == VMBUS_MSGTYPE_NONE) {
|
||||
/* No message */
|
||||
break;
|
||||
} else if (msg->msg_type != VMBUS_MSGTYPE_CHANNEL) {
|
||||
/* Not a channel message */
|
||||
goto handled;
|
||||
}
|
||||
|
||||
/* XXX: update messageHandler interface */
|
||||
hdr = __DEVOLATILE(hv_vmbus_channel_msg_header *,
|
||||
|
@ -49,6 +49,7 @@ struct vmbus_message {
|
||||
CTASSERT(sizeof(struct vmbus_message) == VMBUS_MSG_SIZE);
|
||||
|
||||
#define VMBUS_MSGTYPE_NONE 0
|
||||
#define VMBUS_MSGTYPE_CHANNEL 1
|
||||
#define VMBUS_MSGTYPE_TIMER_EXPIRED 0x80000010
|
||||
|
||||
#define VMBUS_MSGFLAG_PENDING 0x01
|
||||
|
Loading…
Reference in New Issue
Block a user