summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--kernel/gsp_phys_booter.c17
-rw-r--r--kernel/gsp_phys_booter.h1
-rw-r--r--kernel/gsp_sema_service.c32
3 files changed, 47 insertions, 3 deletions
diff --git a/kernel/gsp_phys_booter.c b/kernel/gsp_phys_booter.c
index 10d40c6..0072fe1 100644
--- a/kernel/gsp_phys_booter.c
+++ b/kernel/gsp_phys_booter.c
@@ -18869,6 +18869,23 @@ bool gsp_phys_gr_mme_carry_peek(u32 *h_object)
}
/*
+ * Is the carrier's channel context still alive for a self-candidate launch?
+ *
+ * CONT 546: the armed carrier normally waits for a matching CLIENT beef
+ * candidate in the pump pass; when the guest's 2-frame mission ends before
+ * one re-appears (c880: ARM gen=3, no FIRE/CANCEL/WAIT), the carrier
+ * expired silently. The pump may instead submit the carrier as its own
+ * synthetic candidate when the channel's golden pack is still contiguously
+ * loaded there. This probe is that gate: the pack load handle must still be
+ * the carrier's channel (a gone context is then reported, never silent).
+ */
+bool gsp_phys_gr_mme_carry_ctx_alive(u32 h_object)
+{
+ return READ_ONCE(gsp_phys_gr_mme_pack_load_h) == h_object &&
+ gsp_phys_gr_golden_ready();
+}
+
+/*
* Claim the armed carrier for one launch. The live state is re-validated
* here, not at arm time: the pack must still be partial for this channel,
* still loaded contiguously from word 0 on it, and the golden overlay must
diff --git a/kernel/gsp_phys_booter.h b/kernel/gsp_phys_booter.h
index 964ed3e..5a94f93 100644
--- a/kernel/gsp_phys_booter.h
+++ b/kernel/gsp_phys_booter.h
@@ -580,6 +580,7 @@ bool gsp_phys_gr_mme_fe_defer_wanted(u32 h_object, u32 win3d_n);
* is armed.
*/
bool gsp_phys_gr_mme_carry_peek(u32 *h_object);
+bool gsp_phys_gr_mme_carry_ctx_alive(u32 h_object);
bool gsp_phys_gr_mme_carry_take(u32 h_object, u32 *gen, u32 *off,
u32 *maxa);
void gsp_phys_gr_mme_carry_cancel(const char *reason);
diff --git a/kernel/gsp_sema_service.c b/kernel/gsp_sema_service.c
index 4cd2eca..f094d2b 100644
--- a/kernel/gsp_sema_service.c
+++ b/kernel/gsp_sema_service.c
@@ -50350,10 +50350,36 @@ static void svc_pump_channels(struct nv_vgpu_device *vgpu)
* An armed carrier that is due but cannot go out names
* its blocker (c781: it sat armed until the beef
* channel unregistered, with no receipt at all).
+ *
+ * CONT 546: when there is no client candidate but the
+ * channel's golden pack is still loaded, submit the
+ * carrier as its own synthetic candidate instead of
+ * letting it expire silently (c880: ARM gen=3, no
+ * FIRE/CANCEL/WAIT because the 2-frame mission ended
+ * before a client launch re-appeared). A truly gone
+ * context is reported as ctx-gone, never silent.
*/
- if (why)
- pr_info_ratelimited("vgsp-gr: MME-CARRY-WAIT reason=%s h=0x%x\n",
- why, carry_h);
+ if (why) {
+ if (!strcmp(why, "no-channel") &&
+ gsp_phys_gr_mme_carry_ctx_alive(carry_h)) {
+ static struct svc_channel synth;
+
+ memset(&synth, 0, sizeof(synth));
+ synth.h_object = carry_h;
+ if (svc_gr_carrier_request(vgpu, &synth,
+ false))
+ pr_info("vgsp-gr: MME-CARRY-FIRE reason=self-candidate h=0x%x\n",
+ carry_h);
+ else
+ pr_info_ratelimited("vgsp-gr: MME-CARRY-WAIT reason=self-busy h=0x%x\n",
+ carry_h);
+ } else if (!strcmp(why, "no-channel")) {
+ gsp_phys_gr_mme_carry_cancel("ctx-gone");
+ } else {
+ pr_info_ratelimited("vgsp-gr: MME-CARRY-WAIT reason=%s h=0x%x\n",
+ why, carry_h);
+ }
+ }
}
}