diff options
author | Sean Christopherson <seanjc@google.com> | 2025-05-05 18:12:50 -0700 |
---|---|---|
committer | Sean Christopherson <seanjc@google.com> | 2025-05-08 07:16:44 -0700 |
commit | 5e9ac644c40f8315877343034d1d6a8e056bd1dc (patch) | |
tree | 1d61d733f66144182270ce0e83aea415794712ec /scripts/lib/kdoc/kdoc_parser.py | |
parent | ada014f5fc676bf16327c252587e0c856234bc13 (diff) |
KVM: selftests: Add a test for x86's fastops emulation
Add a test to verify KVM's fastops emulation via forced emulation. KVM's
so called "fastop" infrastructure executes the to-be-emulated instruction
directly on hardware instead of manually emulating the instruction in
software, using various shenanigans to glue together the emulator context
and CPU state, e.g. to get RFLAGS fed into the instruction and back out
for the emulator.
Add testcases for all instructions that are low hanging fruit. While the
primary goal of the selftest is to validate the glue code, a secondary
goal is to ensure "emulation" matches hardware exactly, including for
arithmetic flags that are architecturally undefined. While arithmetic
flags may be *architecturally* undefined, their behavior is deterministic
for a given CPU (likely a given uarch, and possibly even an entire family
or class of CPUs). I.e. KVM has effectively been emulating underlying
hardware behavior for years.
Link: https://lore.kernel.org/r/20250506011250.1089254-1-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
Diffstat (limited to 'scripts/lib/kdoc/kdoc_parser.py')
0 files changed, 0 insertions, 0 deletions