kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Aaron Lewis <aaronlewis@google.com>, kvm@vger.kernel.org
Cc: jmattson@google.com, mgamal@redhat.com
Subject: Re: [PATCH] kvm: x86: disable the narrow guest module parameter on unload
Date: Wed, 23 Jun 2021 23:36:32 +0200	[thread overview]
Message-ID: <9846d951-7afc-cb68-7a76-30201746c095@redhat.com> (raw)
In-Reply-To: <20210623203426.1891402-1-aaronlewis@google.com>

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@google.com>
> ---
>   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


      parent reply	other threads:[~2021-06-23 21:36 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-23 20:34 [PATCH] kvm: x86: disable the narrow guest module parameter on unload Aaron Lewis
2021-06-23 20:47 ` Jim Mattson
2021-06-23 21:37   ` Paolo Bonzini
2021-06-23 21:36 ` Paolo Bonzini [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9846d951-7afc-cb68-7a76-30201746c095@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=aaronlewis@google.com \
    --cc=jmattson@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=mgamal@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).