Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/hyperv/vmbus/vmbus.c
Show First 20 Lines • Show All 80 Lines • ▼ Show 20 Lines | vmbus_msg_task(void *xsc, int pending __unused) | ||||
msg = VMBUS_PCPU_GET(sc, message, curcpu) + VMBUS_SINT_MESSAGE; | msg = VMBUS_PCPU_GET(sc, message, curcpu) + VMBUS_SINT_MESSAGE; | ||||
for (;;) { | for (;;) { | ||||
if (msg->msg_type == VMBUS_MSGTYPE_NONE) { | if (msg->msg_type == VMBUS_MSGTYPE_NONE) { | ||||
/* No message */ | /* No message */ | ||||
break; | break; | ||||
} else if (msg->msg_type == VMBUS_MSGTYPE_CHANNEL) { | } else if (msg->msg_type == VMBUS_MSGTYPE_CHANNEL) { | ||||
/* Channel message */ | /* Channel message */ | ||||
vmbus_chan_msgproc(sc, msg); | vmbus_chan_msgproc(sc, | ||||
__DEVOLATILE(const struct vmbus_message *, msg)); | |||||
} | } | ||||
msg->msg_type = VMBUS_MSGTYPE_NONE; | msg->msg_type = VMBUS_MSGTYPE_NONE; | ||||
/* | /* | ||||
* Make sure the write to msg_type (i.e. set to | * Make sure the write to msg_type (i.e. set to | ||||
* VMBUS_MSGTYPE_NONE) happens before we read the | * VMBUS_MSGTYPE_NONE) happens before we read the | ||||
* msg_flags and EOMing. Otherwise, the EOMing will | * msg_flags and EOMing. Otherwise, the EOMing will | ||||
* not deliver any more messages since there is no | * not deliver any more messages since there is no | ||||
▲ Show 20 Lines • Show All 649 Lines • Show Last 20 Lines |