[patch] vm86: set IOPL to 3 on pushf

From: Stas Sergeev
Date: Thu Jul 01 2004 - 14:28:21 EST



Hi.

The attached patch fixes the pushf under v86
to always set the IOPL field to 3, as the
Intel CPUs do.
It was in 2.4 for year, but somehow missed
2.6. It comes from here (although now a bit
shorter):
http://lkml.org/lkml/2003/5/25/81

Andrew, could you please apply this to 2.6?


--- linux/arch/i386/kernel/vm86.c.orig 2004-06-26 15:23:51.000000000 +0400
+++ linux/arch/i386/kernel/vm86.c 2004-07-01 21:57:36.687819904 +0400
@@ -394,6 +394,7 @@

if (VEFLAGS & VIF_MASK)
flags |= IF_MASK;
+ flags |= IOPL_MASK;
return flags | (VEFLAGS & current->thread.v86mask);
}


Scanned by evaluation version of Dr.Web antivirus Daemon
http://drweb.ru/unix/