From owner-p4-projects Fri Sep 20 19:17:29 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id A343637B404; Fri, 20 Sep 2002 19:17:25 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 65C4F37B401 for ; Fri, 20 Sep 2002 19:17:25 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0688F43E6A for ; Fri, 20 Sep 2002 19:17:25 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from freefall.freebsd.org (perforce@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.6/8.12.6) with ESMTP id g8L2HOCo087504 for ; Fri, 20 Sep 2002 19:17:24 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by freefall.freebsd.org (8.12.6/8.12.6/Submit) id g8L2HOut087501 for perforce@freebsd.org; Fri, 20 Sep 2002 19:17:24 -0700 (PDT) Date: Fri, 20 Sep 2002 19:17:24 -0700 (PDT) Message-Id: <200209210217.g8L2HOut087501@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm Subject: PERFORCE change 17801 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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 #endif -#include - #include #include @@ -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