Drivers: hv: Cleanup and consolidate reporting of build/version info

Now, cleanup and consolidate reporting of host and vmbus version numbers.

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>
This commit is contained in:
K. Y. Srinivasan 2012-12-01 06:46:59 -08:00 committed by Greg Kroah-Hartman
parent 5fbebb2d20
commit 3bacaf0ce1
2 changed files with 7 additions and 11 deletions

View File

@ -120,9 +120,6 @@ static int vmbus_negotiate_version(struct vmbus_channel_msginfo *msginfo,
if (msginfo->response.version_response.version_supported) { if (msginfo->response.version_response.version_supported) {
vmbus_connection.conn_state = CONNECTED; vmbus_connection.conn_state = CONNECTED;
} else { } else {
pr_err("Unable to connect, "
"Version %d not supported by Hyper-V\n",
version);
return -ECONNREFUSED; return -ECONNREFUSED;
} }
@ -208,11 +205,17 @@ int vmbus_connect(void)
goto cleanup; goto cleanup;
vmbus_proto_version = version; vmbus_proto_version = version;
pr_info("Negotiated host information %d\n", version); pr_info("Hyper-V Host Build:%d-%d.%d-%d-%d.%d; Vmbus version:%d.%d\n",
host_info_eax, host_info_ebx >> 16,
host_info_ebx & 0xFFFF, host_info_ecx,
host_info_edx >> 24, host_info_edx & 0xFFFFFF,
version >> 16, version & 0xFFFF);
kfree(msginfo); kfree(msginfo);
return 0; return 0;
cleanup: cleanup:
pr_err("Unable to connect to host\n");
vmbus_connection.conn_state = DISCONNECTED; vmbus_connection.conn_state = DISCONNECTED;
if (vmbus_connection.work_queue) if (vmbus_connection.work_queue)

View File

@ -74,13 +74,6 @@ static int query_hypervisor_info(void)
edx = 0; edx = 0;
op = HVCPUID_VERSION; op = HVCPUID_VERSION;
cpuid(op, &eax, &ebx, &ecx, &edx); cpuid(op, &eax, &ebx, &ecx, &edx);
pr_info("Hyper-V Host OS Build:%d-%d.%d-%d-%d.%d\n",
eax,
ebx >> 16,
ebx & 0xFFFF,
ecx,
edx >> 24,
edx & 0xFFFFFF);
host_info_eax = eax; host_info_eax = eax;
host_info_ebx = ebx; host_info_ebx = ebx;
host_info_ecx = ecx; host_info_ecx = ecx;