[PATCH 27/28] Drivers: hv: Capture the host build information
From: K. Y. Srinivasan
Date: Sat Dec 01 2012 - 09:25:11 EST
Capture the host build information so it can be presented along with the
negotiated vmbus version information.
Signed-off-by: K. Y. Srinivasan <kys@xxxxxxxxxxxxx>
Reviewed-by: Haiyang Zhang <haiyangz@xxxxxxxxxxxxx>
---
drivers/hv/hv.c | 9 +++++++++
drivers/hv/hyperv_vmbus.h | 7 +++++++
2 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c
index 03e6a1e..0cd2da3 100644
--- a/drivers/hv/hv.c
+++ b/drivers/hv/hv.c
@@ -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;
@@ -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;
}
diff --git a/drivers/hv/hyperv_vmbus.h b/drivers/hv/hyperv_vmbus.h
index ac111f2..12f2f9e 100644
--- a/drivers/hv/hyperv_vmbus.h
+++ b/drivers/hv/hyperv_vmbus.h
@@ -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 */
--
1.7.4.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/