Date: Fri, 20 Sep 2002 19:17:24 -0700 (PDT) From: Peter Wemm <peter@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 17801 for review Message-ID: <200209210217.g8L2HOut087501@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=17801 Change 17801 by peter@peter_daintree on 2002/09/20 19:17:19 zap some vm86 crud Affected files ... .. //depot/projects/hammer/sys/x86_64/x86_64/trap.c#3 edit Differences ... ==== //depot/projects/hammer/sys/x86_64/x86_64/trap.c#3 (text+ko) ==== @@ -95,8 +95,6 @@ #include <machine/clock.h> #endif -#include <machine/vm86.h> - #include <ddb/ddb.h> #include <sys/sysctl.h> @@ -257,8 +255,7 @@ ether_poll(poll_in_trap); #endif /* DEVICE_POLLING */ - if ((ISPL(frame.tf_cs) == SEL_UPL) || - ((frame.tf_eflags & PSL_VM) && !in_vm86call)) { + if (ISPL(frame.tf_cs) == SEL_UPL) { /* user trap */ sticks = td->td_kse->ke_sticks; @@ -301,23 +298,8 @@ i = SIGFPE; break; - /* - * The following two traps can happen in - * vm86 mode, and, if so, we want to handle - * them specially. - */ case T_PROTFLT: /* general protection fault */ case T_STKFLT: /* stack fault */ - if (frame.tf_eflags & PSL_VM) { - mtx_lock(&Giant); - i = vm86_emulate((struct vm86frame *)&frame); - mtx_unlock(&Giant); - if (i == 0) - goto user; - break; - } - /* FALLTHROUGH */ - case T_SEGNPFLT: /* segment not present fault */ case T_TSSFLT: /* invalid TSS fault */ case T_DOUBLEFLT: /* double fault */ @@ -443,33 +425,11 @@ #endif break; - /* - * The following two traps can happen in - * vm86 mode, and, if so, we want to handle - * them specially. - */ - case T_PROTFLT: /* general protection fault */ case T_STKFLT: /* stack fault */ - if (frame.tf_eflags & PSL_VM) { - mtx_lock(&Giant); - i = vm86_emulate((struct vm86frame *)&frame); - mtx_unlock(&Giant); - if (i != 0) - /* - * returns to original process - */ - vm86_trap((struct vm86frame *)&frame); - goto out; - } - if (type == T_STKFLT) - break; + break; - /* FALL THROUGH */ - + case T_PROTFLT: /* general protection fault */ case T_SEGNPFLT: /* segment not present fault */ - if (in_vm86call) - break; - if (td->td_intr_nesting_level != 0) break; @@ -569,7 +529,7 @@ * debugging the kernel. */ /* XXX Giant */ - if (user_dbreg_trap() && !in_vm86call) { + if (user_dbreg_trap()) { /* * Reset breakpoint bits because the * processor doesn't @@ -767,7 +727,6 @@ if (type <= MAX_TRAP_MSG) printf("\n\nFatal trap %d: %s while in %s mode\n", type, trap_msg[type], - frame->tf_eflags & PSL_VM ? "vm86" : ISPL(frame->tf_cs) == SEL_UPL ? "user" : "kernel"); #ifdef SMP /* two separate prints in case of a trap on an unmapped page */ @@ -806,8 +765,6 @@ printf("nested task, "); if (frame->tf_eflags & PSL_RF) printf("resume, "); - if (frame->tf_eflags & PSL_VM) - printf("vm86, "); printf("IOPL = %d\n", (frame->tf_eflags & PSL_IOPL) >> 12); printf("current process = "); if (curproc) { To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe p4-projects" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200209210217.g8L2HOut087501>