From 4e56797c7eb445ef05a014feff54a5c86c436754 Mon Sep 17 00:00:00 2001 From: Arthur Hanson Rasmusson Date: Tue, 17 Nov 2026 09:21:07 -0500 Subject: vgsp: fix compute channel MME golden body wedge + EGL surfaceless fallback - gsp_phys_booter: gate the MME prelude/golden pack and CALL resolution to the 0xbeef channel family. The compute channel (0xbfef0002) executed the synthetic mac=0xf1/pc=513 golden body, poisoned the MME (badf1201) and wedged the GR front-end so the guest's QMD never retired (D-state hang). - gz_es: a displayless vGPU creates the pbuffer but eglMakeCurrent fails EGL_BAD_ALLOC (0x3003); fall back to the surfaceless context (c1021 path). --- kernel/gsp_phys_booter.c | 18 ++++++++++++++++-- tools/guest-diag/gz_es.c | 17 +++++++++++++++-- 2 files changed, 31 insertions(+), 4 deletions(-) diff --git a/kernel/gsp_phys_booter.c b/kernel/gsp_phys_booter.c index 589bb60..6723070 100644 --- a/kernel/gsp_phys_booter.c +++ b/kernel/gsp_phys_booter.c @@ -23665,7 +23665,20 @@ if (gsp_phys_gr_slot_kept(j, sa_mask, } } - if (READ_ONCE(gsp_phys_rmcall_gr_mme_prelude)) { + /* + * The MME prelude/golden pack is the 3D beef client's macro + * program. Other lanes (compute 0xbfef.., X 0x1000013.., + * module 0xbeef0100 setup) never carry an MME-IR upload and + * must not have the golden body installed on their launch: + * c1030's CUDA compute channel 0xbfef0002 executed the + * synthetic mac=0xf1/pc=513 body, poisoned the MME + * (badf1201) and wedged the GR front-end, so the kernel's + * QMD never retired and the guest hung in D state. Gate the + * whole prelude/overlay/CALL-resolution machinery to the + * beef family. + */ + if (READ_ONCE(gsp_phys_rmcall_gr_mme_prelude) && + (req->h_object & 0xfffff000u) == 0xbeef0000u) { pl = gsp_sema_mme_prelude_get(&pl_n, &pl_gen); /* * eng89k: the beef client's MME upload is absent on @@ -26166,7 +26179,8 @@ if (gsp_phys_gr_slot_kept(j, sa_mask, * emitted the prelude words. Otherwise elide the one-word * op=4 run and log MME-CALL-UNMAPPED; the ladder continues. */ - if ((u32)(p - pb) > win_emit_off) { + if ((u32)(p - pb) > win_emit_off && + (req->h_object & 0xfffff000u) == 0xbeef0000u) { static u32 mme_exec_log; static u32 mme_unmap_log; u32 ew = win_emit_off, en = (u32)(p - pb); diff --git a/tools/guest-diag/gz_es.c b/tools/guest-diag/gz_es.c index 5a56fee..9c8decd 100644 --- a/tools/guest-diag/gz_es.c +++ b/tools/guest-diag/gz_es.c @@ -245,8 +245,21 @@ static int create_context(void) return -1; } } else if (!eglMakeCurrent(dpy, surf, surf, ctx)) { - gzlog("[gzes] current(surf) 0x%x\n", eglGetError()); - return -1; + /* + * c1030 regression: a displayless vGPU can create the + * pbuffer surface but cannot bind it (EGL_BAD_ALLOC + * 0x3003). c1021 ran surfaceless; fall back to that + * path instead of failing the whole EGL bring-up. + */ + gzlog("[gzes] current(surf) 0x%x -> surfaceless fallback\n", + eglGetError()); + eglDestroySurface(dpy, surf); + surf = EGL_NO_SURFACE; + if (!eglMakeCurrent(dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, + ctx)) { + gzlog("[gzes] current 0x%x\n", eglGetError()); + return -1; + } } shm_open_frame(); gzlog("[gzes] OK api=%s renderer=%s version=%s surf=%d desktop=%d\n", -- cgit v1.2.3