Fix iopl flag when sysenter/exit are used

Change-Id: If8c12f987c3adb8f329ae163da6b2f1cb8cc772f
This commit is contained in:
Lionel Sambuc 2014-10-31 22:40:23 +01:00
parent 521fa314e2
commit 9393439a20

View file

@ -402,7 +402,12 @@ ENTRY(restore_user_context_sysenter)
mov SPREG(%ebp), %ecx /* sysexit restores ESP using ECX */ mov SPREG(%ebp), %ecx /* sysexit restores ESP using ECX */
mov AXREG(%ebp), %eax /* trap return value */ mov AXREG(%ebp), %eax /* trap return value */
mov BXREG(%ebp), %ebx /* secondary return value */ mov BXREG(%ebp), %ebx /* secondary return value */
movl PSWREG(%ebp), %edi /* load desired PSW to EDI */
/* restore PSW */
movl PSWREG(%ebp), %edi /* load desired PSW to EDI */
push %edi
popf
sti /* enable interrupts */ sti /* enable interrupts */
sysexit /* jump to EIP in user */ sysexit /* jump to EIP in user */