]> git.ipfire.org Git - thirdparty/linux.git/commit
KVM: selftests: Add ex_str() to print human friendly name of exception vectors
authorSean Christopherson <seanjc@google.com>
Fri, 19 Sep 2025 22:32:51 +0000 (15:32 -0700)
committerSean Christopherson <seanjc@google.com>
Tue, 23 Sep 2025 15:39:02 +0000 (08:39 -0700)
commitdf1f294013da715f32521b3d0a69773e660a1af5
tree9e6d98ae2cf805bc05feb200b6e1b6b849595a20
parentff86b48d4ce3bdd8d2353c166e4c905f92cddd78
KVM: selftests: Add ex_str() to print human friendly name of exception vectors

Steal exception_mnemonic() from KVM-Unit-Tests as ex_str() (to keep line
lengths reasonable) and use it in assert messages that currently print the
raw vector number.

Co-developed-by: Chao Gao <chao.gao@intel.com>
Signed-off-by: Chao Gao <chao.gao@intel.com>
Link: https://lore.kernel.org/r/20250919223258.1604852-45-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
tools/testing/selftests/kvm/include/x86/processor.h
tools/testing/selftests/kvm/lib/x86/processor.c
tools/testing/selftests/kvm/x86/hyperv_features.c
tools/testing/selftests/kvm/x86/monitor_mwait_test.c
tools/testing/selftests/kvm/x86/pmu_counters_test.c
tools/testing/selftests/kvm/x86/vmx_pmu_caps_test.c
tools/testing/selftests/kvm/x86/xcr0_cpuid_test.c