From: Sohil Mehta <sohil.mehta@intel.com>
To: Ingo Molnar <mingo@kernel.org>
Cc: <x86@kernel.org>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
Thomas Gleixner <tglx@linutronix.de>,
"Ingo Molnar" <mingo@redhat.com>,
"H . Peter Anvin" <hpa@zytor.com>,
Uros Bizjak <ubizjak@gmail.com>,
Sandipan Das <sandipan.das@amd.com>,
Sean Christopherson <seanjc@google.com>,
Peter Zijlstra <peterz@infradead.org>,
Vegard Nossum <vegard.nossum@oracle.com>,
Tony Luck <tony.luck@intel.com>,
Pawan Gupta <pawan.kumar.gupta@linux.intel.com>,
Nikolay Borisov <nik.borisov@suse.com>,
Eric Biggers <ebiggers@google.com>, Xin Li <xin3.li@intel.com>,
"Alexander Shishkin" <alexander.shishkin@intel.com>,
Kirill Shutemov <kirill.shutemov@linux.intel.com>,
<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v3 2/2] x86/cpufeature: Add a debug print for unmet dependencies
Date: Sat, 7 Dec 2024 05:14:51 -0800 [thread overview]
Message-ID: <6e74f535-895d-405f-8048-ec89ddeefef7@intel.com> (raw)
In-Reply-To: <Z1QI6UukVy9uJLrs@gmail.com>
On 12/7/2024 12:35 AM, Ingo Molnar wrote:
>> void filter_feature_dependencies(struct cpuinfo_x86 *c)
>> {
>> + char feature_buf[12], depends_buf[12];
>> const struct cpuid_dep *d;
>>
>> for (d = cpuid_deps; d->feature; d++) {
>> - if (cpu_has(c, d->feature) && !cpu_has(c, d->depends))
>> + if (cpu_has(c, d->feature) && !cpu_has(c, d->depends)) {
>> + pr_debug("x86/cpu: Disabling feature %s since feature %s is missing\n",
>> + x86_feature_name(d->feature, feature_buf),
>> + x86_feature_name(d->depends, depends_buf));
>> do_clear_cpu_cap(c, d->feature);
>
> So why not make this a pr_info() at minimum?
>
I was hesitant because the feature disabling may be inconsequential to
the end user. Also, the printed numbers would not make sense unless they
have the kernel source handy. But maybe it's better to inform and let
the user decide.
> Since this new logic will disable certain feature bits on random
> machines, I'm sure there will be some surprises. I'd sure like to see
> this printed in the system log of my machine if it happens.
>
Sure, will update the print as follows in the next (hopefully final)
version.
pr_info("CPU%d: Disabling feature %s due to missing feature %s\n",
smp_processor_id(),
x86_feature_name(d->feature, feature_buf),
x86_feature_name(d->depends, depends_buf));
Since it seems almost certain that we are going in this direction will
merge this patch into the previous one and send a combined one next time.
> It might also inform firmware & distro testers that something wasn't
> set up properly on the firmware (or virtualization) side.
>
Sohil
next prev parent reply other threads:[~2024-12-07 13:14 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-07 0:41 [PATCH v3 1/2] x86/cpufeature: Add feature dependency checks Sohil Mehta
2024-12-07 0:41 ` [PATCH v3 2/2] x86/cpufeature: Add a debug print for unmet dependencies Sohil Mehta
2024-12-07 8:35 ` Ingo Molnar
2024-12-07 13:14 ` Sohil Mehta [this message]
2024-12-07 21:11 ` H. Peter Anvin
2024-12-09 19:28 ` Sohil Mehta
2024-12-09 4:18 ` kernel test robot
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=6e74f535-895d-405f-8048-ec89ddeefef7@intel.com \
--to=sohil.mehta@intel.com \
--cc=alexander.shishkin@intel.com \
--cc=bp@alien8.de \
--cc=dave.hansen@linux.intel.com \
--cc=ebiggers@google.com \
--cc=hpa@zytor.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mingo@redhat.com \
--cc=nik.borisov@suse.com \
--cc=pawan.kumar.gupta@linux.intel.com \
--cc=peterz@infradead.org \
--cc=sandipan.das@amd.com \
--cc=seanjc@google.com \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=ubizjak@gmail.com \
--cc=vegard.nossum@oracle.com \
--cc=x86@kernel.org \
--cc=xin3.li@intel.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