diff options
| author | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-10-05 22:15:04 -0400 |
|---|---|---|
| committer | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-10-05 22:15:04 -0400 |
| commit | 2e443a7daa9c759f3a4d2bd36bc9ca9f0d84293c (patch) | |
| tree | 9242a6bdb505a9953ed8062d7231cb34770171a7 /kernel/gsp_phys_booter.c | |
| parent | 66e6d16680d77a58fa235d837ba897879e8ae1f9 (diff) | |
| download | open-iov-2e443a7daa9c759f3a4d2bd36bc9ca9f0d84293c.tar.gz open-iov-2e443a7daa9c759f3a4d2bd36bc9ca9f0d84293c.zip | |
vgsp: raise GR launch release poll to 5 s with progress telemetry
Diffstat (limited to 'kernel/gsp_phys_booter.c')
| -rw-r--r-- | kernel/gsp_phys_booter.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/kernel/gsp_phys_booter.c b/kernel/gsp_phys_booter.c index 7113663..26f297d 100644 --- a/kernel/gsp_phys_booter.c +++ b/kernel/gsp_phys_booter.c @@ -997,6 +997,13 @@ enum gsp_phys_rmcall_buf { #define GSP_PHYS_RMCALL_SEM_PAYLOAD 0xc0ffee01u #define GSP_PHYS_RMCALL_TIMEOUT_MS 2000u #define GSP_PHYS_RMCALL_POLL_MS 5u +/* + * GR launch release poll window. A CE copy completes in single-digit ms, but + * a GR launch can force the engine's first context switch for the channel; + * the FECS ctxsw path is measured in fractions of a second, so the window is + * generous and progress is logged every ~500 ms. + */ +#define GSP_PHYS_RMCALL_GR_POLL_MS 5000u /* P6a guest-memory CE copies: same bounded poll cap as the P5 shadow path. */ #define GSP_PHYS_RMCALL_GUEST_POLL_MS 200u @@ -13026,7 +13033,7 @@ int gsp_phys_backend_guest_gr_submit(const struct gsp_phys_gr_submit *req, u64 ch_sem_va = GSP_PHYS_RMCALL_VA_SEM + 4; u64 qmd_dst = GSP_PHYS_RMCALL_VA_SRC; u32 qmd_rel_off = 0, ch_rel_off = 0; - u32 poll = 0, w0 = 0, w1 = 0; + u32 poll = 0, w0 = 0, w1 = 0, grpoll_n = 0; int ret = 0; if (out) @@ -13433,9 +13440,9 @@ gr_page_unmapped: pr_info("vgsp-gr: GR LAUNCH submitted h=0x%x push=0x%llx len=%u pages=%u shadow=%u qmd_va=0x%llx slot=%u words=%u token=0x%x; polling qmd_rel=%u ch_rel=0x%08x (<=%u ms)\n", req->h_object, req->push_va, req->push_len, req->n_pages, n_shadow, req->qmd_va, sub.slot, words, boot_stage.rmcall_token, - qmd_rel, want_ch, GSP_PHYS_RMCALL_GUEST_POLL_MS); + qmd_rel, want_ch, GSP_PHYS_RMCALL_GR_POLL_MS); - deadline = jiffies + msecs_to_jiffies(GSP_PHYS_RMCALL_GUEST_POLL_MS); + deadline = jiffies + msecs_to_jiffies(GSP_PHYS_RMCALL_GR_POLL_MS); for (;;) { if (qmd_rel) { if (qmd_rel_hpa) @@ -13451,10 +13458,13 @@ gr_page_unmapped: w1 = READ_ONCE(*(u32 *)(sem_va + 4)); if ((!qmd_rel || w0 == want_qmd) && w1 == want_ch) break; + if ((++grpoll_n % 100) == 0) + pr_info("vgsp-gr: poll +%ums qmd_rel=0x%08x ch_rel=0x%08x\n", + grpoll_n * GSP_PHYS_RMCALL_POLL_MS, w0, w1); if (time_after_eq(jiffies, deadline)) { gsp_phys_gr_timed_out++; pr_err("vgsp-gr: GR LAUNCH FAILED: timeout after %u ms (qmd_rel=0x%08x want=0x%08x ch_rel=0x%08x want=0x%08x) h=0x%x push=0x%llx\n", - GSP_PHYS_RMCALL_GUEST_POLL_MS, w0, want_qmd, w1, + GSP_PHYS_RMCALL_GR_POLL_MS, w0, want_qmd, w1, want_ch, req->h_object, req->push_va); if (gsp_phys_gr_fault_active()) { struct gsp_phys_fault_info fi; |
