#! /bin/sh /usr/share/dpatch/dpatch-run ## vm86-support-2.dpatch by Bastian Blank ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: No description. @DPATCH@ diff -urNad xen-unstable~/xen/arch/x86/traps.c xen-unstable/xen/arch/x86/traps.c --- xen-unstable~/xen/arch/x86/traps.c 2006-08-30 18:36:52.000000000 +0200 +++ xen-unstable/xen/arch/x86/traps.c 2006-09-08 22:32:36.000000000 +0200 @@ -1032,6 +1032,9 @@ unsigned int port, i, op_bytes = 4, data, rc; u32 l, h; + if ( vm86_mode(regs) ) + goto fail; + /* Legacy prefixes. */ for ( i = 0; i < 8; i++ ) { diff -urNad xen-unstable~/xen/arch/x86/x86_32/entry.S xen-unstable/xen/arch/x86/x86_32/entry.S --- xen-unstable~/xen/arch/x86/x86_32/entry.S 2006-08-30 18:36:52.000000000 +0200 +++ xen-unstable/xen/arch/x86/x86_32/entry.S 2006-09-08 22:36:02.000000000 +0200 @@ -331,15 +331,7 @@ 1: testb $TBF_FAILSAFE,%cl jz 2f subl $16,%esi # add DS/ES/FS/GS to failsafe stack frame - testl $X86_EFLAGS_VM,UREGS_eflags+4(%esp) - jz nvm86_2 - xorl %eax,%eax # VM86: we write zero selector values -FLT18: movl %eax,%gs:(%esi) -FLT19: movl %eax,%gs:4(%esi) -FLT20: movl %eax,%gs:8(%esi) -FLT21: movl %eax,%gs:12(%esi) - jmp 2f -nvm86_2:movl UREGS_ds+4(%esp),%eax # non-VM86: write real selector values + movl UREGS_ds+4(%esp),%eax FLT22: movl %eax,%gs:(%esi) movl UREGS_es+4(%esp),%eax FLT23: movl %eax,%gs:4(%esi) @@ -375,8 +367,6 @@ .long FLT12,domain_crash_synchronous , FLT13,domain_crash_synchronous .long FLT14,domain_crash_synchronous , FLT15,domain_crash_synchronous .long FLT16,domain_crash_synchronous , FLT17,domain_crash_synchronous - .long FLT18,domain_crash_synchronous , FLT19,domain_crash_synchronous - .long FLT20,domain_crash_synchronous , FLT21,domain_crash_synchronous .long FLT22,domain_crash_synchronous , FLT23,domain_crash_synchronous .long FLT24,domain_crash_synchronous , FLT25,domain_crash_synchronous .previous