From: Borislav Petkov <bp@alien8.de>
To: Sean Christopherson <seanjc@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org, Paolo Bonzini <pbonzini@redhat.com>,
"H. Peter Anvin" <hpa@zytor.com>,
linux-kernel@vger.kernel.org, kvm@vger.kernel.org
Subject: Re: [PATCH 1/3] x86/cpu: Process all CPUID dependencies after identifying CPU info
Date: Thu, 8 Dec 2022 17:45:36 +0100 [thread overview]
Message-ID: <Y5IUsB83PzHCJ+EY@zn.tnic> (raw)
In-Reply-To: <Y5IQNY/fZw2JFA0B@google.com>
On Thu, Dec 08, 2022 at 04:26:29PM +0000, Sean Christopherson wrote:
> But it's not really a hardware issue either. More like an admin/user issue.
>
> The problem is that if a kernel is built for subset of CPU types, e.g. just Intel
> or just Centaur, and then booted on an "unsupported" CPU type, init_ia32_feat_ctl()
> will never be invoked because ->c_init() will point a default_init(), and so the
> kernel never checks MSR_IA32_FEAT_CTL to see if VMX and/or SGX are fully enabled.
Yeah, you called it an "edge case". I'm wondering whether we should even
worry about that case...
I mean, the majority of Linuxes out there are allmodconfig-like kernels
and booting on unsupported CPU type doesn't happen.
Hell, I'd even say that if you attempt booting on unsupported CPU type,
we should simply fail that boot attempt.
I.e., what validate_cpu() does in some cases.
IOW, I don't mind what you're doing but I wonder whether we should even
go the trouble to do so or simply deny that by saying "Well, don't do
that then".
Hmmm.
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
next prev parent reply other threads:[~2022-12-08 16:45 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-03 0:37 [PATCH 0/3] x86/cpu: KVM: Make SGX and VMX depend on FEAT_CTL Sean Christopherson
2022-12-03 0:37 ` [PATCH 1/3] x86/cpu: Process all CPUID dependencies after identifying CPU info Sean Christopherson
2022-12-08 16:14 ` Borislav Petkov
2022-12-08 16:26 ` Sean Christopherson
2022-12-08 16:45 ` Borislav Petkov [this message]
2023-01-04 21:02 ` Sean Christopherson
2023-01-04 22:55 ` Borislav Petkov
2023-01-04 23:18 ` Sean Christopherson
2023-01-05 10:15 ` Borislav Petkov
2022-12-03 0:37 ` [PATCH 2/3] x86/cpu: Mark SGX and VMX as being dependent on MSR_IA32_FEAT_CTL Sean Christopherson
2022-12-03 0:37 ` [PATCH 3/3] KVM: VMX: Drop manual checks on X86_FEATURE_MSR_IA32_FEAT_CTL 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=Y5IUsB83PzHCJ+EY@zn.tnic \
--to=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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