Commit abbf3b2a authored by K. Y. Srinivasan's avatar K. Y. Srinivasan Committed by Greg Kroah-Hartman

Drivers: hv: Add state to manage incoming channel interrupt load

Add state to bind a channel to a specific VCPU. This will help us better
distribute incoming interrupt load.
Signed-off-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: default avatarHaiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 917ea427
...@@ -181,7 +181,7 @@ int vmbus_open(struct vmbus_channel *newchannel, u32 send_ringbuffer_size, ...@@ -181,7 +181,7 @@ int vmbus_open(struct vmbus_channel *newchannel, u32 send_ringbuffer_size,
open_msg->ringbuffer_gpadlhandle = newchannel->ringbuffer_gpadlhandle; open_msg->ringbuffer_gpadlhandle = newchannel->ringbuffer_gpadlhandle;
open_msg->downstream_ringbuffer_pageoffset = send_ringbuffer_size >> open_msg->downstream_ringbuffer_pageoffset = send_ringbuffer_size >>
PAGE_SHIFT; PAGE_SHIFT;
open_msg->server_contextarea_gpadlhandle = 0; open_msg->target_vp = newchannel->target_vp;
if (userdatalen > MAX_USER_DEFINED_BYTES) { if (userdatalen > MAX_USER_DEFINED_BYTES) {
err = -EINVAL; err = -EINVAL;
......
...@@ -302,6 +302,8 @@ static void vmbus_onoffer(struct vmbus_channel_message_header *hdr) ...@@ -302,6 +302,8 @@ static void vmbus_onoffer(struct vmbus_channel_message_header *hdr)
offer->connection_id; offer->connection_id;
} }
newchannel->target_vp = 0;
memcpy(&newchannel->offermsg, offer, memcpy(&newchannel->offermsg, offer,
sizeof(struct vmbus_channel_offer_channel)); sizeof(struct vmbus_channel_offer_channel));
newchannel->monitor_grp = (u8)offer->monitorid / 32; newchannel->monitor_grp = (u8)offer->monitorid / 32;
......
...@@ -732,8 +732,15 @@ struct vmbus_channel_open_channel { ...@@ -732,8 +732,15 @@ struct vmbus_channel_open_channel {
/* GPADL for the channel's ring buffer. */ /* GPADL for the channel's ring buffer. */
u32 ringbuffer_gpadlhandle; u32 ringbuffer_gpadlhandle;
/* GPADL for the channel's server context save area. */ /*
u32 server_contextarea_gpadlhandle; * Starting with win8, this field will be used to specify
* the target virtual processor on which to deliver the interrupt for
* the host to guest communication.
* Prior to win8, incoming channel interrupts would only
* be delivered on cpu 0. Setting this value to 0 would
* preserve the earlier behavior.
*/
u32 target_vp;
/* /*
* The upstream ring buffer begins at offset zero in the memory * The upstream ring buffer begins at offset zero in the memory
...@@ -971,6 +978,16 @@ struct vmbus_channel { ...@@ -971,6 +978,16 @@ struct vmbus_channel {
bool is_dedicated_interrupt; bool is_dedicated_interrupt;
struct hv_input_signal_event_buffer sig_buf; struct hv_input_signal_event_buffer sig_buf;
struct hv_input_signal_event *sig_event; struct hv_input_signal_event *sig_event;
/*
* Starting with win8, this field will be used to specify
* the target virtual processor on which to deliver the interrupt for
* the host to guest communication.
* Prior to win8, incoming channel interrupts would only
* be delivered on cpu 0. Setting this value to 0 would
* preserve the earlier behavior.
*/
u32 target_vp;
}; };
static inline void set_channel_read_state(struct vmbus_channel *c, bool state) static inline void set_channel_read_state(struct vmbus_channel *c, bool state)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment