]> git.ipfire.org Git - thirdparty/linux.git/commit
KVM: selftests: Add helpers for locally (un)blocking IRQs on x86
authorSean Christopherson <seanjc@google.com>
Fri, 20 Dec 2024 01:26:17 +0000 (17:26 -0800)
committerSean Christopherson <seanjc@google.com>
Wed, 8 Jan 2025 20:57:03 +0000 (12:57 -0800)
commit983820cb53c0e796777caf85bfc2810ad0c8fb22
tree9b0f6400e8ecaa5a1de056a6c91dc450630dd1ce
parent7803339fa929387bbc66479532afbaf8cbebb41b
KVM: selftests: Add helpers for locally (un)blocking IRQs on x86

Copy KVM-Unit-Tests' x86 helpers for emitting STI and CLI, comments and
all, and use them throughout x86 selftests.  The safe_halt() and sti_nop()
logic in particular benefits from centralized comments, as the behavior
isn't obvious unless the reader is already aware of the STI shadow.

Cc: Manali Shukla <Manali.Shukla@amd.com>
Link: https://lore.kernel.org/r/20241220012617.3513898-1-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
tools/testing/selftests/kvm/include/x86/processor.h
tools/testing/selftests/kvm/x86/hyperv_ipi.c
tools/testing/selftests/kvm/x86/svm_int_ctl_test.c
tools/testing/selftests/kvm/x86/ucna_injection_test.c
tools/testing/selftests/kvm/x86/xapic_ipi_test.c
tools/testing/selftests/kvm/x86/xapic_state_test.c
tools/testing/selftests/kvm/x86/xen_shinfo_test.c