Skip to content

Commit

Permalink
Drivers: hv: Capture the host build information
Browse files Browse the repository at this point in the history
Capture the host build information so it can be presented along with the
negotiated vmbus version information.

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>
  • Loading branch information
K. Y. Srinivasan authored and Greg Kroah-Hartman committed Jan 17, 2013
1 parent c2b8e52 commit 5fbebb2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
9 changes: 9 additions & 0 deletions drivers/hv/hv.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ struct hv_context hv_context = {
/*
* query_hypervisor_info - Get version info of the windows hypervisor
*/
unsigned int host_info_eax;
unsigned int host_info_ebx;
unsigned int host_info_ecx;
unsigned int host_info_edx;

static int query_hypervisor_info(void)
{
unsigned int eax;
Expand Down Expand Up @@ -76,6 +81,10 @@ static int query_hypervisor_info(void)
ecx,
edx >> 24,
edx & 0xFFFFFF);
host_info_eax = eax;
host_info_ebx = ebx;
host_info_ecx = ecx;
host_info_edx = edx;
}
return max_leaf;
}
Expand Down
7 changes: 7 additions & 0 deletions drivers/hv/hyperv_vmbus.h
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,13 @@ extern void hv_synic_init(void *irqarg);

extern void hv_synic_cleanup(void *arg);

/*
* Host version information.
*/
extern unsigned int host_info_eax;
extern unsigned int host_info_ebx;
extern unsigned int host_info_ecx;
extern unsigned int host_info_edx;

/* Interface */

Expand Down

0 comments on commit 5fbebb2

Please sign in to comment.