From 8ed0c6edd03709d13f088a36e0902330b2e032c8 Mon Sep 17 00:00:00 2001 From: Arthur Hanson Rasmusson Date: Thu, 1 Oct 2026 10:40:54 -0400 Subject: gsp-phys: harden the RM transport and add the static-info probe Applies the adversarial review fixes for the command-queue TX and unload RPC: the unload RPC is gated on GSP-RM init-done, debugfs fops pin the module, REG_POLL timeouts use microseconds, the host status readPtr is published, TX free space is checked, swap flags and barriers are corrected, and the legacy payload fallback is opt-in. Generalizes the transport to multi-element records and a reply-matching status-queue reader, and adds a debugfs probe that round-trips GET_GSP_STATIC_INFO (with a SET_GUEST_SYSTEM_INFO fallback), decodes the server configuration, and a read-only state snapshot file. All gated by gsp_phys_boot; the normal load path is unchanged. --- kernel/main.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'kernel/main.c') diff --git a/kernel/main.c b/kernel/main.c index 30156ab..babcc22 100644 --- a/kernel/main.c +++ b/kernel/main.c @@ -1454,11 +1454,12 @@ static int __init nv_vgpu_init(void) ret); } - /* Test-enabling trigger for the GSP-RM unload RPC; inert unless a - * stage-3d boot ran on a live claim (gsp_phys_boot=1). Removed on - * module exit. Creation failure is non-fatal. */ + /* Test-enabling trigger for the GSP-RM unload RPC plus the read-only + * state snapshot; inert unless a stage-3d boot ran on a live claim + * (gsp_phys_boot=1). Removed on module exit. Creation failure is + * non-fatal. */ if (gsp_phys_boot_debugfs_init()) - pr_warn("gsp-resman-vfio: gsp-phys-unload-rpc debugfs trigger unavailable\n"); + pr_warn("gsp-resman-vfio: gsp-phys debugfs files unavailable\n"); pr_info("NVIDIA vGPU VFIO driver loaded (version %s)\n", NVIDIA_VGPU_VFIO_VERSION); /* Start the emulated-GPU progress service: it discovers the guest's -- cgit v1.2.3