summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/stackcollapse.py
diff options
context:
space:
mode:
authorEwan Hai-oc <ewanhai-oc@zhaoxin.com>2026-06-10 10:35:09 +0800
committerSean Christopherson <seanjc@google.com>2026-07-10 09:07:34 -0700
commit3ee865eb696fff41dde57697e604d397322cb4d2 (patch)
tree1ac2da768f6f85cbd2d4a04ee3c874ebcab70390 /tools/perf/scripts/python/stackcollapse.py
parentd99fc2a7c5e22734753ad7f55161fe93eaf88013 (diff)
KVM: x86: Expose Zhaoxin CCS (SM3 + SM4) CPUID feature
Advertise the Zhaoxin CCS (Chinese Cryptography Standard) feature to guests via CPUID 0xC0000001 EDX bits 4 (CCS) and 5 (CCS_EN). CCS groups two unprivileged instructions for Chinese national cryptographic primitives, documented in the Zhaoxin GMI Instruction Set Reference, chapter 2 ("CCS instruction group"): - SM3 (encoding F3 0F A6 E8, subsection 2.1) implements the SM3 hash algorithm specified in GM/T 0004-2012. It supports two modes selected by RAX: auto-padding stream mode (RAX=0) and pre-padded block mode (RAX=-1). - SM4 (encoding F3 0F A7 F0, subsection 2.2) implements the SM4 block cipher specified in GM/T 0002-2012, supporting ECB / CBC / CFB / OFB / CTR modes via a control word in RAX, and CBC-MAC / CFB-MAC when RAX bit[11] is set. Both instructions are unprivileged (no CPL restriction) and available in all CPU modes, with no associated MSR control. The CCS and CCS_EN bits are redundant by hardware design (set or cleared together) and both serve purely as CPUID-level feature-presence reporting flags requiring no KVM emulation. Both bits are advertised because different software may probe either one when checking for CCS availability. Reviewed-by: Binbin Wu <binbin.wu@linux.intel.com> Signed-off-by: Ewan Hai <ewanhai-oc@zhaoxin.com> Link: https://patch.msgid.link/20260610023512.3690734-3-ewanhai-oc@zhaoxin.com Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions