Skip to content
This repository has been archived by the owner on Sep 28, 2024. It is now read-only.

Commit

Permalink
Merge pull request #66 from alexngmsft/lis-next
Browse files Browse the repository at this point in the history
Fix Kdump hang with multiple vCPUs configured.
  • Loading branch information
nickme committed Feb 9, 2016
2 parents 4d5ddb2 + 15d41f5 commit 9395e1f
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 12 deletions.
20 changes: 15 additions & 5 deletions hv-rhel6.x/hv/connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,23 @@ static int vmbus_negotiate_version(struct vmbus_channel_msginfo *msginfo,
msg->interrupt_page = virt_to_phys(vmbus_connection.int_page);
msg->monitor_page1 = virt_to_phys(vmbus_connection.monitor_pages[0]);
msg->monitor_page2 = virt_to_phys(vmbus_connection.monitor_pages[1]);

/*
* We want all channel messages to be delivered on CPU 0.
* This has been the behavior pre-win8. This is not a
* perf issue and having all channel messages delivered on
* CPU 0 would be OK.
* For Win8 and below, we want all channel messages to be delivered
* on CPU 0. This is not a perf issue and having all channel messages
* delivered on CPU 0 would be OK.
*
* For Win 8.1 and above, we want messages delivered on current
* CPU, as this is necessary when a connection already exists.
* For example, in the case of a crash kernel coming up.
*/
msg->target_vcpu = 0;
if (version >= VERSION_WIN8_1) {
msg->target_vcpu = hv_context.vp_index[get_cpu()];
put_cpu();
}
else {
msg->target_vcpu = 0;
}

/*
* Add to list before we send the request since we may
Expand Down
23 changes: 16 additions & 7 deletions hv-rhel7.x/hv/connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,22 @@ static int vmbus_negotiate_version(struct vmbus_channel_msginfo *msginfo,
msg->monitor_page1 = virt_to_phys(vmbus_connection.monitor_pages[0]);
msg->monitor_page2 = virt_to_phys(vmbus_connection.monitor_pages[1]);

/*
* We want all channel messages to be delivered on CPU 0.
* This has been the behavior pre-win8. This is not
* perf issue and having all channel messages delevered on
* CPU 0 would be OK.
*/
msg->target_vcpu = 0;
/*
* For Win8 and below, we want all channel messages to be delivered
* on CPU 0. This is not a perf issue and having all channel messages
* delivered on CPU 0 would be OK.
*
* For Win 8.1 and above, we want messages delivered on current
* CPU, as this is necessary when a connection already exists.
* For example, in the case of a crash kernel coming up.
*/
if (version >= VERSION_WIN8_1) {
msg->target_vcpu = hv_context.vp_index[get_cpu()];
put_cpu();
}
else {
msg->target_vcpu = 0;
}

/*
* Add to list before we send the request since we may
Expand Down

0 comments on commit 9395e1f

Please sign in to comment.