[PATCH v6 0/2] Add emulation for UMIP instructions

Brendan Shanks bshanks at codeweavers.com
Mon Feb 17 14:26:45 CST 2020


This patch adds emulation for instructions protected by User-Mode
Instruction Prevention (currently implemented by AMD Ryzen 3000 CPUs and
some rare Intel CPUs).

Changes from previous patch:
- Fix calculation of RIP-relative addresses in INSTR_GetOperandAddr(),
  they are relative to the next instruction's RIP and not the current
  RIP. This was causing Ace Combat 7 to crash.
- Call is_privileged_instr() before an exception stack frame is created.
  Wolfenstein: Youngblood calls sgdt with RSP not pointing to the stack,
  and the creation of the exception stack frame was overwriting data and
  causing a crash.

Brendan Shanks (2):
  ntdll: Add emulation for UMIP instructions.
  ntdll/tests: Add tests for UMIP instructions.

 dlls/ntdll/signal_i386.c     | 333 ++++++++++++++++++++++++++++++-
 dlls/ntdll/signal_x86_64.c   | 374 +++++++++++++++++++++++++++++++++-
 dlls/ntdll/tests/exception.c | 375 +++++++++++++++++++++++++++++++++++
 3 files changed, 1066 insertions(+), 16 deletions(-)

-- 
2.24.1




More information about the wine-devel mailing list