]> git.baikalelectronics.ru Git - kernel.git/commit
kvm: x86: disable the narrow guest module parameter on unload
authorAaron Lewis <aaronlewis@google.com>
Wed, 23 Jun 2021 20:34:27 +0000 (20:34 +0000)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 24 Jun 2021 22:00:49 +0000 (18:00 -0400)
commitc4ad995ae3cdebad5a3fe01673bda58ebe9d4e9c
tree66b176dbc02246d968e296ec41ff844d32797632
parent89f1bb1de3286193e8eeeb0415748563bddc60e6
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>
arch/x86/kvm/vmx/vmx.c