Index: arch/amd64/src/syscall.c
===================================================================
--- arch/amd64/src/syscall.c	(revision dd4d6b00d0c3e88b7dd79f5e3fcc541f04c5289e)
+++ arch/amd64/src/syscall.c	(revision 4fdf3cc59b40f9758bf5a619c64a5a4718be1fee)
@@ -35,4 +35,5 @@
 
 #include <print.h>
+#include <arch/cpu.h>
 
 extern void syscall_entry(void);
@@ -55,7 +56,8 @@
 	write_msr(AMD_MSR_LSTAR, (__u64)syscall_entry);
 	/* Mask RFLAGS on syscall 
-	 * - we do not care what is in the flags field
+	 * - disable interrupts, until we exchange the stack register
+	 *   (mask the IE bit)
 	 */
-	write_msr(AMD_MSR_SFMASK, 0);
+	write_msr(AMD_MSR_SFMASK, 0x200);
 }
 
@@ -63,8 +65,9 @@
 __native syscall_handler(__native id, __native a1, __native a2, __native a3)
 {
+	interrupts_enable();
 	if (id < SYSCALL_END)
 		return syscall_table[id](a1,a2,a3);
 	else
 		panic("Undefined syscall %d", id);
-	
+	interrupts_disable();
 }
