Module Name: src Committed By: maxv Date: Sat Aug 12 06:46:13 UTC 2017
Modified Files: src/sys/arch/amd64/conf: ALL src/sys/arch/i386/conf: ALL GENERIC GENERIC_PS2TINY GENERIC_TINY INSTALL_FLOPPY INSTALL_TINY NET4501 XEN3_DOM0 XEN3_DOMU files.i386 Removed Files: src/sys/arch/i386/i386: vm86.c Log Message: Remove support for vm86 on i386. It is bug-friendly, and there is no point in having kernel support for this: the instruction set of the CPU is small, and it can easily be emulated in userland entirely. There are also several assumptions in the code that are not respected, and the slightest confusion in the trap frame can lead to ring0 exploits. vm86 has received zero maintenance. As far as I can tell, it was added 20 years ago in order to make doscmd work. But doscmd has not been maintained either, and was removed from pkgsrc in 2011. dosbox can be used instead: it does not require kernel support, and will produce better results than our flimsy implementation. Pass 1. (many pieces still in the tree) To generate a diff of this commit: cvs rdiff -u -r1.65 -r1.66 src/sys/arch/amd64/conf/ALL cvs rdiff -u -r1.425 -r1.426 src/sys/arch/i386/conf/ALL cvs rdiff -u -r1.1164 -r1.1165 src/sys/arch/i386/conf/GENERIC cvs rdiff -u -r1.77 -r1.78 src/sys/arch/i386/conf/GENERIC_PS2TINY cvs rdiff -u -r1.154 -r1.155 src/sys/arch/i386/conf/GENERIC_TINY cvs rdiff -u -r1.40 -r1.41 src/sys/arch/i386/conf/INSTALL_FLOPPY cvs rdiff -u -r1.153 -r1.154 src/sys/arch/i386/conf/INSTALL_TINY cvs rdiff -u -r1.97 -r1.98 src/sys/arch/i386/conf/NET4501 cvs rdiff -u -r1.120 -r1.121 src/sys/arch/i386/conf/XEN3_DOM0 cvs rdiff -u -r1.84 -r1.85 src/sys/arch/i386/conf/XEN3_DOMU cvs rdiff -u -r1.384 -r1.385 src/sys/arch/i386/conf/files.i386 cvs rdiff -u -r1.51 -r0 src/sys/arch/i386/i386/vm86.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/amd64/conf/ALL diff -u src/sys/arch/amd64/conf/ALL:1.65 src/sys/arch/amd64/conf/ALL:1.66 --- src/sys/arch/amd64/conf/ALL:1.65 Wed Aug 9 18:48:53 2017 +++ src/sys/arch/amd64/conf/ALL Sat Aug 12 06:46:13 2017 @@ -1,4 +1,4 @@ -# $NetBSD: ALL,v 1.65 2017/08/09 18:48:53 maxv Exp $ +# $NetBSD: ALL,v 1.66 2017/08/12 06:46:13 maxv Exp $ # From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp # # ALL machine description file @@ -17,14 +17,13 @@ include "arch/amd64/conf/std.amd64" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "ALL-$Revision: 1.65 $" +#ident "ALL-$Revision: 1.66 $" maxusers 64 # estimated number of users makeoptions USE_SSP=yes # CPU-related options. -#options VM86 # virtual 8086 emulation #options USER_LDT # user-settable LDT; used by WINE options X86EMU # 386 Real Mode emulator #options PAE # PAE mode (36 bits physical addressing) Index: src/sys/arch/i386/conf/ALL diff -u src/sys/arch/i386/conf/ALL:1.425 src/sys/arch/i386/conf/ALL:1.426 --- src/sys/arch/i386/conf/ALL:1.425 Wed Aug 9 18:45:30 2017 +++ src/sys/arch/i386/conf/ALL Sat Aug 12 06:46:13 2017 @@ -1,4 +1,4 @@ -# $NetBSD: ALL,v 1.425 2017/08/09 18:45:30 maxv Exp $ +# $NetBSD: ALL,v 1.426 2017/08/12 06:46:13 maxv Exp $ # From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp # # ALL machine description file @@ -17,14 +17,13 @@ include "arch/i386/conf/std.i386" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "ALL-$Revision: 1.425 $" +#ident "ALL-$Revision: 1.426 $" maxusers 64 # estimated number of users makeoptions USE_SSP=yes # CPU-related options. -options VM86 # virtual 8086 emulation options USER_LDT # user-settable LDT; used by WINE options X86EMU # 386 Real Mode emulator options PAE # PAE mode (36 bits physical addressing) Index: src/sys/arch/i386/conf/GENERIC diff -u src/sys/arch/i386/conf/GENERIC:1.1164 src/sys/arch/i386/conf/GENERIC:1.1165 --- src/sys/arch/i386/conf/GENERIC:1.1164 Wed Aug 9 18:45:30 2017 +++ src/sys/arch/i386/conf/GENERIC Sat Aug 12 06:46:13 2017 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.1164 2017/08/09 18:45:30 maxv Exp $ +# $NetBSD: GENERIC,v 1.1165 2017/08/12 06:46:13 maxv Exp $ # # GENERIC machine description file # @@ -22,12 +22,11 @@ include "arch/i386/conf/std.i386" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.1164 $" +#ident "GENERIC-$Revision: 1.1165 $" maxusers 64 # estimated number of users # CPU-related options. -#options VM86 # virtual 8086 emulation options USER_LDT # user-settable LDT; used by WINE #options PAE # PAE mode (36 bits physical addressing) Index: src/sys/arch/i386/conf/GENERIC_PS2TINY diff -u src/sys/arch/i386/conf/GENERIC_PS2TINY:1.77 src/sys/arch/i386/conf/GENERIC_PS2TINY:1.78 --- src/sys/arch/i386/conf/GENERIC_PS2TINY:1.77 Sun Feb 26 12:21:15 2017 +++ src/sys/arch/i386/conf/GENERIC_PS2TINY Sat Aug 12 06:46:13 2017 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC_PS2TINY,v 1.77 2017/02/26 12:21:15 maya Exp $ +# $NetBSD: GENERIC_PS2TINY,v 1.78 2017/08/12 06:46:13 maxv Exp $ # # GENERIC-style kernel config for IBM PS/2 with MCA bus. It only contains # IBM PS/2 related stuff and has been generally trimmed down somewhat, @@ -16,7 +16,6 @@ include "arch/i386/conf/std.i386" maxusers 16 # estimated number of users # CPU-related options. -options VM86 # virtual 8086 emulation options USER_LDT # user-settable LDT; used by WINE # delay between "rebooting ..." message and hardware reset, in milliseconds Index: src/sys/arch/i386/conf/GENERIC_TINY diff -u src/sys/arch/i386/conf/GENERIC_TINY:1.154 src/sys/arch/i386/conf/GENERIC_TINY:1.155 --- src/sys/arch/i386/conf/GENERIC_TINY:1.154 Thu Aug 10 17:33:32 2017 +++ src/sys/arch/i386/conf/GENERIC_TINY Sat Aug 12 06:46:13 2017 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC_TINY,v 1.154 2017/08/10 17:33:32 maxv Exp $ +# $NetBSD: GENERIC_TINY,v 1.155 2017/08/12 06:46:13 maxv Exp $ # # GENERIC_TINY -- suitable default for 4M machines # No EISA, PCI, or SCSI. @@ -14,7 +14,6 @@ makeoptions USE_SSP="no" maxusers 8 # estimated number of users # CPU-related options. -#options VM86 # virtual 8086 emulation #options USER_LDT # user-settable LDT; used by WINE # This option allows you to force a serial console at the specified Index: src/sys/arch/i386/conf/INSTALL_FLOPPY diff -u src/sys/arch/i386/conf/INSTALL_FLOPPY:1.40 src/sys/arch/i386/conf/INSTALL_FLOPPY:1.41 --- src/sys/arch/i386/conf/INSTALL_FLOPPY:1.40 Wed Aug 9 18:45:30 2017 +++ src/sys/arch/i386/conf/INSTALL_FLOPPY Sat Aug 12 06:46:13 2017 @@ -1,4 +1,4 @@ -# $NetBSD: INSTALL_FLOPPY,v 1.40 2017/08/09 18:45:30 maxv Exp $ +# $NetBSD: INSTALL_FLOPPY,v 1.41 2017/08/12 06:46:13 maxv Exp $ # # INSTALL - Installation kernel. # @@ -27,7 +27,6 @@ options MEMORY_DISK_RBFLAGS=RB_SINGLE # maxusers 2 # estimated number of users # CPU-related options. -#options VM86 # virtual 8086 emulation #options USER_LDT # user-settable LDT; used by WINE # This option allows you to force a serial console at the specified Index: src/sys/arch/i386/conf/INSTALL_TINY diff -u src/sys/arch/i386/conf/INSTALL_TINY:1.153 src/sys/arch/i386/conf/INSTALL_TINY:1.154 --- src/sys/arch/i386/conf/INSTALL_TINY:1.153 Wed Aug 9 18:45:30 2017 +++ src/sys/arch/i386/conf/INSTALL_TINY Sat Aug 12 06:46:13 2017 @@ -1,4 +1,4 @@ -# $NetBSD: INSTALL_TINY,v 1.153 2017/08/09 18:45:30 maxv Exp $ +# $NetBSD: INSTALL_TINY,v 1.154 2017/08/12 06:46:13 maxv Exp $ # # This kernel should be derived from INSTALL (which is derived # from GENERIC) with some features commented out. @@ -25,7 +25,6 @@ options MEMORY_DISK_RBFLAGS=RB_SINGLE # maxusers 2 # estimated number of users # CPU-related options. -#options VM86 # virtual 8086 emulation #options USER_LDT # user-settable LDT; used by WINE # This option allows you to force a serial console at the specified Index: src/sys/arch/i386/conf/NET4501 diff -u src/sys/arch/i386/conf/NET4501:1.97 src/sys/arch/i386/conf/NET4501:1.98 --- src/sys/arch/i386/conf/NET4501:1.97 Thu Aug 10 17:33:32 2017 +++ src/sys/arch/i386/conf/NET4501 Sat Aug 12 06:46:13 2017 @@ -1,4 +1,4 @@ -# $NetBSD: NET4501,v 1.97 2017/08/10 17:33:32 maxv Exp $ +# $NetBSD: NET4501,v 1.98 2017/08/12 06:46:13 maxv Exp $ # # NET4501 -- kernel configuration for a Soekris Engineering net4501 # single-board computer. @@ -10,7 +10,7 @@ include "arch/i386/conf/std.i386" #options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "NET4501-$Revision: 1.97 $" +#ident "NET4501-$Revision: 1.98 $" maxusers 32 # estimated number of users @@ -20,7 +20,6 @@ options TIMER_FREQ=1189200 makeoptions COPTS="-Os" # CPU-related options. -#options VM86 # virtual 8086 emulation #options USER_LDT # user-settable LDT; used by WINE #options MTRR # memory-type range register syscall support Index: src/sys/arch/i386/conf/XEN3_DOM0 diff -u src/sys/arch/i386/conf/XEN3_DOM0:1.120 src/sys/arch/i386/conf/XEN3_DOM0:1.121 --- src/sys/arch/i386/conf/XEN3_DOM0:1.120 Thu Aug 10 17:33:32 2017 +++ src/sys/arch/i386/conf/XEN3_DOM0 Sat Aug 12 06:46:13 2017 @@ -1,4 +1,4 @@ -# $NetBSD: XEN3_DOM0,v 1.120 2017/08/10 17:33:32 maxv Exp $ +# $NetBSD: XEN3_DOM0,v 1.121 2017/08/12 06:46:13 maxv Exp $ # # XEN3_0: Xen 3.0 domain0 kernel @@ -28,7 +28,6 @@ options DOM0OPS makeoptions CPUFLAGS="-march=i686" -#options VM86 # virtual 8086 emulation #options USER_LDT # user-settable LDT; used by WINE # CPU features Index: src/sys/arch/i386/conf/XEN3_DOMU diff -u src/sys/arch/i386/conf/XEN3_DOMU:1.84 src/sys/arch/i386/conf/XEN3_DOMU:1.85 --- src/sys/arch/i386/conf/XEN3_DOMU:1.84 Thu Aug 10 17:33:32 2017 +++ src/sys/arch/i386/conf/XEN3_DOMU Sat Aug 12 06:46:13 2017 @@ -1,4 +1,4 @@ -# $NetBSD: XEN3_DOMU,v 1.84 2017/08/10 17:33:32 maxv Exp $ +# $NetBSD: XEN3_DOMU,v 1.85 2017/08/12 06:46:13 maxv Exp $ include "arch/xen/conf/std.xen" @@ -18,7 +18,6 @@ options XEN makeoptions CPUFLAGS="-march=i686" -#options VM86 # virtual 8086 emulation #options USER_LDT # user-settable LDT; used by WINE #options MTRR # memory-type range register syscall support Index: src/sys/arch/i386/conf/files.i386 diff -u src/sys/arch/i386/conf/files.i386:1.384 src/sys/arch/i386/conf/files.i386:1.385 --- src/sys/arch/i386/conf/files.i386:1.384 Wed Aug 9 18:45:30 2017 +++ src/sys/arch/i386/conf/files.i386 Sat Aug 12 06:46:13 2017 @@ -1,4 +1,4 @@ -# $NetBSD: files.i386,v 1.384 2017/08/09 18:45:30 maxv Exp $ +# $NetBSD: files.i386,v 1.385 2017/08/12 06:46:13 maxv Exp $ # # new style config file for i386 architecture # @@ -18,9 +18,6 @@ defparam CPURESET_DELAY # Obsolete Xbox support obsolete defflag XBOX -# VM86 emulation -defflag VM86 - defflag PMC # User-settable LDT (used by WINE) @@ -318,9 +315,6 @@ include "dev/apm/files.apm" # Compatibility modules # -# VM86 mode -file arch/i386/i386/vm86.c vm86 - # Binary compatibility with previous NetBSD releases (COMPAT_XX) file arch/i386/i386/compat_13_machdep.c compat_13 file arch/i386/i386/compat_16_machdep.c compat_16