hyperv: Preserve required bits when disable Hypercall
MFC after: 1 week Sponsored by: Microsoft OSTC Differential Revision: https://reviews.freebsd.org/D6530
This commit is contained in:
parent
6d6baea80d
commit
dade2a02e3
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=300655
@ -390,11 +390,14 @@ SYSINIT(hypercall_ctor, SI_SUB_DRIVERS, SI_ORDER_FIRST, hypercall_create, NULL);
|
||||
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)
|
||||
|
Loading…
Reference in New Issue
Block a user