summaryrefslogtreecommitdiffstats
path: root/kernel/main.c
diff options
context:
space:
mode:
authorArthur Hanson Rasmusson <arthur@vgpu.io>2026-09-26 02:46:41 -0400
committerArthur Hanson Rasmusson <arthur@vgpu.io>2026-09-26 02:46:41 -0400
commit3c3d0637a57a92d6ae4f1b934ba3282b2366160f (patch)
tree0b0714c1bbdedb6f0a885042a39da10b7aede609 /kernel/main.c
parent7e227179b0c7d776919004e18e21f82909e8a40c (diff)
downloadopen-iov-3c3d0637a57a92d6ae4f1b934ba3282b2366160f.tar.gz
open-iov-3c3d0637a57a92d6ae4f1b934ba3282b2366160f.zip
kernel: add a channel-table dump param; tools: fix memprobe --max parsing
Diffstat (limited to 'kernel/main.c')
-rw-r--r--kernel/main.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/kernel/main.c b/kernel/main.c
index 63657f3..f23be27 100644
--- a/kernel/main.c
+++ b/kernel/main.c
@@ -2248,6 +2248,23 @@ module_param_cb(sema_probe, &nv_vgpu_sema_probe_ops, NULL, 0200);
MODULE_PARM_DESC(sema_probe, "Dump sema-service map + slot values for a GPU VA");
/*
+ * Debug: dump the semaphore service's channel table (GPFIFO/USERD state and
+ * the two NvNotification slots each channel exposes):
+ * echo 1 > .../parameters/chan_dump
+ */
+static int nv_vgpu_chan_dump_set(const char *val, const struct kernel_param *kp)
+{
+ return gsp_sema_service_dump_channels();
+}
+
+static const struct kernel_param_ops nv_vgpu_chan_dump_ops = {
+ .set = nv_vgpu_chan_dump_set,
+};
+
+module_param_cb(chan_dump, &nv_vgpu_chan_dump_ops, NULL, 0200);
+MODULE_PARM_DESC(chan_dump, "Dump the sema service channel table (any value)");
+
+/*
* Debug: inject a verified {GPU VA -> guest PA} translation into the
* semaphore service (used when the client's mapping cannot be discovered
* from guest structures):