public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch] vm86: fix IOPL virtualisation
@ 2003-05-25 17:33 Stas Sergeev
  0 siblings, 0 replies; only message in thread
From: Stas Sergeev @ 2003-05-25 17:33 UTC (permalink / raw)
  To: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 445 bytes --]

Hello.

The attached patch implements the following:
http://x86.ddj.com/articles/vme1/vme_overview.htm
---
In addition to moving the VIF to the IF on the stack image, 
PUSHF always pushes an IOPL image of 3 onto the
stack.
---

Many DOS programs, including dos4gw, are
checking if they are in a v86 mode by trying
to alter IOPL. With that patch they are not
get confused under dosemu.
Also the patch fixes what looks like a bug
with an IF flag.

[-- Attachment #2: v86_iopl.diff --]
[-- Type: text/plain, Size: 297 bytes --]

--- linux/arch/i386/kernel/vm86.c	Sun Aug  4 03:44:30 2002
+++ linux/arch/i386/kernel/vm86.c	Sat May 24 19:30:45 2003
@@ -362,6 +362,9 @@
 
 	if (VEFLAGS & VIF_MASK)
 		flags |= IF_MASK;
+	else
+		flags &= ~IF_MASK;
+	flags |= IOPL_MASK;
 	return flags | (VEFLAGS & current->thread.v86mask);
 }
 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-05-25 17:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-25 17:33 [patch] vm86: fix IOPL virtualisation Stas Sergeev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox