diff options
-rw-r--r-- | drivers/hv/channel.c | 2 | ||||
-rw-r--r-- | drivers/hv/channel_mgmt.c | 2 | ||||
-rw-r--r-- | include/linux/hyperv.h | 21 |
3 files changed, 22 insertions, 3 deletions
diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c index 70a34daa04c1..9303252b2e19 100644 --- a/drivers/hv/channel.c +++ b/drivers/hv/channel.c | |||
@@ -181,7 +181,7 @@ int vmbus_open(struct vmbus_channel *newchannel, u32 send_ringbuffer_size, | |||
181 | open_msg->ringbuffer_gpadlhandle = newchannel->ringbuffer_gpadlhandle; | 181 | open_msg->ringbuffer_gpadlhandle = newchannel->ringbuffer_gpadlhandle; |
182 | open_msg->downstream_ringbuffer_pageoffset = send_ringbuffer_size >> | 182 | open_msg->downstream_ringbuffer_pageoffset = send_ringbuffer_size >> |
183 | PAGE_SHIFT; | 183 | PAGE_SHIFT; |
184 | open_msg->server_contextarea_gpadlhandle = 0; | 184 | open_msg->target_vp = newchannel->target_vp; |
185 | 185 | ||
186 | if (userdatalen > MAX_USER_DEFINED_BYTES) { | 186 | if (userdatalen > MAX_USER_DEFINED_BYTES) { |
187 | err = -EINVAL; | 187 | err = -EINVAL; |
diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c index f4d990285d99..56ed45c74d01 100644 --- a/drivers/hv/channel_mgmt.c +++ b/drivers/hv/channel_mgmt.c | |||
@@ -302,6 +302,8 @@ static void vmbus_onoffer(struct vmbus_channel_message_header *hdr) | |||
302 | offer->connection_id; | 302 | offer->connection_id; |
303 | } | 303 | } |
304 | 304 | ||
305 | newchannel->target_vp = 0; | ||
306 | |||
305 | memcpy(&newchannel->offermsg, offer, | 307 | memcpy(&newchannel->offermsg, offer, |
306 | sizeof(struct vmbus_channel_offer_channel)); | 308 | sizeof(struct vmbus_channel_offer_channel)); |
307 | newchannel->monitor_grp = (u8)offer->monitorid / 32; | 309 | newchannel->monitor_grp = (u8)offer->monitorid / 32; |
diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h index c6e2c44a1be9..8c3cb1fc34d4 100644 --- a/include/linux/hyperv.h +++ b/include/linux/hyperv.h | |||
@@ -732,8 +732,15 @@ struct vmbus_channel_open_channel { | |||
732 | /* GPADL for the channel's ring buffer. */ | 732 | /* GPADL for the channel's ring buffer. */ |
733 | u32 ringbuffer_gpadlhandle; | 733 | u32 ringbuffer_gpadlhandle; |
734 | 734 | ||
735 | /* GPADL for the channel's server context save area. */ | 735 | /* |
736 | u32 server_contextarea_gpadlhandle; | 736 | * Starting with win8, this field will be used to specify |
737 | * the target virtual processor on which to deliver the interrupt for | ||
738 | * the host to guest communication. | ||
739 | * Prior to win8, incoming channel interrupts would only | ||
740 | * be delivered on cpu 0. Setting this value to 0 would | ||
741 | * preserve the earlier behavior. | ||
742 | */ | ||
743 | u32 target_vp; | ||
737 | 744 | ||
738 | /* | 745 | /* |
739 | * The upstream ring buffer begins at offset zero in the memory | 746 | * The upstream ring buffer begins at offset zero in the memory |
@@ -971,6 +978,16 @@ struct vmbus_channel { | |||
971 | bool is_dedicated_interrupt; | 978 | bool is_dedicated_interrupt; |
972 | struct hv_input_signal_event_buffer sig_buf; | 979 | struct hv_input_signal_event_buffer sig_buf; |
973 | struct hv_input_signal_event *sig_event; | 980 | struct hv_input_signal_event *sig_event; |
981 | |||
982 | /* | ||
983 | * Starting with win8, this field will be used to specify | ||
984 | * the target virtual processor on which to deliver the interrupt for | ||
985 | * the host to guest communication. | ||
986 | * Prior to win8, incoming channel interrupts would only | ||
987 | * be delivered on cpu 0. Setting this value to 0 would | ||
988 | * preserve the earlier behavior. | ||
989 | */ | ||
990 | u32 target_vp; | ||
974 | }; | 991 | }; |
975 | 992 | ||
976 | static inline void set_channel_read_state(struct vmbus_channel *c, bool state) | 993 | static inline void set_channel_read_state(struct vmbus_channel *c, bool state) |