[patch 2/5] common entry: add hook for isolation to __syscall_exit_to_user_mode_work

From: Marcelo Tosatti
Date: Wed Jul 14 2021 - 16:43:53 EST


This hook will be used by the next patch to perform synchronization
of per-CPU vmstats.

Signed-off-by: Marcelo Tosatti <mtosatti@xxxxxxxxxx>

Index: linux-2.6-vmstat-update/kernel/entry/common.c
===================================================================
--- linux-2.6-vmstat-update.orig/kernel/entry/common.c
+++ linux-2.6-vmstat-update/kernel/entry/common.c
@@ -284,9 +284,18 @@ static void syscall_exit_to_user_mode_pr
syscall_exit_work(regs, work);
}

+/*
+ * Isolaton specific exit to user mode preparation. Runs with interrupts
+ * enabled.
+ */
+static void isolation_exit_to_user_mode_prepare(void)
+{
+}
+
static __always_inline void __syscall_exit_to_user_mode_work(struct pt_regs *regs)
{
syscall_exit_to_user_mode_prepare(regs);
+ isolation_exit_to_user_mode_prepare();
local_irq_disable_exit_to_user();
exit_to_user_mode_prepare(regs);
}