summaryrefslogtreecommitdiff
path: root/scripts/basic/split-include.c
diff options
context:
space:
mode:
authorJim Mattson <jmattson@google.com>2026-09-30 14:21:14 -0700
committerSean Christopherson <seanjc@google.com>2026-09-30 14:22:38 -0700
commit34f749161dabac48a6aeae36ffd5f55f84023d61 (patch)
treeb6c04ff6bd0f1fa09e6fda19f5ac04ef166310f3 /scripts/basic/split-include.c
parent58f4dc83da6e5baf8b9a9752e433360c6b17df38 (diff)
downloadlinux-34f749161dabac48a6aeae36ffd5f55f84023d61.tar.gz
linux-34f749161dabac48a6aeae36ffd5f55f84023d61.zip
KVM: selftests: Add coverage for the EFER_LMSLE_MBZ defeature
Add coverage for KVM's virtualization of EFER_LMSLE_MBZ, CPUID.80000008H:EBX[bit 20], which is set when the CPU does *not* support long mode segment limits. Verify that KVM's enumeration of the defeature matches the expectation derived from hardware plus kvm_amd's "nested" module param, so that the assertion doesn't compare KVM's enumeration against itself, and that WRMSR(EFER), nested VMRUN, and KVM_SET_SREGS reject EFER.LMSLE=1 if and only if guest CPUID enumerates the defeature. Also verify that host-initiated KVM_SET_MSRS is exempt from the check, as host-initiated writes skip guest CPUID checks so that userspace can set MSRs before it sets guest CPUID. Extend svm_nested_efer_test rather than add yet another test binary for a single CPUID bit; the test already has the L1/L2 harness needed to exercise EFER.LMSLE. Note, only a CPU that supports LMSLE, i.e. Rome and earlier, exercises the emulation path; elsewhere KVM enumerates the defeature straight from hardware. Opportunistically drop the unnecessary #include of vmx.h. Assisted-by: LLM Signed-off-by: Jim Mattson <jmattson@google.com> [sean: drop specific APM volume references, use common "nested" getter] Link: https://patch.msgid.link/20260930212114.3500045-6-seanjc@google.com Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'scripts/basic/split-include.c')
0 files changed, 0 insertions, 0 deletions