Re: [PATCH] kvm: x86: disable the narrow guest module parameter on unload

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 23/06/21 22:34, Aaron Lewis wrote:
When the kvm_intel module unloads the module parameter
'allow_smaller_maxphyaddr' is not cleared because it is also used 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@xxxxxxxxxx>
---
  arch/x86/kvm/vmx/vmx.c | 2 ++
  1 file changed, 2 insertions(+)

diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/vmx.c
index c2a779b688e6..fd161c9a83fd 100644
--- a/arch/x86/kvm/vmx/vmx.c
+++ b/arch/x86/kvm/vmx/vmx.c
@@ -7996,6 +7996,8 @@ static void vmx_exit(void)
  	}
  #endif
  	vmx_cleanup_l1d_flush();
+
+	allow_smaller_maxphyaddr = false;
  }
  module_exit(vmx_exit);

Queued, thanks.

Paolo




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux