aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hv/hv.c
diff options
context:
space:
mode:
authorK. Y. Srinivasan <kys@microsoft.com>2012-07-24 19:11:58 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-08-13 21:42:25 -0400
commit83ba0c4f3f317270dae5597d8044b795d119914c (patch)
tree1db3640642f68f5e57de0404a8e7a47ac2bbc899 /drivers/hv/hv.c
parent0d7614f09c1ebdbaa1599a5aba7593f147bf96ee (diff)
Drivers: hv: Cleanup the guest ID computation
The current guest ID string in use in vmbus driver does not conform to the MSFT guidelines on guest ID. MSFT currently does not specify Linux specific guidelines. MSFT however has plans to publish Linux specific guidelines. This implementation conforms to the yet unpublished Linux specific guidelines for guest ID. This implementation also broadly conforms to the current guidelines as well. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com> Cc: Bjørn Mork <bjorn@mork.no> Cc: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hv/hv.c')
-rw-r--r--drivers/hv/hv.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/hv/hv.c b/drivers/hv/hv.c
index 86f8885aeb45..771e24f2981d 100644
--- a/drivers/hv/hv.c
+++ b/drivers/hv/hv.c
@@ -26,6 +26,7 @@
26#include <linux/slab.h> 26#include <linux/slab.h>
27#include <linux/vmalloc.h> 27#include <linux/vmalloc.h>
28#include <linux/hyperv.h> 28#include <linux/hyperv.h>
29#include <linux/version.h>
29#include <asm/hyperv.h> 30#include <asm/hyperv.h>
30#include "hyperv_vmbus.h" 31#include "hyperv_vmbus.h"
31 32
@@ -164,9 +165,11 @@ int hv_init(void)
164 165
165 max_leaf = query_hypervisor_info(); 166 max_leaf = query_hypervisor_info();
166 167
167 /* Write our OS info */ 168 /*
168 wrmsrl(HV_X64_MSR_GUEST_OS_ID, HV_LINUX_GUEST_ID); 169 * Write our OS ID.
169 hv_context.guestid = HV_LINUX_GUEST_ID; 170 */
171 hv_context.guestid = generate_guest_id(0, LINUX_VERSION_CODE, 0);
172 wrmsrl(HV_X64_MSR_GUEST_OS_ID, hv_context.guestid);
170 173
171 /* See if the hypercall page is already set */ 174 /* See if the hypercall page is already set */
172 rdmsrl(HV_X64_MSR_HYPERCALL, hypercall_msr.as_uint64); 175 rdmsrl(HV_X64_MSR_HYPERCALL, hypercall_msr.as_uint64);