diff options
author | K. Y. Srinivasan <kys@microsoft.com> | 2012-12-01 09:46:45 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-01-17 14:34:37 -0500 |
commit | b3bf60c7b4665d40b8eae2217b54c4745f49f470 (patch) | |
tree | 8d07f29611a65b6b4b06ab95365aadcd77fdf399 /drivers/hv/channel_mgmt.c | |
parent | eafa7072e7cd806dff42b705284ca26189e527a4 (diff) |
Drivers: hv: Manage signaling state on a per-connection basis
The current code has a global handle for supporting signaling of the host
from guest. Make this a per-channel attribute as on some versions of the
host we can signal on per-channel handle.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hv/channel_mgmt.c')
-rw-r--r-- | drivers/hv/channel_mgmt.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c index 7bf59177aaf8..f4d990285d99 100644 --- a/drivers/hv/channel_mgmt.c +++ b/drivers/hv/channel_mgmt.c | |||
@@ -282,6 +282,26 @@ static void vmbus_onoffer(struct vmbus_channel_message_header *hdr) | |||
282 | */ | 282 | */ |
283 | newchannel->batched_reading = true; | 283 | newchannel->batched_reading = true; |
284 | 284 | ||
285 | /* | ||
286 | * Setup state for signalling the host. | ||
287 | */ | ||
288 | newchannel->sig_event = (struct hv_input_signal_event *) | ||
289 | (ALIGN((unsigned long) | ||
290 | &newchannel->sig_buf, | ||
291 | HV_HYPERCALL_PARAM_ALIGN)); | ||
292 | |||
293 | newchannel->sig_event->connectionid.asu32 = 0; | ||
294 | newchannel->sig_event->connectionid.u.id = VMBUS_EVENT_CONNECTION_ID; | ||
295 | newchannel->sig_event->flag_number = 0; | ||
296 | newchannel->sig_event->rsvdz = 0; | ||
297 | |||
298 | if (vmbus_proto_version != VERSION_WS2008) { | ||
299 | newchannel->is_dedicated_interrupt = | ||
300 | (offer->is_dedicated_interrupt != 0); | ||
301 | newchannel->sig_event->connectionid.u.id = | ||
302 | offer->connection_id; | ||
303 | } | ||
304 | |||
285 | memcpy(&newchannel->offermsg, offer, | 305 | memcpy(&newchannel->offermsg, offer, |
286 | sizeof(struct vmbus_channel_offer_channel)); | 306 | sizeof(struct vmbus_channel_offer_channel)); |
287 | newchannel->monitor_grp = (u8)offer->monitorid / 32; | 307 | newchannel->monitor_grp = (u8)offer->monitorid / 32; |