Blob Blame History Raw
Subject: hv: set guest os id
From: <ohering@suse.de>
Patch-mainline: Never, this change carry until upstream provides better method
References: bnc#814005

Give the host more detailed info about the running guest.
Provide the guest OS id.

A better change is pending.

Acked-by: Olaf Hering <ohering@suse.de>
---
 arch/x86/hyperv/hv_init.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

--- a/arch/x86/hyperv/hv_init.c
+++ b/arch/x86/hyperv/hv_init.c
@@ -113,6 +113,8 @@ void hyperv_init(void)
 {
 	u64 guest_id;
 	union hv_x64_msr_hypercall_contents hypercall_msr;
+	__u8 d1 = 0x10; /* SuSE */
+	__u16 d2 = 0x0; /* -d of a.b.c-d */
 
 	if (x86_hyper != &x86_hyper_ms_hyperv)
 		return;
@@ -122,7 +124,7 @@ void hyperv_init(void)
 	 * 1. Register the guest ID
 	 * 2. Enable the hypercall and register the hypercall page
 	 */
-	guest_id = generate_guest_id(0, LINUX_VERSION_CODE, 0);
+	guest_id = generate_guest_id(d1, LINUX_VERSION_CODE, d2);
 	wrmsrl(HV_X64_MSR_GUEST_OS_ID, guest_id);
 
 	hv_hypercall_pg  = __vmalloc(PAGE_SIZE, GFP_KERNEL, PAGE_KERNEL_RX);