From: hpa@zytor.com
To: Borislav Petkov <bp@alien8.de>,
Tony W Wang-oc <TonyWWang-oc@zhaoxin.com>
Cc: herbert@gondor.apana.org.au, davem@davemloft.net,
tglx@linutronix.de, mingo@redhat.com, x86@kernel.org,
tony.luck@intel.com, dave.hansen@intel.com, seanjc@google.com,
fenghua.yu@intel.com, thomas.lendacky@amd.com,
kyung.min.park@intel.com, kim.phillips@amd.com,
mgross@linux.intel.com, peterz@infradead.org,
krish.sadhukhan@oracle.com, liam.merwick@oracle.com,
mlevitsk@redhat.com, reinette.chatre@intel.com,
babu.moger@amd.com, linux-crypto@vger.kernel.org,
linux-kernel@vger.kernel.org, TimGuo-oc@zhaoxin.com,
CooperYan@zhaoxin.com, QiyuanWang@zhaoxin.com,
HerryYang@zhaoxin.com, CobeChen@zhaoxin.com,
SilviaZhao@zhaoxin.com
Subject: Re: [PATCH v1 1/3] x86/cpufeatures: Add low performance CRC32C instruction CPU feature
Date: Mon, 11 Jan 2021 07:20:25 -0800 [thread overview]
Message-ID: <A96ECD10-F51F-408C-80DF-5937DF43D314@zytor.com> (raw)
In-Reply-To: <20210107063750.GA14697@zn.tnic>
On January 6, 2021 10:37:50 PM PST, Borislav Petkov <bp@alien8.de> wrote:
>On Thu, Jan 07, 2021 at 02:19:06PM +0800, Tony W Wang-oc wrote:
>> SSE4.2 on Zhaoxin CPUs are compatible with Intel. The presence of
>> CRC32C instruction is enumerated by CPUID.01H:ECX.SSE4_2[bit 20] = 1.
>> Some Zhaoxin CPUs declare support SSE4.2 instruction sets but their
>> CRC32C instruction are working with low performance.
>>
>> Add a synthetic CPU flag to indicates that the CRC32C instruction is
>> not working as intended. This low performance CRC32C instruction flag
>> is depend on X86_FEATURE_XMM4_2.
>>
>> Signed-off-by: Tony W Wang-oc <TonyWWang-oc@zhaoxin.com>
>> ---
>> arch/x86/include/asm/cpufeatures.h | 1 +
>> arch/x86/kernel/cpu/cpuid-deps.c | 1 +
>> 2 files changed, 2 insertions(+)
>>
>> diff --git a/arch/x86/include/asm/cpufeatures.h
>b/arch/x86/include/asm/cpufeatures.h
>> index 84b8878..9e8151b 100644
>> --- a/arch/x86/include/asm/cpufeatures.h
>> +++ b/arch/x86/include/asm/cpufeatures.h
>> @@ -292,6 +292,7 @@
>> #define X86_FEATURE_FENCE_SWAPGS_KERNEL (11*32+ 5) /* "" LFENCE in
>kernel entry SWAPGS path */
>> #define X86_FEATURE_SPLIT_LOCK_DETECT (11*32+ 6) /* #AC for split
>lock */
>> #define X86_FEATURE_PER_THREAD_MBA (11*32+ 7) /* "" Per-thread
>Memory Bandwidth Allocation */
>> +#define X86_FEATURE_CRC32C (11*32+ 8) /* "" Low performance CRC32C
>instruction */
>
>Didn't hpa say to create a BUG flag for it - X86_BUG...? Low
>performance
>insn sounds like a bug and not a feature to me.
>
>And call it X86_BUG_CRC32C_SLOW or ..._UNUSABLE to denote what it
>means.
>
>Thx.
Yes, it should be a BUG due to the inclusion properties of BUG v FEATURE.
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
next prev parent reply other threads:[~2021-01-11 15:22 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-07 6:19 [PATCH v1 0/3] crypto: x86/crc32c-intel - Exclude some Zhaoxin CPUs Tony W Wang-oc
2021-01-07 6:19 ` [PATCH v1 1/3] x86/cpufeatures: Add low performance CRC32C instruction CPU feature Tony W Wang-oc
2021-01-07 6:37 ` Borislav Petkov
2021-01-11 10:51 ` Tony W Wang-oc
2021-01-11 11:03 ` Borislav Petkov
2021-01-15 1:43 ` Tony W Wang-oc
2021-01-11 15:20 ` hpa [this message]
2021-01-07 6:19 ` [PATCH v1 2/3] x86/cpu: Set low performance CRC32C flag on some Zhaoxin CPUs Tony W Wang-oc
2021-01-07 15:52 ` Dave Hansen
2021-01-11 10:54 ` Tony W Wang-oc
2021-01-07 6:19 ` [PATCH v1 3/3] crypto: x86/crc32c-intel Exclude low performance CRC32C instruction CPUs Tony W Wang-oc
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=A96ECD10-F51F-408C-80DF-5937DF43D314@zytor.com \
--to=hpa@zytor.com \
--cc=CobeChen@zhaoxin.com \
--cc=CooperYan@zhaoxin.com \
--cc=HerryYang@zhaoxin.com \
--cc=QiyuanWang@zhaoxin.com \
--cc=SilviaZhao@zhaoxin.com \
--cc=TimGuo-oc@zhaoxin.com \
--cc=TonyWWang-oc@zhaoxin.com \
--cc=babu.moger@amd.com \
--cc=bp@alien8.de \
--cc=dave.hansen@intel.com \
--cc=davem@davemloft.net \
--cc=fenghua.yu@intel.com \
--cc=herbert@gondor.apana.org.au \
--cc=kim.phillips@amd.com \
--cc=krish.sadhukhan@oracle.com \
--cc=kyung.min.park@intel.com \
--cc=liam.merwick@oracle.com \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mgross@linux.intel.com \
--cc=mingo@redhat.com \
--cc=mlevitsk@redhat.com \
--cc=peterz@infradead.org \
--cc=reinette.chatre@intel.com \
--cc=seanjc@google.com \
--cc=tglx@linutronix.de \
--cc=thomas.lendacky@amd.com \
--cc=tony.luck@intel.com \
--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