All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Jim Mattson <jmattson@google.com>,
	Sean Christopherson <seanjc@google.com>
Cc: Vitaly Kuznetsov <vkuznets@redhat.com>,
	Wanpeng Li <wanpengli@tencent.com>,
	Joerg Roedel <joro@8bytes.org>, kvm list <kvm@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/4] KVM: x86: WARN and reject loading KVM if NX is supported but not enabled
Date: Fri, 18 Jun 2021 12:27:27 +0200	[thread overview]
Message-ID: <6ea2385a-9abe-82b8-6c57-8dc3aac824b2@redhat.com> (raw)
In-Reply-To: <CALMp9eSkVaDfCJwW1eds=7H7yn2pKJPKoFVpc1GQcEqGD5S0Dg@mail.gmail.com>

On 16/06/21 00:39, Jim Mattson wrote:
>>
>>          rdmsrl_safe(MSR_EFER, &host_efer);
>> +       if (WARN_ON_ONCE(boot_cpu_has(X86_FEATURE_NX) &&
>> +                        !(host_efer & EFER_NX)))
>> +               return -EIO;
> Input/output error? Is that really the most appropriate error here?
> Why not, say, -ENOTSUP?
> 
> I'm sure there's some arcane convention here that I'm not privy to.:-)
> 
> Reviewed-by: Jim Mattson<jmattson@google.com>
> 

EIO often means "how the heck did we get here?" or "look in dmesg to get 
more info", both of which I think are appropriate after a WARN.

Paolo


  reply	other threads:[~2021-06-18 10:27 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-15 16:45 [PATCH 0/4] KVM: x86: Require EFER.NX support unless EPT is on Sean Christopherson
2021-06-15 16:45 ` [PATCH 1/4] KVM: VMX: Refuse to load kvm_intel if EPT and NX are disabled Sean Christopherson
2021-06-15 22:26   ` Jim Mattson
2021-06-15 16:45 ` [PATCH 2/4] KVM: SVM: Refuse to load kvm_amd if NX support is not available Sean Christopherson
2021-06-15 22:30   ` Jim Mattson
2021-06-15 16:45 ` [PATCH 3/4] KVM: x86: WARN and reject loading KVM if NX is supported but not enabled Sean Christopherson
2021-06-15 22:39   ` Jim Mattson
2021-06-18 10:27     ` Paolo Bonzini [this message]
2021-06-24 22:33   ` Sean Christopherson
2021-06-25  9:04     ` Paolo Bonzini
2021-07-07 12:09       ` Naresh Kamboju
2021-07-07 12:09         ` Naresh Kamboju
2021-07-07 14:15         ` Paolo Bonzini
2021-06-15 16:45 ` [PATCH 4/4] KVM: x86: Simplify logic to handle lack of host NX support Sean Christopherson
2021-06-15 22:58   ` Jim Mattson
2021-06-15 23:33     ` Sean Christopherson
2021-06-18 10:31       ` Paolo Bonzini
2021-06-18 10:32 ` [PATCH 0/4] KVM: x86: Require EFER.NX support unless EPT is on Paolo Bonzini

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=6ea2385a-9abe-82b8-6c57-8dc3aac824b2@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.