From owner-svn-src-all@FreeBSD.ORG Sun Oct 19 01:35:27 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 98C7E1065686; Sun, 19 Oct 2008 01:35:27 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 87B8E8FC16; Sun, 19 Oct 2008 01:35:27 +0000 (UTC) (envelope-from kmacy@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9J1ZRAV030747; Sun, 19 Oct 2008 01:35:27 GMT (envelope-from kmacy@svn.freebsd.org) Received: (from kmacy@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9J1ZRl3030744; Sun, 19 Oct 2008 01:35:27 GMT (envelope-from kmacy@svn.freebsd.org) Message-Id: <200810190135.m9J1ZRl3030744@svn.freebsd.org> From: Kip Macy Date: Sun, 19 Oct 2008 01:35:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184042 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 19 Oct 2008 01:35:27 -0000 Author: kmacy Date: Sun Oct 19 01:35:27 2008 New Revision: 184042 URL: http://svn.freebsd.org/changeset/base/184042 Log: - Forward port flush of page table updates on context switch or userret - Forward port vfork XEN hack Modified: head/sys/kern/kern_fork.c head/sys/kern/kern_synch.c head/sys/kern/subr_trap.c Modified: head/sys/kern/kern_fork.c ============================================================================== --- head/sys/kern/kern_fork.c Sun Oct 19 01:33:58 2008 (r184041) +++ head/sys/kern/kern_fork.c Sun Oct 19 01:35:27 2008 (r184042) @@ -117,10 +117,15 @@ vfork(td, uap) struct thread *td; struct vfork_args *uap; { - int error; + int error, flags; struct proc *p2; - error = fork1(td, RFFDG | RFPROC | RFPPWAIT | RFMEM, 0, &p2); +#ifdef XEN + flags = RFFDG | RFPROC; /* validate that this is still an issue */ +#else + flags = RFFDG | RFPROC | RFPPWAIT | RFMEM; +#endif + error = fork1(td, flags, 0, &p2); if (error == 0) { td->td_retval[0] = p2->p_pid; td->td_retval[1] = 0; Modified: head/sys/kern/kern_synch.c ============================================================================== --- head/sys/kern/kern_synch.c Sun Oct 19 01:33:58 2008 (r184041) +++ head/sys/kern/kern_synch.c Sun Oct 19 01:35:27 2008 (r184042) @@ -65,6 +65,12 @@ __FBSDID("$FreeBSD$"); #include +#ifdef XEN +#include +#include +#include +#endif + static void synch_setup(void *dummy); SYSINIT(synch_setup, SI_SUB_KICK_SCHEDULER, SI_ORDER_FIRST, synch_setup, NULL); @@ -432,6 +438,9 @@ mi_switch(int flags, struct thread *newt td, td->td_name, td->td_priority, td->td_inhibitors, td->td_wmesg, td->td_lockname); #endif +#ifdef XEN + PT_UPDATES_FLUSH(); +#endif sched_switch(td, newtd, flags); CTR3(KTR_SCHED, "mi_switch: running %p(%s) prio %d", td, td->td_name, td->td_priority); Modified: head/sys/kern/subr_trap.c ============================================================================== --- head/sys/kern/subr_trap.c Sun Oct 19 01:33:58 2008 (r184041) +++ head/sys/kern/subr_trap.c Sun Oct 19 01:35:27 2008 (r184042) @@ -73,6 +73,12 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef XEN +#include +#include +#include +#endif + #include /* @@ -118,6 +124,9 @@ userret(struct thread *td, struct trapfr sched_userret(td); KASSERT(td->td_locks == 0, ("userret: Returning with %d locks held.", td->td_locks)); +#ifdef XEN + PT_UPDATES_FLUSH(); +#endif } /*