aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorGravatar Aaron Lewis <aaronlewis@google.com> 2021-06-23 20:34:27 +0000
committerGravatar Paolo Bonzini <pbonzini@redhat.com> 2021-06-24 18:00:49 -0400
commit88213da2351479c529c368a9b763c4d52f02255b (patch)
tree66b176dbc02246d968e296ec41ff844d32797632 /arch
parentselftests: kvm: Allows userspace to handle emulation errors. (diff)
downloadlinux-88213da2351479c529c368a9b763c4d52f02255b.tar.gz
linux-88213da2351479c529c368a9b763c4d52f02255b.tar.bz2
linux-88213da2351479c529c368a9b763c4d52f02255b.zip
kvm: x86: disable the narrow guest module parameter on unload
When the kvm_intel module unloads the module parameter 'allow_smaller_maxphyaddr' is not cleared because the backing variable is defined in the kvm module. As a result, if the module parameter's state was set before kvm_intel unloads, it will also be set when it reloads. Explicitly clear the state in vmx_exit() to prevent this from happening. Signed-off-by: Aaron Lewis <aaronlewis@google.com> Message-Id: <20210623203426.1891402-1-aaronlewis@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Jim Mattson <jmattson@google.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/x86/kvm/vmx/vmx.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
index 5a1067c42f3a..104bbbe2dfd0 100644
--- a/arch/x86/kvm/vmx/vmx.c
+++ b/arch/x86/kvm/vmx/vmx.c
@@ -7925,6 +7925,8 @@ static void vmx_exit(void)
}
#endif
vmx_cleanup_l1d_flush();
+
+ allow_smaller_maxphyaddr = false;
}
module_exit(vmx_exit);