]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - arch/x86/kernel/vm86_32.c
Merge tag 'v2.6.37' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[mv-sheeva.git] / arch / x86 / kernel / vm86_32.c
index 5ffb5622f793aee1446716c137078ee0c865be07..61fb985196222909dbec39750cccec5f0993b852 100644 (file)
@@ -551,8 +551,14 @@ cannot_handle:
 int handle_vm86_trap(struct kernel_vm86_regs *regs, long error_code, int trapno)
 {
        if (VMPI.is_vm86pus) {
-               if ((trapno == 3) || (trapno == 1))
-                       return_to_32bit(regs, VM86_TRAP + (trapno << 8));
+               if ((trapno == 3) || (trapno == 1)) {
+                       KVM86->regs32->ax = VM86_TRAP + (trapno << 8);
+                       /* setting this flag forces the code in entry_32.S to
+                          call save_v86_state() and change the stack pointer
+                          to KVM86->regs32 */
+                       set_thread_flag(TIF_IRET);
+                       return 0;
+               }
                do_int(regs, trapno, (unsigned char __user *) (regs->pt.ss << 4), SP(regs));
                return 0;
        }