[RFC] VM86 patch

Kasper Dupont (kasperd@daimi.au.dk)
Sun, 05 Jan 2003 11:47:56 +0100


This is a multi-part message in MIME format.
--------------145B55840E6590168DBF7CE4
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit

Is there some reason for not applying
http://dosemu.sourceforge.net/stas/traps.diff
to the 2.5 kernel? Or was it just forgotten?

I have attached a version that applies cleanly
to 2.5.54.

-- 
Kasper Dupont -- der bruger for meget tid pe usenet.
For sending spam use mailto:aaarep@daimi.au.dk
for(_=52;_;(_%5)||(_/=5),(_%5)&&(_-=2))putchar(_);
--------------145B55840E6590168DBF7CE4
Content-Type: text/plain; charset=us-ascii;
 name="vm86.2.5.54.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="vm86.2.5.54.patch"

diff -Nur linux.old/arch/i386/kernel/traps.c linux.new/arch/i386/kernel/traps.c --- linux.old/arch/i386/kernel/traps.c Sun Jan 5 11:26:56 2003 +++ linux.new/arch/i386/kernel/traps.c Sun Jan 5 11:28:20 2003 @@ -320,8 +320,12 @@ static inline void do_trap(int trapnr, int signr, char *str, int vm86, struct pt_regs * regs, long error_code, siginfo_t *info) { - if (vm86 && regs->eflags & VM_MASK) - goto vm86_trap; + if (regs->eflags & VM_MASK) { + if (vm86) + goto vm86_trap; + else + goto trap_signal; + } if (!(regs->xcs & 3)) goto kernel_trap;

--------------145B55840E6590168DBF7CE4--

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/