diff -NurpP --minimal linux-2.4.23-vs1.3.1/Makefile linux-2.4.23-vs1.3.2/Makefile
--- linux-2.4.23-vs1.3.1/Makefile	Thu Dec 25 22:24:05 2003
+++ linux-2.4.23-vs1.3.2/Makefile	Sun Dec 28 01:47:15 2003
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 4
 SUBLEVEL = 23
-EXTRAVERSION = -vs1.3.1
+EXTRAVERSION = -vs1.3.2
 
 KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
 
diff -NurpP --minimal linux-2.4.23-vs1.3.1/arch/alpha/kernel/ptrace.c linux-2.4.23-vs1.3.2/arch/alpha/kernel/ptrace.c
--- linux-2.4.23-vs1.3.1/arch/alpha/kernel/ptrace.c	Thu Dec 25 22:24:05 2003
+++ linux-2.4.23-vs1.3.2/arch/alpha/kernel/ptrace.c	Sun Dec 28 01:47:15 2003
@@ -6,6 +6,7 @@
 
 #include <linux/kernel.h>
 #include <linux/sched.h>
+#include <linux/vinline.h>
 #include <linux/mm.h>
 #include <linux/smp.h>
 #include <linux/smp_lock.h>
diff -NurpP --minimal linux-2.4.23-vs1.3.1/arch/i386/kernel/ptrace.c linux-2.4.23-vs1.3.2/arch/i386/kernel/ptrace.c
--- linux-2.4.23-vs1.3.1/arch/i386/kernel/ptrace.c	Thu Dec 25 22:24:05 2003
+++ linux-2.4.23-vs1.3.2/arch/i386/kernel/ptrace.c	Sun Dec 28 01:47:15 2003
@@ -7,6 +7,7 @@
 
 #include <linux/kernel.h>
 #include <linux/sched.h>
+#include <linux/vinline.h>
 #include <linux/mm.h>
 #include <linux/smp.h>
 #include <linux/smp_lock.h>
diff -NurpP --minimal linux-2.4.23-vs1.3.1/arch/ia64/kernel/ptrace.c linux-2.4.23-vs1.3.2/arch/ia64/kernel/ptrace.c
--- linux-2.4.23-vs1.3.1/arch/ia64/kernel/ptrace.c	Thu Dec 25 22:24:05 2003
+++ linux-2.4.23-vs1.3.2/arch/ia64/kernel/ptrace.c	Sun Dec 28 01:47:15 2003
@@ -10,6 +10,7 @@
 #include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
+#include <linux/vinline.h>
 #include <linux/slab.h>
 #include <linux/mm.h>
 #include <linux/errno.h>
diff -NurpP --minimal linux-2.4.23-vs1.3.1/arch/m68k/kernel/ptrace.c linux-2.4.23-vs1.3.2/arch/m68k/kernel/ptrace.c
--- linux-2.4.23-vs1.3.1/arch/m68k/kernel/ptrace.c	Thu Dec 25 22:24:05 2003
+++ linux-2.4.23-vs1.3.2/arch/m68k/kernel/ptrace.c	Sun Dec 28 01:47:15 2003
@@ -12,6 +12,7 @@
 
 #include <linux/kernel.h>
 #include <linux/sched.h>
+#include <linux/vinline.h>
 #include <linux/mm.h>
 #include <linux/smp.h>
 #include <linux/smp_lock.h>
diff -NurpP --minimal linux-2.4.23-vs1.3.1/arch/mips/kernel/ptrace.c linux-2.4.23-vs1.3.2/arch/mips/kernel/ptrace.c
--- linux-2.4.23-vs1.3.1/arch/mips/kernel/ptrace.c	Thu Dec 25 22:24:05 2003
+++ linux-2.4.23-vs1.3.2/arch/mips/kernel/ptrace.c	Sun Dec 28 01:47:15 2003
@@ -13,6 +13,7 @@
 #include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
+#include <linux/vinline.h>
 #include <linux/mm.h>
 #include <linux/errno.h>
 #include <linux/ptrace.h>
diff -NurpP --minimal linux-2.4.23-vs1.3.1/arch/mips64/kernel/ptrace.c linux-2.4.23-vs1.3.2/arch/mips64/kernel/ptrace.c
--- linux-2.4.23-vs1.3.1/arch/mips64/kernel/ptrace.c	Thu Dec 25 22:24:05 2003
+++ linux-2.4.23-vs1.3.2/arch/mips64/kernel/ptrace.c	Sun Dec 28 01:47:15 2003
@@ -15,6 +15,7 @@
 #include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
+#include <linux/vinline.h>
 #include <linux/mm.h>
 #include <linux/errno.h>
 #include <linux/ptrace.h>
diff -NurpP --minimal linux-2.4.23-vs1.3.1/arch/parisc/kernel/ptrace.c linux-2.4.23-vs1.3.2/arch/parisc/kernel/ptrace.c
--- linux-2.4.23-vs1.3.1/arch/parisc/kernel/ptrace.c	Thu Dec 25 22:24:05 2003
+++ linux-2.4.23-vs1.3.2/arch/parisc/kernel/ptrace.c	Sun Dec 28 01:47:15 2003
@@ -8,6 +8,7 @@
 
 #include <linux/kernel.h>
 #include <linux/sched.h>
+#include <linux/vinline.h>
 #include <linux/mm.h>
 #include <linux/smp.h>
 #include <linux/smp_lock.h>
diff -NurpP --minimal linux-2.4.23-vs1.3.1/arch/ppc/kernel/ptrace.c linux-2.4.23-vs1.3.2/arch/ppc/kernel/ptrace.c
--- linux-2.4.23-vs1.3.1/arch/ppc/kernel/ptrace.c	Thu Dec 25 22:24:05 2003
+++ linux-2.4.23-vs1.3.2/arch/ppc/kernel/ptrace.c	Sun Dec 28 01:47:15 2003
@@ -18,6 +18,7 @@
 
 #include <linux/kernel.h>
 #include <linux/sched.h>
+#include <linux/vinline.h>
 #include <linux/mm.h>
 #include <linux/smp.h>
 #include <linux/smp_lock.h>
diff -NurpP --minimal linux-2.4.23-vs1.3.1/arch/ppc64/kernel/ptrace.c linux-2.4.23-vs1.3.2/arch/ppc64/kernel/ptrace.c
--- linux-2.4.23-vs1.3.1/arch/ppc64/kernel/ptrace.c	Thu Dec 25 22:24:05 2003
+++ linux-2.4.23-vs1.3.2/arch/ppc64/kernel/ptrace.c	Sun Dec 28 01:47:15 2003
@@ -19,6 +19,7 @@
 
 #include <linux/kernel.h>
 #include <linux/sched.h>
+#include <linux/vinline.h>
 #include <linux/mm.h>
 #include <linux/smp.h>
 #include <linux/smp_lock.h>
diff -NurpP --minimal linux-2.4.23-vs1.3.1/arch/s390/kernel/ptrace.c linux-2.4.23-vs1.3.2/arch/s390/kernel/ptrace.c
--- linux-2.4.23-vs1.3.1/arch/s390/kernel/ptrace.c	Thu Dec 25 22:24:05 2003
+++ linux-2.4.23-vs1.3.2/arch/s390/kernel/ptrace.c	Sun Dec 28 01:47:15 2003
@@ -24,6 +24,7 @@
 #include <stddef.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
+#include <linux/vinline.h>
 #include <linux/mm.h>
 #include <linux/smp.h>
 #include <linux/smp_lock.h>
diff -NurpP --minimal linux-2.4.23-vs1.3.1/arch/s390x/kernel/ptrace.c linux-2.4.23-vs1.3.2/arch/s390x/kernel/ptrace.c
--- linux-2.4.23-vs1.3.1/arch/s390x/kernel/ptrace.c	Thu Dec 25 22:24:05 2003
+++ linux-2.4.23-vs1.3.2/arch/s390x/kernel/ptrace.c	Sun Dec 28 01:47:15 2003
@@ -25,6 +25,7 @@
 #include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
+#include <linux/vinline.h>
 #include <linux/mm.h>
 #include <linux/smp.h>
 #include <linux/smp_lock.h>
diff -NurpP --minimal linux-2.4.23-vs1.3.1/arch/sparc64/kernel/ptrace.c linux-2.4.23-vs1.3.2/arch/sparc64/kernel/ptrace.c
--- linux-2.4.23-vs1.3.1/arch/sparc64/kernel/ptrace.c	Thu Dec 25 22:24:05 2003
+++ linux-2.4.23-vs1.3.2/arch/sparc64/kernel/ptrace.c	Sun Dec 28 01:47:15 2003
@@ -12,6 +12,7 @@
 
 #include <linux/kernel.h>
 #include <linux/sched.h>
+#include <linux/vinline.h>
 #include <linux/mm.h>
 #include <linux/errno.h>
 #include <linux/ptrace.h>
diff -NurpP --minimal linux-2.4.23-vs1.3.1/arch/x86_64/kernel/ptrace.c linux-2.4.23-vs1.3.2/arch/x86_64/kernel/ptrace.c
--- linux-2.4.23-vs1.3.1/arch/x86_64/kernel/ptrace.c	Thu Dec 25 22:24:05 2003
+++ linux-2.4.23-vs1.3.2/arch/x86_64/kernel/ptrace.c	Sun Dec 28 01:47:15 2003
@@ -9,6 +9,7 @@
 
 #include <linux/kernel.h>
 #include <linux/sched.h>
+#include <linux/vinline.h>
 #include <linux/mm.h>
 #include <linux/smp.h>
 #include <linux/smp_lock.h>
diff -NurpP --minimal linux-2.4.23-vs1.3.1/fs/devpts/inode.c linux-2.4.23-vs1.3.2/fs/devpts/inode.c
--- linux-2.4.23-vs1.3.1/fs/devpts/inode.c	Thu Dec 25 22:24:05 2003
+++ linux-2.4.23-vs1.3.2/fs/devpts/inode.c	Sun Dec 28 01:47:15 2003
@@ -22,7 +22,7 @@
 #include <linux/slab.h>
 #include <linux/stat.h>
 #include <linux/tty.h>
-#include <linux/vcontext.h>
+#include <linux/vinline.h>
 #include <asm/bitops.h>
 #include <asm/uaccess.h>
 
diff -NurpP --minimal linux-2.4.23-vs1.3.1/fs/devpts/root.c linux-2.4.23-vs1.3.2/fs/devpts/root.c
--- linux-2.4.23-vs1.3.1/fs/devpts/root.c	Thu Dec 25 22:24:05 2003
+++ linux-2.4.23-vs1.3.2/fs/devpts/root.c	Sun Dec 28 01:47:15 2003
@@ -14,7 +14,7 @@
 #include <linux/stat.h>
 #include <linux/param.h>
 #include <linux/string.h>
-#include <linux/sched.h>
+#include <linux/vinline.h>
 #include "devpts_i.h"
 
 static int devpts_root_readdir(struct file *,void *,filldir_t);
diff -NurpP --minimal linux-2.4.23-vs1.3.1/fs/inode.c linux-2.4.23-vs1.3.2/fs/inode.c
--- linux-2.4.23-vs1.3.1/fs/inode.c	Thu Dec 25 22:24:05 2003
+++ linux-2.4.23-vs1.3.2/fs/inode.c	Sun Dec 28 01:47:15 2003
@@ -17,6 +17,7 @@
 #include <linux/swapctl.h>
 #include <linux/prefetch.h>
 #include <linux/locks.h>
+#include <linux/vinline.h>
 
 /*
  * New inode.c implementation.
diff -NurpP --minimal linux-2.4.23-vs1.3.1/fs/namei.c linux-2.4.23-vs1.3.2/fs/namei.c
--- linux-2.4.23-vs1.3.1/fs/namei.c	Thu Dec 25 22:24:05 2003
+++ linux-2.4.23-vs1.3.2/fs/namei.c	Sun Dec 28 01:47:15 2003
@@ -22,7 +22,7 @@
 #include <linux/dnotify.h>
 #include <linux/smp_lock.h>
 #include <linux/personality.h>
-#include <linux/vcontext.h>
+#include <linux/vinline.h>
 
 #include <asm/namei.h>
 #include <asm/uaccess.h>
diff -NurpP --minimal linux-2.4.23-vs1.3.1/fs/proc/array.c linux-2.4.23-vs1.3.2/fs/proc/array.c
--- linux-2.4.23-vs1.3.1/fs/proc/array.c	Thu Dec 25 22:24:05 2003
+++ linux-2.4.23-vs1.3.2/fs/proc/array.c	Sun Dec 28 01:47:15 2003
@@ -71,12 +71,12 @@
 #include <linux/signal.h>
 #include <linux/highmem.h>
 #include <linux/seq_file.h>
+#include <linux/vinline.h>
 
 #include <asm/uaccess.h>
 #include <asm/pgtable.h>
 #include <asm/io.h>
 #include <asm/processor.h>
-// #include <asm/unistd.h>
 
 /* Gcc optimizes away "strlen(x)" for constant x */
 #define ADDBUF(buffer, string) \
@@ -302,9 +302,9 @@ int proc_pid_status(struct task_struct *
 	buffer = task_sig(task, buffer);
 	buffer = task_cap(task, buffer);
 
+	buffer += sprintf (buffer,"s_context: %d\n", vx_task_id(task));
 	vxi = task_get_vx_info(task);
 	if (vxi) {
-		buffer += sprintf (buffer,"s_context: %d\n", vx_task_id(task));
 		buffer += sprintf (buffer,"ctxticks: %d %ld %d\n"
 			,atomic_read(&vxi->limit.ticks)
 			,task->counter
@@ -314,7 +314,6 @@ int proc_pid_status(struct task_struct *
 		buffer += sprintf (buffer,"initpid: %d\n"
 			,vxi->vx_initpid);
 	} else {
-		buffer += sprintf (buffer,"s_context: %d\n", vx_task_id(task));
 		buffer += sprintf (buffer,"ctxticks: none\n");
 		buffer += sprintf (buffer,"ctxflags: none\n");
 		buffer += sprintf (buffer,"initpid: none\n");
diff -NurpP --minimal linux-2.4.23-vs1.3.1/fs/proc/base.c linux-2.4.23-vs1.3.2/fs/proc/base.c
--- linux-2.4.23-vs1.3.1/fs/proc/base.c	Thu Dec 25 22:24:05 2003
+++ linux-2.4.23-vs1.3.2/fs/proc/base.c	Sun Dec 28 01:47:15 2003
@@ -25,6 +25,7 @@
 #include <linux/string.h>
 #include <linux/seq_file.h>
 #include <linux/namespace.h>
+#include <linux/vinline.h>
 
 /*
  * For hysterical raisins we keep the same inumbers as in the old procfs.
diff -NurpP --minimal linux-2.4.23-vs1.3.1/fs/proc/generic.c linux-2.4.23-vs1.3.2/fs/proc/generic.c
--- linux-2.4.23-vs1.3.1/fs/proc/generic.c	Thu Dec 25 22:24:05 2003
+++ linux-2.4.23-vs1.3.2/fs/proc/generic.c	Sun Dec 28 01:47:15 2003
@@ -16,6 +16,7 @@
 #include <linux/stat.h>
 #define __NO_VERSION__
 #include <linux/module.h>
+#include <linux/vinline.h>
 #include <asm/bitops.h>
 
 static ssize_t proc_file_read(struct file * file, char * buf,
diff -NurpP --minimal linux-2.4.23-vs1.3.1/fs/proc/proc_misc.c linux-2.4.23-vs1.3.2/fs/proc/proc_misc.c
--- linux-2.4.23-vs1.3.1/fs/proc/proc_misc.c	Thu Dec 25 22:24:05 2003
+++ linux-2.4.23-vs1.3.2/fs/proc/proc_misc.c	Sun Dec 28 01:47:16 2003
@@ -18,6 +18,7 @@
 #include <linux/types.h>
 #include <linux/errno.h>
 #include <linux/sched.h>
+#include <linux/vinline.h>
 #include <linux/kernel.h>
 #include <linux/kernel_stat.h>
 #include <linux/tty.h>
diff -NurpP --minimal linux-2.4.23-vs1.3.1/fs/proc/root.c linux-2.4.23-vs1.3.2/fs/proc/root.c
--- linux-2.4.23-vs1.3.1/fs/proc/root.c	Thu Dec 25 22:24:05 2003
+++ linux-2.4.23-vs1.3.2/fs/proc/root.c	Sun Dec 28 01:47:15 2003
@@ -15,7 +15,7 @@
 #include <linux/config.h>
 #include <linux/init.h>
 #include <linux/module.h>
-#include <linux/vcontext.h>
+#include <linux/vinline.h>
 #include <asm/bitops.h>
 
 struct proc_dir_entry *proc_net, *proc_bus, *proc_root_fs, *proc_root_driver;
diff -NurpP --minimal linux-2.4.23-vs1.3.1/fs/proc/virtual.c linux-2.4.23-vs1.3.2/fs/proc/virtual.c
--- linux-2.4.23-vs1.3.1/fs/proc/virtual.c	Thu Dec 25 22:24:05 2003
+++ linux-2.4.23-vs1.3.2/fs/proc/virtual.c	Sun Dec 28 01:47:15 2003
@@ -17,8 +17,8 @@
 #include <linux/errno.h>
 #include <linux/proc_fs.h>
 
-#include <linux/vcontext.h>
 #include <linux/vswitch.h>
+#include <linux/vinline.h>
 
 
 extern struct proc_dir_entry *proc_virtual;
@@ -85,11 +85,11 @@ int vx_status_read_func (char *page, cha
 
 static int vx_proc_permission(struct inode *inode, int mask)
 {
-	dprintk("vx_proc_permission(%p) = #%d,%04x\n",
+	vxdprintk("vx_proc_permission(%p) = #%d,%04x\n",
 		inode, inode->i_xid, inode->u.proc_i.vx_flags);
 	if (vx_check(inode->i_xid, inode->u.proc_i.vx_flags))
 		return 0;
-	dprintk("vx_proc_permission(%p) #%d != #%d\n",
+	vxdprintk("vx_proc_permission(%p) #%d != #%d\n",
 		inode, inode->i_xid, vx_current_id());
 	return -ENOENT;
 }
diff -NurpP --minimal linux-2.4.23-vs1.3.1/include/linux/sched.h linux-2.4.23-vs1.3.2/include/linux/sched.h
--- linux-2.4.23-vs1.3.1/include/linux/sched.h	Fri Dec 26 00:19:38 2003
+++ linux-2.4.23-vs1.3.2/include/linux/sched.h	Sun Dec 28 01:50:27 2003
@@ -279,11 +279,8 @@ struct user_struct {
 	atomic_inc(&__user->__count);			\
 	__user; })
 
-
-struct vx_info;
-struct ip_info;
-
 extern struct user_struct root_user;
+
 #define INIT_USER (&root_user)
 
 struct task_struct {
@@ -411,10 +408,12 @@ struct task_struct {
 	size_t sas_ss_size;
 	int (*notifier)(void *priv);
 
-	__u32 cap_bset;	/* Maximum capability of this process and children */
+/* vserver data */
+	__u32 cap_bset;
 	xid_t vx_id;
 	struct vx_info *vx_info;
 	struct ip_info *ip_info;
+
 	void *notifier_data;
 	sigset_t *notifier_mask;
 	
@@ -520,6 +519,9 @@ extern struct exec_domain	default_exec_d
     alloc_lock:		SPIN_LOCK_UNLOCKED,				\
     journal_info:	NULL,						\
     cap_bset:		CAP_INIT_EFF_SET,				\
+    vx_id:		0,						\
+    vx_info:		NULL,						\
+    ip_info:		NULL,						\
 }
 
 
@@ -971,33 +973,6 @@ static inline void cond_resched(void)
 	if (need_resched())
 		__cond_resched();
 }
-
-#define task_get_vx_info(i)	__task_get_vx_info(i,__FILE__,__LINE__)
-
-static __inline__ struct vx_info *__task_get_vx_info(struct task_struct *p,
-	const char *_file, int _line)
-{
-	struct vx_info *vxi;
-	
-	task_lock(p);
-	vxi = __get_vx_info(p->vx_info, _file, _line);
-	task_unlock(p);
-	return vxi;
-}
-
-#define task_get_ip_info(i)	__task_get_ip_info(i,__FILE__,__LINE__)
-
-static __inline__ struct ip_info *__task_get_ip_info(struct task_struct *p,
-	const char *_file, int _line)
-{
-	struct ip_info *ipi;
-	
-	task_lock(p);
-	ipi = __get_ip_info(p->ip_info, _file, _line);
-	task_unlock(p);
-	return ipi;
-}
-
 
 #endif /* __KERNEL__ */
 #endif
diff -NurpP --minimal linux-2.4.23-vs1.3.1/include/linux/vcontext.h linux-2.4.23-vs1.3.2/include/linux/vcontext.h
--- linux-2.4.23-vs1.3.1/include/linux/vcontext.h	Thu Dec 25 23:59:25 2003
+++ linux-2.4.23-vs1.3.2/include/linux/vcontext.h	Sun Dec 28 01:50:18 2003
@@ -1,14 +1,6 @@
 #ifndef _VX_CONTEXT_H
 #define _VX_CONTEXT_H
 
-#define DEBUG_VX
-#if defined(DEBUG) || defined(DEBUG_VX)
-#include <linux/kernel.h>
-#define dprintk(x...) printk("vxd: " x)
-#else
-#define dprintk(x...)
-#endif
-
 
 #define VX_INFO_LOCK		1	/* Can't request a new vx_id */
 #define VX_INFO_SCHED		2	/* All process in the vx_id */
@@ -77,56 +69,6 @@ extern spinlock_t vxlist_lock;
 extern struct list_head vx_infos;
 
 
-void free_vx_info(struct vx_info *);
-
-extern int proc_pid_vinfo(struct task_struct *, char *);
-
-
-#define get_vx_info(i)	__get_vx_info(i,__FILE__,__LINE__)
-
-static __inline__ struct vx_info *__get_vx_info(struct vx_info *vxi, const char *_file, int _line)
-{
-	/* for now we allow vxi to be null */
-	if (!vxi)
-		return NULL;
-	dprintk("get_vx_info(%p[#%d.%d])\t%s:%d\n", vxi,
-		vxi->vx_id, atomic_read(&vxi->vx_refcount),
-		_file, _line);
-	atomic_inc(&vxi->vx_refcount);
-	return vxi;
-}
-
-#define put_vx_info(i)	__put_vx_info(i,__FILE__,__LINE__)
-
-static __inline__ void __put_vx_info(struct vx_info *vxi, const char *_file, int _line)
-{
-	/* for now we allow vxi to be null */
-	if (!vxi)
-		return;
-	dprintk("put_vx_info(%p[#%d.%d])\t%s:%d\n", vxi,
-		vxi->vx_id, atomic_read(&vxi->vx_refcount),
-		_file, _line);
-	if (atomic_dec_and_lock(&vxi->vx_refcount, &vxlist_lock)) {
-		list_del(&vxi->vx_list);
-		spin_unlock(&vxlist_lock);
-		free_vx_info(vxi);
-	}
-}
-
-#define vx_verify_info(p,i)	\
-	__vx_verify_info((p)->vx_info,i,__FILE__,__LINE__)
-
-static __inline__ void __vx_verify_info(
-	struct vx_info *vxa, struct vx_info *vxb,
-	const char *_file, int _line)
-{
-	if (vxa == vxb)
-		return;
-	printk(KERN_ERR "vx bad assumption (%p==%p) at %s:%d\n",
-		vxa, vxb, _file, _line);
-}
-
-
 #define	VX_ADMIN	0x0001
 #define	VX_WATCH	0x0002
 
@@ -147,40 +89,6 @@ static __inline__ void __vx_verify_info(
 #include <asm/current.h>
 
 
-/* required to resolve recursive dependancies */
-
-#define vx_task_id(t)   ((t)->vx_id)
-
-#define vx_current_id() vx_task_id(current)
-
-#define vx_check(c,m)	__vx_check(vx_current_id(),c,m)
-
-
-/*
- * check current context for ADMIN/WATCH and
- * optionally agains supplied argument
- */
-static __inline__ int __vx_check(xid_t cid, xid_t id, unsigned int mode)
-{
-	if (mode & VX_ARG_MASK) {
-		if ((mode & VX_IDENT) &&
-			(id == cid))
-			return 1;
-	}
-	if (mode & VX_ATR_MASK) {
-		if ((mode & VX_DYNAMIC) &&
-			(id >= MIN_D_CONTEXT) &&
-			(id <= MAX_S_CONTEXT))
-			return 1;
-		if ((mode & VX_STATIC) &&
-			(id > 1) && (id < MIN_D_CONTEXT))
-			return 1;
-	}
-	return (((mode & VX_ADMIN) && (cid == 0)) ||
-		((mode & VX_WATCH) && (cid == 1)));
-}
-
-
 
 struct ip_info {
 	struct list_head ip_list;		/* linked list of ipinfos */
@@ -200,52 +108,6 @@ struct ip_info {
 
 extern spinlock_t iplist_lock;
 extern struct list_head ip_infos;
-
-
-void free_ip_info(struct ip_info *);
-
-#define get_ip_info(i)	__get_ip_info(i,__FILE__,__LINE__)
-
-static __inline__ struct ip_info *__get_ip_info(struct ip_info *ipi, const char *_file, int _line)
-{
-	/* for now we allow vxi to be null */
-	if (!ipi)
-		return NULL;
-	dprintk("get_ip_info(%p[%d])\t%s:%d\n", ipi,
-		atomic_read(&ipi->ip_refcount), _file, _line);
-	atomic_inc(&ipi->ip_refcount);
-	return ipi;
-}
-
-#define put_ip_info(i)	__put_ip_info(i,__FILE__,__LINE__)
-
-static __inline__ void __put_ip_info(struct ip_info *ipi, const char *_file, int _line)
-{
-	/* for now we allow vxi to be null */
-	if (!ipi)
-		return;
-	dprintk("put_ip_info(%p[%d])\t%s:%d\n", ipi,
-		atomic_read(&ipi->ip_refcount), _file, _line);
-	if (atomic_dec_and_lock(&ipi->ip_refcount, &iplist_lock)) {
-		list_del(&ipi->ip_list);
-		spin_unlock(&iplist_lock);
-		free_ip_info(ipi);
-	}
-}
-
-#define ip_verify_info(p,i)	\
-	__ip_verify_info((p)->ip_info,i,__FILE__,__LINE__)
-
-static __inline__ void __ip_verify_info(
-	struct ip_info *ipa, struct ip_info *ipb,
-	const char *_file, int _line)
-{
-	if (ipa == ipb)
-		return;
-	printk(KERN_ERR "ip bad assumption (%p==%p) at %s:%d\n",
-		ipa, ipb, _file, _line);
-}
-
 
 int vc_new_s_context(uint32_t, void *);
 int vc_set_ipv4root(uint32_t, void *);
diff -NurpP --minimal linux-2.4.23-vs1.3.1/include/linux/vinline.h linux-2.4.23-vs1.3.2/include/linux/vinline.h
--- linux-2.4.23-vs1.3.1/include/linux/vinline.h	Thu Jan  1 01:00:00 1970
+++ linux-2.4.23-vs1.3.2/include/linux/vinline.h	Sun Dec 28 01:51:11 2003
@@ -0,0 +1,173 @@
+#ifndef _VX_INLINE_H
+#define _VX_INLINE_H
+
+
+// #define VX_DEBUG
+
+#include <linux/kernel.h>
+#include <linux/sched.h>
+
+#if defined(VX_DEBUG)
+#define vxdprintk(x...) printk("vxd: " x)
+#else
+#define vxdprintk(x...)
+#endif
+
+
+void free_vx_info(struct vx_info *);
+
+extern int proc_pid_vinfo(struct task_struct *, char *);
+
+
+#define get_vx_info(i)	__get_vx_info(i,__FILE__,__LINE__)
+
+static __inline__ struct vx_info *__get_vx_info(struct vx_info *vxi, const char *_file, int _line)
+{
+	/* for now we allow vxi to be null */
+	if (!vxi)
+		return NULL;
+	vxdprintk("get_vx_info(%p[#%d.%d])\t%s:%d\n", vxi,
+		vxi->vx_id, atomic_read(&vxi->vx_refcount),
+		_file, _line);
+	atomic_inc(&vxi->vx_refcount);
+	return vxi;
+}
+
+#define put_vx_info(i)	__put_vx_info(i,__FILE__,__LINE__)
+
+static __inline__ void __put_vx_info(struct vx_info *vxi, const char *_file, int _line)
+{
+	/* for now we allow vxi to be null */
+	if (!vxi)
+		return;
+	vxdprintk("put_vx_info(%p[#%d.%d])\t%s:%d\n", vxi,
+		vxi->vx_id, atomic_read(&vxi->vx_refcount),
+		_file, _line);
+	if (atomic_dec_and_lock(&vxi->vx_refcount, &vxlist_lock)) {
+		list_del(&vxi->vx_list);
+		spin_unlock(&vxlist_lock);
+		free_vx_info(vxi);
+	}
+}
+
+#define task_get_vx_info(i)	__task_get_vx_info(i,__FILE__,__LINE__)
+
+static __inline__ struct vx_info *__task_get_vx_info(struct task_struct *p,
+	const char *_file, int _line)
+{
+	struct vx_info *vxi;
+	
+	task_lock(p);
+	vxi = __get_vx_info(p->vx_info, _file, _line);
+	task_unlock(p);
+	return vxi;
+}
+
+
+#define vx_verify_info(p,i)	\
+	__vx_verify_info((p)->vx_info,i,__FILE__,__LINE__)
+
+static __inline__ void __vx_verify_info(
+	struct vx_info *vxa, struct vx_info *vxb,
+	const char *_file, int _line)
+{
+	if (vxa == vxb)
+		return;
+	printk(KERN_ERR "vx bad assumption (%p==%p) at %s:%d\n",
+		vxa, vxb, _file, _line);
+}
+
+
+#define vx_task_id(t)   ((t)->vx_id)
+
+#define vx_current_id() vx_task_id(current)
+
+#define vx_check(c,m)	__vx_check(vx_current_id(),c,m)
+
+/*
+ * check current context for ADMIN/WATCH and
+ * optionally agains supplied argument
+ */
+static __inline__ int __vx_check(xid_t cid, xid_t id, unsigned int mode)
+{
+	if (mode & VX_ARG_MASK) {
+		if ((mode & VX_IDENT) &&
+			(id == cid))
+			return 1;
+	}
+	if (mode & VX_ATR_MASK) {
+		if ((mode & VX_DYNAMIC) &&
+			(id >= MIN_D_CONTEXT) &&
+			(id <= MAX_S_CONTEXT))
+			return 1;
+		if ((mode & VX_STATIC) &&
+			(id > 1) && (id < MIN_D_CONTEXT))
+			return 1;
+	}
+	return (((mode & VX_ADMIN) && (cid == 0)) ||
+		((mode & VX_WATCH) && (cid == 1)));
+}
+
+
+
+void free_ip_info(struct ip_info *);
+
+#define get_ip_info(i)	__get_ip_info(i,__FILE__,__LINE__)
+
+static __inline__ struct ip_info *__get_ip_info(struct ip_info *ipi, const char *_file, int _line)
+{
+	/* for now we allow vxi to be null */
+	if (!ipi)
+		return NULL;
+	vxdprintk("get_ip_info(%p[%d])\t%s:%d\n", ipi,
+		atomic_read(&ipi->ip_refcount), _file, _line);
+	atomic_inc(&ipi->ip_refcount);
+	return ipi;
+}
+
+#define put_ip_info(i)	__put_ip_info(i,__FILE__,__LINE__)
+
+static __inline__ void __put_ip_info(struct ip_info *ipi, const char *_file, int _line)
+{
+	/* for now we allow vxi to be null */
+	if (!ipi)
+		return;
+	vxdprintk("put_ip_info(%p[%d])\t%s:%d\n", ipi,
+		atomic_read(&ipi->ip_refcount), _file, _line);
+	if (atomic_dec_and_lock(&ipi->ip_refcount, &iplist_lock)) {
+		list_del(&ipi->ip_list);
+		spin_unlock(&iplist_lock);
+		free_ip_info(ipi);
+	}
+}
+
+#define task_get_ip_info(i)	__task_get_ip_info(i,__FILE__,__LINE__)
+
+static __inline__ struct ip_info *__task_get_ip_info(struct task_struct *p,
+	const char *_file, int _line)
+{
+	struct ip_info *ipi;
+	
+	task_lock(p);
+	ipi = __get_ip_info(p->ip_info, _file, _line);
+	task_unlock(p);
+	return ipi;
+}
+
+
+#define ip_verify_info(p,i)	\
+	__ip_verify_info((p)->ip_info,i,__FILE__,__LINE__)
+
+static __inline__ void __ip_verify_info(
+	struct ip_info *ipa, struct ip_info *ipb,
+	const char *_file, int _line)
+{
+	if (ipa == ipb)
+		return;
+	printk(KERN_ERR "ip bad assumption (%p==%p) at %s:%d\n",
+		ipa, ipb, _file, _line);
+}
+
+
+
+#endif
diff -NurpP --minimal linux-2.4.23-vs1.3.1/include/net/ip.h linux-2.4.23-vs1.3.2/include/net/ip.h
--- linux-2.4.23-vs1.3.1/include/net/ip.h	Fri Dec 26 00:22:04 2003
+++ linux-2.4.23-vs1.3.2/include/net/ip.h	Sun Dec 28 01:52:57 2003
@@ -29,7 +29,6 @@
 #include <linux/netdevice.h>
 #include <linux/inetdevice.h>
 #include <linux/in_route.h>
-#include <linux/vcontext.h>
 #include <net/route.h>
 #include <net/arp.h>
 
diff -NurpP --minimal linux-2.4.23-vs1.3.1/include/net/route.h linux-2.4.23-vs1.3.2/include/net/route.h
--- linux-2.4.23-vs1.3.1/include/net/route.h	Fri Dec 26 00:22:04 2003
+++ linux-2.4.23-vs1.3.2/include/net/route.h	Sun Dec 28 01:51:39 2003
@@ -32,7 +32,7 @@
 #include <linux/route.h>
 #include <linux/ip.h>
 #include <linux/cache.h>
-#include <linux/vcontext.h>
+#include <linux/vinline.h>
 
 #ifndef __KERNEL__
 #warning This file is not supposed to be used outside of kernel.
diff -NurpP --minimal linux-2.4.23-vs1.3.1/ipc/util.h linux-2.4.23-vs1.3.2/ipc/util.h
--- linux-2.4.23-vs1.3.1/ipc/util.h	Fri Dec 26 00:24:39 2003
+++ linux-2.4.23-vs1.3.2/ipc/util.h	Sun Dec 28 01:53:35 2003
@@ -5,7 +5,7 @@
  * ipc helper functions (c) 1999 Manfred Spraul <manfreds@colorfullife.com>
  */
 
-#include <linux/vcontext.h>
+#include <linux/vinline.h>
 
 #define USHRT_MAX 0xffff
 #define SEQ_MULTIPLIER	(IPCMNI)
diff -NurpP --minimal linux-2.4.23-vs1.3.1/kernel/exit.c linux-2.4.23-vs1.3.2/kernel/exit.c
--- linux-2.4.23-vs1.3.1/kernel/exit.c	Thu Dec 25 22:24:05 2003
+++ linux-2.4.23-vs1.3.2/kernel/exit.c	Sun Dec 28 01:47:15 2003
@@ -16,7 +16,7 @@
 #ifdef CONFIG_BSD_PROCESS_ACCT
 #include <linux/acct.h>
 #endif
-#include <linux/vcontext.h>
+#include <linux/vinline.h>
 
 #include <asm/uaccess.h>
 #include <asm/pgtable.h>
diff -NurpP --minimal linux-2.4.23-vs1.3.1/kernel/fork.c linux-2.4.23-vs1.3.2/kernel/fork.c
--- linux-2.4.23-vs1.3.1/kernel/fork.c	Thu Dec 25 22:24:05 2003
+++ linux-2.4.23-vs1.3.2/kernel/fork.c	Sun Dec 28 01:47:15 2003
@@ -22,7 +22,7 @@
 #include <linux/namespace.h>
 #include <linux/personality.h>
 #include <linux/compiler.h>
-#include <linux/vcontext.h>
+#include <linux/vinline.h>
 
 #include <asm/pgtable.h>
 #include <asm/pgalloc.h>
diff -NurpP --minimal linux-2.4.23-vs1.3.1/kernel/info.c linux-2.4.23-vs1.3.2/kernel/info.c
--- linux-2.4.23-vs1.3.1/kernel/info.c	Thu Dec 25 22:24:05 2003
+++ linux-2.4.23-vs1.3.2/kernel/info.c	Sun Dec 28 01:47:16 2003
@@ -10,6 +10,7 @@
 #include <linux/unistd.h>
 #include <linux/swap.h>
 #include <linux/smp_lock.h>
+#include <linux/vinline.h>
 
 #include <asm/uaccess.h>
 
diff -NurpP --minimal linux-2.4.23-vs1.3.1/kernel/printk.c linux-2.4.23-vs1.3.2/kernel/printk.c
--- linux-2.4.23-vs1.3.1/kernel/printk.c	Thu Dec 25 22:24:05 2003
+++ linux-2.4.23-vs1.3.2/kernel/printk.c	Sun Dec 28 01:47:15 2003
@@ -26,7 +26,7 @@
 #include <linux/module.h>
 #include <linux/interrupt.h>			/* For in_interrupt() */
 #include <linux/config.h>
-#include <linux/vcontext.h>
+#include <linux/vinline.h>
 
 #include <asm/uaccess.h>
 
diff -NurpP --minimal linux-2.4.23-vs1.3.1/kernel/sched.c linux-2.4.23-vs1.3.2/kernel/sched.c
--- linux-2.4.23-vs1.3.1/kernel/sched.c	Thu Dec 25 22:24:05 2003
+++ linux-2.4.23-vs1.3.2/kernel/sched.c	Sun Dec 28 01:47:15 2003
@@ -29,7 +29,7 @@
 #include <linux/completion.h>
 #include <linux/prefetch.h>
 #include <linux/compiler.h>
-#include <linux/vcontext.h>
+#include <linux/vinline.h>
 
 #include <asm/uaccess.h>
 #include <asm/mmu_context.h>
diff -NurpP --minimal linux-2.4.23-vs1.3.1/kernel/signal.c linux-2.4.23-vs1.3.2/kernel/signal.c
--- linux-2.4.23-vs1.3.1/kernel/signal.c	Thu Dec 25 22:24:05 2003
+++ linux-2.4.23-vs1.3.2/kernel/signal.c	Sun Dec 28 01:47:15 2003
@@ -14,6 +14,7 @@
 #include <linux/init.h>
 #include <linux/sched.h>
 #include <linux/vswitch.h>
+#include <linux/vinline.h>
 
 #include <asm/uaccess.h>
 
diff -NurpP --minimal linux-2.4.23-vs1.3.1/kernel/sys.c linux-2.4.23-vs1.3.2/kernel/sys.c
--- linux-2.4.23-vs1.3.1/kernel/sys.c	Thu Dec 25 22:24:05 2003
+++ linux-2.4.23-vs1.3.2/kernel/sys.c	Sun Dec 28 01:47:16 2003
@@ -6,7 +6,6 @@
 
 #include <linux/module.h>
 #include <linux/mm.h>
-#include <linux/vmalloc.h>
 #include <linux/utsname.h>
 #include <linux/mman.h>
 #include <linux/smp_lock.h>
@@ -16,7 +15,7 @@
 #include <linux/prctl.h>
 #include <linux/init.h>
 #include <linux/highuid.h>
-#include <linux/vcontext.h>
+#include <linux/vinline.h>
 
 #include <asm/uaccess.h>
 #include <asm/io.h>
diff -NurpP --minimal linux-2.4.23-vs1.3.1/kernel/sysctl.c linux-2.4.23-vs1.3.2/kernel/sysctl.c
--- linux-2.4.23-vs1.3.1/kernel/sysctl.c	Thu Dec 25 22:24:05 2003
+++ linux-2.4.23-vs1.3.2/kernel/sysctl.c	Sun Dec 28 01:47:16 2003
@@ -31,7 +31,6 @@
 #include <linux/sysrq.h>
 #include <linux/highuid.h>
 #include <linux/swap.h>
-#include <linux/vcontext.h>
 
 #include <asm/uaccess.h>
 
diff -NurpP --minimal linux-2.4.23-vs1.3.1/kernel/vcontext.c linux-2.4.23-vs1.3.2/kernel/vcontext.c
--- linux-2.4.23-vs1.3.1/kernel/vcontext.c	Thu Dec 25 22:24:05 2003
+++ linux-2.4.23-vs1.3.2/kernel/vcontext.c	Sun Dec 28 01:47:15 2003
@@ -18,6 +18,7 @@
 #include <linux/slab.h>
 #include <linux/vcontext.h>
 #include <linux/vswitch.h>
+#include <linux/vinline.h>
 #include <linux/sched.h>
 #include <linux/kernel_stat.h>
 
@@ -117,7 +118,7 @@ static struct vx_info *alloc_vx_info(int
 {
 	struct vx_info *new = NULL;
 	
-	dprintk("alloc_vx_info(%d)\n", id);
+	vxdprintk("alloc_vx_info(%d)\n", id);
 	/* would this benefit from a slab cache? */
 	new = kmalloc(sizeof(struct vx_info), GFP_KERNEL);
 	if (!new)
@@ -137,7 +138,7 @@ static struct vx_info *alloc_vx_info(int
 	new->virt.utsname = system_utsname;
 	up_read(&uts_sem);
 	
-	dprintk("alloc_vx_info(%d) = %p\n", id, new);
+	vxdprintk("alloc_vx_info(%d) = %p\n", id, new);
 	return new;
 }
 
@@ -145,7 +146,7 @@ extern int vx_proc_destroy(struct vx_inf
 
 void free_vx_info(struct vx_info *vxi)
 {
-	dprintk("free_vx_info(%p)\n", vxi);
+	vxdprintk("free_vx_info(%p)\n", vxi);
 	vx_proc_destroy(vxi);
 	kfree(vxi);
 }
@@ -209,7 +210,7 @@ static struct vx_info *find_or_create_vx
 {
 	struct vx_info *new, *vxi = NULL;
 	
-	dprintk("find_or_create_vx_info(%d)\n", id);
+	vxdprintk("find_or_create_vx_info(%d)\n", id);
 	if (!(new = alloc_vx_info(id)))
 		return 0;
 
@@ -226,13 +227,13 @@ static struct vx_info *find_or_create_vx
 	}
 	/* existing context requested */
 	else if ((vxi = __find_vx_info(id))) {
-		dprintk("find_or_create_vx_info(%d) = %p (found)\n", id, vxi);
+		vxdprintk("find_or_create_vx_info(%d) = %p (found)\n", id, vxi);
 		get_vx_info(vxi);
 		goto out_unlock;
 	}
 
 	/* new context requested */
-	dprintk("find_or_create_vx_info(%d) = %p (new)\n", id, vxi);
+	vxdprintk("find_or_create_vx_info(%d) = %p (new)\n", id, vxi);
 	atomic_set(&new->vx_refcount, 1);
 	list_add(&new->vx_list, &vx_infos);
 	vx_proc_create(new);
@@ -280,7 +281,7 @@ static int vx_migrate_task(struct task_s
 	if (!p || !vxi)
 		BUG();
 
-	dprintk("vx_migrate_task(%p,%p[#%d.%d)\n", p, vxi,
+	vxdprintk("vx_migrate_task(%p,%p[#%d.%d)\n", p, vxi,
 		vxi->vx_id, atomic_read(&vxi->vx_refcount));
 	spin_lock(&p->alloc_lock);
 	if ((old_vxi = p->vx_info) == vxi)
@@ -321,7 +322,6 @@ int vc_new_s_context(uint32_t ctx, void 
 
 	if (copy_from_user(&vc_data, data, sizeof(vc_data)))
 		return -EFAULT;
-	printk("post copy: %x\n", vc_data.remove_cap);
 
 	/* legacy hack, will be removed soon */
 	if (ctx == -2) {
@@ -331,7 +331,6 @@ int vc_new_s_context(uint32_t ctx, void 
 		ret = 0;
 		if (vc_data.flags & VX_INFO_INIT)
 			ret = vx_set_initpid(current->vx_info, current->tgid);
-		printk("post initpid: %d, %x\n", ret, vc_data.remove_cap);
 		if (ret == 0) {
 			/* We keep the same vx_id, but lower the capabilities */
 			current->cap_bset &= (~vc_data.remove_cap);
@@ -346,6 +345,7 @@ int vc_new_s_context(uint32_t ctx, void 
 		(current->vx_info &&
 		(current->vx_info->vx_flags & VX_INFO_LOCK)))
 		return -EPERM;
+
 	if (((ctx > MAX_S_CONTEXT) && (ctx != VX_DYNAMIC_ID)) ||
 		(ctx == 0))
 		return -EINVAL;
@@ -359,7 +359,6 @@ int vc_new_s_context(uint32_t ctx, void 
 		return -EINVAL;
 
 	ret = vx_migrate_task(current, new_vxi);
-	printk("post migrate: %d, %x\n", ret, vc_data.remove_cap);
 	if (ret == 0) {
 		current->cap_bset &= (~vc_data.remove_cap);
 		new_vxi->vx_flags |= vc_data.flags;
@@ -387,7 +386,7 @@ static struct ip_info *alloc_ip_info(voi
 {
 	struct ip_info *new = NULL;
 	
-	dprintk("alloc_ip_info()\n");
+	vxdprintk("alloc_ip_info()\n");
 	/* would this benefit from a slab cache? */
 	new = kmalloc(sizeof(struct ip_info), GFP_KERNEL);
 	if (!new)
@@ -397,7 +396,7 @@ static struct ip_info *alloc_ip_info(voi
 	/* rest of init goes here */
 	
 	
-	dprintk("alloc_ip_info() = %p\n", new);
+	vxdprintk("alloc_ip_info() = %p\n", new);
 	return new;
 }
 
@@ -405,7 +404,7 @@ static struct ip_info *alloc_ip_info(voi
 
 void free_ip_info(struct ip_info *ipi)
 {
-	dprintk("free_ip_info(%p)\n", ipi);
+	vxdprintk("free_ip_info(%p)\n", ipi);
 //	ip_proc_destroy(ipi);
 	kfree(ipi);
 }
@@ -414,7 +413,7 @@ static struct ip_info *create_ip_info(vo
 {
 	struct ip_info *new;
 	
-	dprintk("create_ip_info()\n");
+	vxdprintk("create_ip_info()\n");
 	if (!(new = alloc_ip_info()))
 		return 0;
 
diff -NurpP --minimal linux-2.4.23-vs1.3.1/net/ipv4/af_inet.c linux-2.4.23-vs1.3.2/net/ipv4/af_inet.c
--- linux-2.4.23-vs1.3.1/net/ipv4/af_inet.c	Thu Dec 25 22:24:05 2003
+++ linux-2.4.23-vs1.3.2/net/ipv4/af_inet.c	Sun Dec 28 01:47:15 2003
@@ -178,7 +178,7 @@ void inet_sock_destruct(struct sock *sk)
 	if (sk->protinfo.af_inet.opt)
 		kfree(sk->protinfo.af_inet.opt);
 
-	/* check for locking here */
+	/* reordering required? */
 	put_ip_info(sk->ip_info);
 	sk->ip_info = NULL;
 	dst_release(sk->dst_cache);
diff -NurpP --minimal linux-2.4.23-vs1.3.1/net/unix/af_unix.c linux-2.4.23-vs1.3.2/net/unix/af_unix.c
--- linux-2.4.23-vs1.3.1/net/unix/af_unix.c	Thu Dec 25 22:24:05 2003
+++ linux-2.4.23-vs1.3.2/net/unix/af_unix.c	Sun Dec 28 01:47:15 2003
@@ -109,6 +109,7 @@
 #include <linux/poll.h>
 #include <linux/smp_lock.h>
 #include <linux/rtnetlink.h>
+#include <linux/vinline.h>
 
 #include <asm/checksum.h>
 
