From f04168c480f134c1923cf8f1b9eb7613880b49b6 Mon Sep 17 00:00:00 2001 From: Gordon Willem Klok Date: Mon, 11 Dec 2006 23:45:14 +0000 Subject: Ensure kvm86_call actually saves the curpcb instead of junk. Error introduced by myself at h2k6, thanks mickey@ and toby@ for turning me in the direction of a corrupt PCB. --- sys/arch/i386/i386/kvm86call.S | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sys/arch/i386/i386/kvm86call.S b/sys/arch/i386/i386/kvm86call.S index 0f022e852e5..de48f15ef8a 100644 --- a/sys/arch/i386/i386/kvm86call.S +++ b/sys/arch/i386/i386/kvm86call.S @@ -1,4 +1,4 @@ -/* $OpenBSD: kvm86call.S,v 1.3 2006/11/30 00:05:40 gwk Exp $ */ +/* $OpenBSD: kvm86call.S,v 1.4 2006/12/11 23:45:13 gwk Exp $ */ /* $NetBSD: kvm86call.S,v 1.7 2006/04/11 17:14:07 drochner Exp $ */ /*- @@ -88,9 +88,11 @@ ENTRY(kvm86_call) leal _C_LABEL(cpu_info_primary),%ecx #endif - pushl %eax - movl vm86pcb,%eax - movl %eax,CPU_INFO_CURPCB(%ecx) + movl CPU_INFO_CURPCB(%ecx),%eax + pushl %eax /* save curpcb */ + + movl vm86pcb,%eax + movl %eax,CPU_INFO_CURPCB(%ecx) /* set curpcb to vm86pcb */ movl CPU_INFO_CURPROC(%ecx),%ecx movl P_MD_TSS_SEL(%ecx),%edi -- cgit v1.2.3