Date: Wed, 25 May 2016 06:01:47 +0000 (UTC) From: Sepherosa Ziehau <sephe@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r300655 - head/sys/dev/hyperv/vmbus Message-ID: <201605250601.u4P61lkI097995@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201605250601.u4P61lkI097995>