kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Sean Christopherson <seanjc@google.com>
Cc: Vitaly Kuznetsov <vkuznets@redhat.com>,
	Wanpeng Li <wanpengli@tencent.com>,
	Jim Mattson <jmattson@google.com>, Joerg Roedel <joro@8bytes.org>,
	kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Revert "KVM: x86: WARN and reject loading KVM if NX is supported but not enabled"
Date: Thu, 8 Jul 2021 18:17:59 +0200	[thread overview]
Message-ID: <28ec9d07-756b-f546-dad1-0af751167838@redhat.com> (raw)
In-Reply-To: <20210625001853.318148-1-seanjc@google.com>

On 25/06/21 02:18, Sean Christopherson wrote:
> Let KVM load if EFER.NX=0 even if NX is supported, the analysis and
> testing (or lack thereof) for the non-PAE host case was garbage.
> 
> If the kernel won't be using PAE paging, .Ldefault_entry in head_32.S
> skips over the entire EFER sequence.  Hopefully that can be changed in
> the future to allow KVM to require EFER.NX, but the motivation behind
> KVM's requirement isn't yet merged.  Reverting and revisiting the mess
> at a later date is by far the safest approach.
> 
> This reverts commit 8bbed95d2cb6e5de8a342d761a89b0a04faed7be.
> 
> Fixes: 8bbed95d2cb6 ("KVM: x86: WARN and reject loading KVM if NX is supported but not enabled")
> Signed-off-by: Sean Christopherson <seanjc@google.com>
> ---
> 
> Hopefully it's not too late to just drop the original patch...
> 
>   arch/x86/kvm/x86.c | 3 ---
>   1 file changed, 3 deletions(-)
> 
> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> index 4a597aafe637..1cc02a3685d0 100644
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -10981,9 +10981,6 @@ int kvm_arch_hardware_setup(void *opaque)
>   	int r;
>   
>   	rdmsrl_safe(MSR_EFER, &host_efer);
> -	if (WARN_ON_ONCE(boot_cpu_has(X86_FEATURE_NX) &&
> -			 !(host_efer & EFER_NX)))
> -		return -EIO;
>   
>   	if (boot_cpu_has(X86_FEATURE_XSAVES))
>   		rdmsrl(MSR_IA32_XSS, host_xss);
> 

So do we want this or "depends on X86_64 || X86_PAE"?

Paolo


  reply	other threads:[~2021-07-08 16:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-25  0:18 [PATCH] Revert "KVM: x86: WARN and reject loading KVM if NX is supported but not enabled" Sean Christopherson
2021-07-08 16:17 ` Paolo Bonzini [this message]
2021-07-09 17:21   ` Sean Christopherson
2021-07-09 17:32     ` Paolo Bonzini
2021-07-12  7:52     ` Yu Zhang
2021-07-12 14:36       ` Sean Christopherson
2021-07-13  3:59         ` Yu Zhang
2021-07-21 21:28           ` Sean Christopherson

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=28ec9d07-756b-f546-dad1-0af751167838@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=jmattson@google.com \
    --cc=joro@8bytes.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=seanjc@google.com \
    --cc=vkuznets@redhat.com \
    --cc=wanpengli@tencent.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).