public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] Drivers: hv: vmbus: Add additional distro specific Kconfig options
@ 2013-04-10 16:08 K. Y. Srinivasan
  2013-04-10 15:49 ` Greg KH
  0 siblings, 1 reply; 6+ messages in thread
From: K. Y. Srinivasan @ 2013-04-10 16:08 UTC (permalink / raw)
  To: gregkh, linux-kernel, devel, olaf, apw, jasowang; +Cc: K. Y. Srinivasan

The guest ID captures information about the guest and has room for
distributions to add distro specific information. Add Kconfig options
to support distro specific information to be managed easily.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
---
 drivers/hv/Kconfig        |   14 ++++++++++++++
 drivers/hv/hv.c           |    4 +++-
 drivers/hv/hyperv_vmbus.h |    2 +-
 3 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/drivers/hv/Kconfig b/drivers/hv/Kconfig
index 0403b51..d2ca9c7 100644
--- a/drivers/hv/Kconfig
+++ b/drivers/hv/Kconfig
@@ -19,4 +19,18 @@ config HYPERV_BALLOON
 	help
 	  Select this option to enable Hyper-V Balloon driver.
 
+config HYPERV_GUEST_D1
+	hex "Distro specific information"
+	range 0x00 0xff
+	default 0
+	help
+	  This specifies the Distro vendor
+
+config HYPERV_GUEST_D2
+	hex "Additional Distro specific information"
+	range 0x0000 0xffff
+	default 0
+	help
+	  Additional Distro specific kernel version information
+
 endmenu
diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c
index ae49237..7bd2e88 100644
--- a/drivers/hv/hv.c
+++ b/drivers/hv/hv.c
@@ -148,7 +148,9 @@ int hv_init(void)
 	/*
 	 * Write our OS ID.
 	 */
-	hv_context.guestid = generate_guest_id(0, LINUX_VERSION_CODE, 0);
+	hv_context.guestid = generate_guest_id(HYPERV_GUEST_D1,
+						LINUX_VERSION_CODE,
+						HYPERV_GUEST_D2);
 	wrmsrl(HV_X64_MSR_GUEST_OS_ID, hv_context.guestid);
 
 	/* See if the hypercall page is already set */
diff --git a/drivers/hv/hyperv_vmbus.h b/drivers/hv/hyperv_vmbus.h
index 12f2f9e..8c9ebd0 100644
--- a/drivers/hv/hyperv_vmbus.h
+++ b/drivers/hv/hyperv_vmbus.h
@@ -410,7 +410,7 @@ enum {
  *
  * Bit(s)
  * 63 - Indicates if the OS is Open Source or not; 1 is Open Source
- * 62:56 - Os Type; Linux is 0x100
+ * 62:56 - Os Type; Linux is 0x1
  * 55:48 - Distro specific identification
  * 47:16 - Linux kernel version number
  * 15:0  - Distro specific identification
-- 
1.7.4.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2013-04-10 17:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-10 16:08 [PATCH 1/1] Drivers: hv: vmbus: Add additional distro specific Kconfig options K. Y. Srinivasan
2013-04-10 15:49 ` Greg KH
2013-04-10 16:12   ` KY Srinivasan
2013-04-10 16:33     ` Greg KH
2013-04-10 17:37       ` KY Srinivasan
2013-04-10 17:50         ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox