mbox series

[kvm-unit-tests,v4,0/3] x86/emulator: Add some tests for loading segment descriptor in emulator

Message ID cover.1645672780.git.houwenlong.hwl@antgroup.com (mailing list archive)
Headers show
Series x86/emulator: Add some tests for loading segment descriptor in emulator | expand

Message

Hou Wenlong Feb. 25, 2022, 9:49 a.m. UTC
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 v3:
- Fix build failure with --target-efi.

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.

v3: https://lore.kernel.org/kvm/cover.1644481282.git.houwenlong.hwl@antgroup.com

[*] https://lore.kernel.org/kvm/cover.1644292363.git.houwenlong.hwl@antgroup.com


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 | 203 +++++++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 189 insertions(+), 14 deletions(-)

--
2.31.1