]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
KVM: x86/mmu: Pretty print PK, SS, and SGX flags in MMU tracepoints
authorSean Christopherson <seanjc@google.com>
Fri, 19 Sep 2025 22:32:29 +0000 (15:32 -0700)
committerSean Christopherson <seanjc@google.com>
Tue, 23 Sep 2025 16:17:32 +0000 (09:17 -0700)
Add PK (Protection Keys), SS (Shadow Stacks), and SGX (Software Guard
Extensions) to the set of #PF error flags handled via
kvm_mmu_trace_pferr_flags.  While KVM doesn't expect PK or SS #PFs in
particular, pretty print their names instead of the raw hex value saves
the user from having to go spelunking in the SDM to figure out what's
going on.

Reviewed-by: Xiaoyao Li <xiaoyao.li@intel.com>
Reviewed-by: Binbin Wu <binbin.wu@linux.intel.com>
Link: https://lore.kernel.org/r/20250919223258.1604852-23-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
arch/x86/kvm/mmu/mmutrace.h

index f35a830ce469b58e5ea1b75f602e2a11f716df73..764e3015d021b41b7111de68a618cc53d7aa158a 100644 (file)
@@ -51,6 +51,9 @@
        { PFERR_PRESENT_MASK, "P" },    \
        { PFERR_WRITE_MASK, "W" },      \
        { PFERR_USER_MASK, "U" },       \
+       { PFERR_PK_MASK, "PK" },        \
+       { PFERR_SS_MASK, "SS" },        \
+       { PFERR_SGX_MASK, "SGX" },      \
        { PFERR_RSVD_MASK, "RSVD" },    \
        { PFERR_FETCH_MASK, "F" }