summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/gsp_sema_service.c5
-rw-r--r--kernel/gsp_sema_service.h6
-rw-r--r--kernel/main.c8
-rwxr-xr-xtools/guest-diag/run_cycle.sh5
4 files changed, 21 insertions, 3 deletions
diff --git a/kernel/gsp_sema_service.c b/kernel/gsp_sema_service.c
index 5f69f40..6703403 100644
--- a/kernel/gsp_sema_service.c
+++ b/kernel/gsp_sema_service.c
@@ -2079,7 +2079,7 @@ static void svc_run_ops(struct nv_vgpu_device *vgpu, struct svc_memset_op *ops,
svc.memsets_nomap++;
else
svc.memsets_fail++;
- if ((rc == 0 && svc.memsets_done <= 8) ||
+ if ((rc == 0 && svc.memsets_done <= gsp_sema_ops_log) ||
(rc != 0 && svc.memsets_fail + svc.memsets_nomap <= 8))
pr_info("sema-svc: %s dst=0x%llx value=0x%llx elem=%u count=%u bytes=%llu phys=%u ap=%u src=0x%llx srcphys=%u srcap=%u rc=%d\n",
m->type == 1 ? "memcopy" : "memset",
@@ -3682,6 +3682,9 @@ bool gsp_sema_fake_rel;
*/
bool gsp_sema_skip_ops;
+/* Executed-op log cap (see header). */
+unsigned gsp_sema_ops_log = 8;
+
static unsigned long svc_gr_ring_tried; /* ranks that got a diagnostic line */
static void svc_gr_ring_autopin(struct nv_vgpu_device *vgpu,
diff --git a/kernel/gsp_sema_service.h b/kernel/gsp_sema_service.h
index 615d092..7af498e 100644
--- a/kernel/gsp_sema_service.h
+++ b/kernel/gsp_sema_service.h
@@ -84,6 +84,12 @@ extern bool gsp_sema_fake_rel;
extern bool gsp_sema_skip_ops;
/*
+ * How many executed CE ops to log with full operands (diagnostic bound; the
+ * default keeps a healthy run quiet, raise it to audit a data path).
+ */
+extern unsigned gsp_sema_ops_log;
+
+/*
* Grace window (ms) an untranslatable GR GPFIFO entry is left pending before
* the pump consumes it as stale. The GR push pages are pinned from guest
* truth a moment after the channels appear; the window lets those pins land
diff --git a/kernel/main.c b/kernel/main.c
index f427828..454f3b9 100644
--- a/kernel/main.c
+++ b/kernel/main.c
@@ -2450,6 +2450,14 @@ module_param_named(sema_skip_ops, gsp_sema_skip_ops, bool, 0644);
MODULE_PARM_DESC(sema_skip_ops, "Apply releases without executing pushed memsets (default 0)");
/*
+ * Executed-op log cap: how many CE fills/copies are logged with full
+ * operands. Raise it (e.g. 4096) to audit a data path; the default keeps a
+ * run quiet.
+ */
+module_param_named(sema_ops_log, gsp_sema_ops_log, uint, 0644);
+MODULE_PARM_DESC(sema_ops_log, "Max executed CE ops logged with operands (default 8)");
+
+/*
* Grace window (ms) an untranslatable GR entry stays pending before the pump
* consumes it as stale, so a late push-buffer pin can still make it readable.
*/
diff --git a/tools/guest-diag/run_cycle.sh b/tools/guest-diag/run_cycle.sh
index aaf7e17..26fdb92 100755
--- a/tools/guest-diag/run_cycle.sh
+++ b/tools/guest-diag/run_cycle.sh
@@ -28,9 +28,10 @@ for i in $(seq 1 24); do
sleep 5
done
-echo "[*] setting module params (SKIP_OPS=${SKIP_OPS:-Y})"
+echo "[*] setting module params (SKIP_OPS=${SKIP_OPS:-Y}, OPS_LOG=${OPS_LOG:-8})"
SKIP_OPS="${SKIP_OPS:-Y}"
-sudo sh -c "echo Y > /sys/module/open_iov_vfio/parameters/sema_fake_rel; echo $SKIP_OPS > /sys/module/open_iov_vfio/parameters/sema_skip_ops"
+OPS_LOG="${OPS_LOG:-8}"
+sudo sh -c "echo Y > /sys/module/open_iov_vfio/parameters/sema_fake_rel; echo $SKIP_OPS > /sys/module/open_iov_vfio/parameters/sema_skip_ops; echo $OPS_LOG > /sys/module/open_iov_vfio/parameters/sema_ops_log"
echo "[*] pushing guest tools"
timeout 300 "$HERE/push_guest_tools.sh" >/dev/null 2>&1 || { echo "push failed"; exit 1; }