[patch] vm86: fix IOPL virtualisation

Stas Sergeev (stssppnn@yahoo.com)
Sun, 25 May 2003 21:33:29 +0400


This is a MIME-formatted message. If you see this text it means that your
E-mail software does not support MIME-formatted messages.

--=_courier-32482-1053884279-0001-2
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

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.

--=_courier-32482-1053884279-0001-2 Content-Type: text/plain; name="v86_iopl.diff"; charset=iso-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="v86_iopl.diff"

--- 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); }

--=_courier-32482-1053884279-0001-2--