mbox series

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

Message ID cover.1644481282.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. 10, 2022, 8:46 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 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@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 | 202 +++++++++++++++++++++++++++++++++++++++++++++----
 1 file changed, 188 insertions(+), 14 deletions(-)

--
2.31.1