summaryrefslogtreecommitdiffstats
path: root/kernel/gsp_sema_service.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/gsp_sema_service.c')
-rw-r--r--kernel/gsp_sema_service.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/kernel/gsp_sema_service.c b/kernel/gsp_sema_service.c
index 59e7262..45ce693 100644
--- a/kernel/gsp_sema_service.c
+++ b/kernel/gsp_sema_service.c
@@ -4030,6 +4030,7 @@ static u32 svc_wait_pass_log; /* per-session resolved-row budget */
static u32 svc_remapconst_log; /* r343 FILL: SET_REMAP_CONST_A rows */
static u32 svc_fill_raw_log; /* r365 FILL-RAW: raw dropped-fill dumps */
static u32 svc_lowfill_log; /* r365b LOWFILL-WIT: below-floor fills */
+static u32 svc_tabcopy_log; /* r367 TABLE-COPY: table-page copies */
static u32 svc_fill_noremap; /* r343 FILL: fail-closed holds */
static u64 svc_wait_rel_va; /* this entry's own release (mirror) */
static u32 svc_wait_rel_payload;
@@ -5994,6 +5995,21 @@ static int svc_copy(struct nv_vgpu_device *vgpu, u64 dst, u64 src, size_t total,
SVC_COPY_TRUNC_RET(-EIO);
}
+ /*
+ * r367 TABLE-COPY witness: a page-table page/entry copy is
+ * the guest's authoritative table content; dump the carried
+ * bytes so a table that later walks as ZERO can be traced to
+ * the copy that built it (or proven the source was already
+ * zero). Bounded; table-shaped sizes only.
+ */
+ if (!o && (total == 4096 || total == 16) &&
+ svc_tabcopy_log < 64) {
+ svc_tabcopy_log++;
+ pr_info("sema-tabcopy: dst_orig=0x%llx src_orig=0x%llx total=%zu dphys=%u dvirt=%d svirt=%d r_dst=0x%llx r_src=0x%llx first16=%16phN\n",
+ dst_orig, src_orig, total, dst_phys, dst_virt,
+ src_virt, dst, src, bounce);
+ }
+
if (dst_shadow) {
if (svc_vas_write(dst_orig + o, bounce, chunk))
SVC_COPY_TRUNC_RET(-ENOMEM);
@@ -10102,6 +10118,7 @@ static void svc_session_flush(void)
svc_remapconst_log = 0;
svc_fill_raw_log = 0;
svc_lowfill_log = 0;
+ svc_tabcopy_log = 0;
svc_fill_noremap = 0;
svc_wait_n = 0;
svc_wait_rel_have = false;