Commit 88213da2 authored by Aaron Lewis's avatar Aaron Lewis Committed by Paolo Bonzini
Browse files

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: default avatarAaron Lewis <aaronlewis@google.com>
Message-Id: <20210623203426.1891402-1-aaronlewis@google.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Reviewed-by: default avatarJim Mattson <jmattson@google.com>
parent 39bbcc3a
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -7925,6 +7925,8 @@ static void vmx_exit(void)
	}
#endif
	vmx_cleanup_l1d_flush();

	allow_smaller_maxphyaddr = false;
}
module_exit(vmx_exit);