Add some far ret and far jmp tests for the related x86 emulator bugs[*]. Those tests would be tested both on hardware and emulator. Enable kvm.force_emulation_prefix to test them on emulator. Changed from v2: - Fix some complication errors, which are not gotten in my gcc. - Rename lret as far ret, and rename ljmp as far jmp. Changed from v1: - As Sean suggested, refactor the test loop to make the code simple. v2: https://lore.kernel.org/kvm/cover.1644311445.git.houwenlong.hwl@xxxxxxxxxxxx [*] https://lore.kernel.org/kvm/cover.1644292363.git.houwenlong.hwl@xxxxxxxxxxxx Hou Wenlong (3): x86/emulator: Add some tests for far ret instruction emulation x86/emulator: Rename test_ljmp() as test_far_jmp() x86/emulator: Add some tests for far jmp instruction emulation x86/emulator.c | 202 +++++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 188 insertions(+), 14 deletions(-) -- 2.31.1