summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/task-analyzer.py
diff options
context:
space:
mode:
authorEwan Hai-oc <ewanhai-oc@zhaoxin.com>2026-06-10 10:35:08 +0800
committerSean Christopherson <seanjc@google.com>2026-07-10 09:07:34 -0700
commitd99fc2a7c5e22734753ad7f55161fe93eaf88013 (patch)
tree882297cde74f4bbcff5bdb50f74cb61a7aa93063 /tools/perf/scripts/python/task-analyzer.py
parent2c56780d8ec7ecf88ebd6a26ee14f6418ea4f8a0 (diff)
KVM: x86: Expose Zhaoxin SM2 CPUID feature
Advertise the Zhaoxin SM2 instruction support to guests via CPUID 0xC0000001 EDX bits 0 (SM2) and 1 (SM2_EN). The SM2 instruction (encoding F2 0F A6 C0) implements the SM2 elliptic-curve public-key cryptography algorithm specified in GM/T 0003-2012; the hardware-level behavior is documented in the Zhaoxin GMI Instruction Set Reference, chapter 1 ("SM2"). The instruction multiplexes its sub-functions on the RDX[5:0] control word: encryption (subsection 1.1), decryption (1.2), signing (1.3), signature verification (1.4), the three key-exchange sub-operations of section 1.5 (1.5.1 SM2 key-pair generation, which the spec also uses for the initiator's ephemeral key; 1.5.2 responder shared-key derivation; 1.5.3 initiator shared-key derivation), and two preprocess steps for identity and message hashing (1.6.1 and 1.6.2). The instruction is unprivileged (no CPL restriction) and available in all CPU modes, with no associated MSR control. The SM2 and SM2_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 SM2 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-2-ewanhai-oc@zhaoxin.com Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'tools/perf/scripts/python/task-analyzer.py')
0 files changed, 0 insertions, 0 deletions