aboutsummaryrefslogtreecommitdiffstats
path: root/include/uapi
diff options
context:
space:
mode:
authorMordechay Goodstein <mordechay.goodstein@intel.com>2024-07-02 19:21:18 +0200
committerJohannes Berg <johannes.berg@intel.com>2024-07-03 12:24:22 +0200
commit6555acdefc758a4dae7038c3f2301f311e287218 (patch)
tree5da8eba64e5f122ce9ca3c5fc0682f564765e2a3 /include/uapi
parenthostfs: fix dev_t handling (diff)
downloadlinux-6555acdefc758a4dae7038c3f2301f311e287218.tar.gz
linux-6555acdefc758a4dae7038c3f2301f311e287218.zip
um: time-travel: support time-travel protocol broadcast messages
Add a message type to the time-travel protocol to broadcast a small (64-bit) value to all participants in a simulation. The main use case is to have an identical message come to all participants in a simulation, e.g. to separate out logs for different tests running in a single simulation. Down in the guts of time_travel_handle_message() we can't use printk() and not even printk_deferred(), so just store the message and print it at the start of the userspace() function. Unfortunately this means that other prints in the kernel can actually bypass the message, but in most cases where this is used, for example to separate test logs, userspace will be involved. Also, even if we could use printk_deferred(), we'd still need to flush it out in the userspace() function since otherwise userspace messages might cross it. As a result, this is a reasonable compromise, there's no need to have any core changes and it solves the main use case we have for it. Signed-off-by: Mordechay Goodstein <mordechay.goodstein@intel.com> Link: https://patch.msgid.link/20240702192118.c4093bc5b15e.I2ca8d006b67feeb866ac2017af7b741c9e06445a@changeid Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/linux/um_timetravel.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/uapi/linux/um_timetravel.h b/include/uapi/linux/um_timetravel.h
index ca3238222b6d..078ea401aa2a 100644
--- a/include/uapi/linux/um_timetravel.h
+++ b/include/uapi/linux/um_timetravel.h
@@ -123,6 +123,17 @@ enum um_timetravel_ops {
* the simulation.
*/
UM_TIMETRAVEL_GET_TOD = 8,
+
+ /**
+ * @UM_TIMETRAVEL_BROADCAST: Send/Receive a broadcast message.
+ * This message can be used to sync all components in the system
+ * with a single message, if the calender gets the message, the
+ * calender broadcast the message to all components, and if a
+ * component receives it it should act based on it e.g print a
+ * message to it's log system.
+ * (calendar <-> host)
+ */
+ UM_TIMETRAVEL_BROADCAST = 9,
};
#endif /* _UAPI_LINUX_UM_TIMETRAVEL_H */