svn commit: r300655 - head/sys/dev/hyperv/vmbus

Sepherosa Ziehau sephe at FreeBSD.org
Wed May 25 06:01:49 UTC 2016


Author: sephe
Date: Wed May 25 06:01:47 2016
New Revision: 300655
URL: https://svnweb.freebsd.org/changeset/base/300655

Log:
  hyperv: Preserve required bits when disable Hypercall
  
  MFC after:	1 week
  Sponsored by:	Microsoft OSTC
  Differential Revision:	https://reviews.freebsd.org/D6530

Modified:
  head/sys/dev/hyperv/vmbus/hv_hv.c

Modified: head/sys/dev/hyperv/vmbus/hv_hv.c
==============================================================================
--- head/sys/dev/hyperv/vmbus/hv_hv.c	Wed May 25 05:53:12 2016	(r300654)
+++ head/sys/dev/hyperv/vmbus/hv_hv.c	Wed May 25 06:01:47 2016	(r300655)
@@ -390,11 +390,14 @@ SYSINIT(hypercall_ctor, SI_SUB_DRIVERS, 
 static void
 hypercall_destroy(void *arg __unused)
 {
+	uint64_t hc;
+
 	if (hypercall_context.hc_addr == NULL)
 		return;
 
 	/* Disable Hypercall */
-	wrmsr(MSR_HV_HYPERCALL, 0);
+	hc = rdmsr(MSR_HV_HYPERCALL);
+	wrmsr(MSR_HV_HYPERCALL, (hc & MSR_HV_HYPERCALL_RSVD_MASK));
 	hypercall_memfree();
 
 	if (bootverbose)


More information about the svn-src-all mailing list