diff options
Diffstat (limited to 'kernel/main.c')
| -rw-r--r-- | kernel/main.c | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/kernel/main.c b/kernel/main.c index f47ef69..3784a70 100644 --- a/kernel/main.c +++ b/kernel/main.c @@ -1452,9 +1452,23 @@ static int __init nv_vgpu_init(void) if (gsp_phys_gpu_param && !gsp_phys_mdev_owned_enabled()) { ret = gsp_phys_gpu_claim(); - if (ret) + if (ret) { pr_warn("gsp-resman-vfio: physical GPU claim failed: %d\n", ret); + } else { + /* + * G0.4 (P2 prep): expose the load-time module-owned + * claim as a READY backend session. The join path only + * marks the state and schedules the static-config + * snapshot probe (a work item); failure is non-fatal, + * module load keeps the emulation path. The claim + * itself is still released at rmmod. + */ + ret = gsp_phys_backend_start(); + if (ret) + pr_warn("gsp-resman-vfio: physical backend start failed: %d\n", + ret); + } } else if (gsp_phys_gpu_param) { pr_info("gsp-resman-vfio: gsp_phys_mdev_owned=1: physical GPU claim+boot deferred to the first mdev create\n"); } else if (gsp_phys_mdev_owned_enabled()) { @@ -1518,10 +1532,12 @@ static void __exit nv_vgpu_exit(void) gsp_phys_backend_begin_stop(); } else { /* - * Module-owned claim (gsp_phys_gpu=1, mdev_owned=0): keep - * today's position relative to the debugfs teardown and the - * emulation threads; module-owned sessions never forward live. + * Module-owned claim (gsp_phys_gpu=1, mdev_owned=0): flush the + * static-config probe work item (begin_stop's only effect for a + * module-owned session), then keep today's release position + * relative to the debugfs teardown and the emulation threads. */ + gsp_phys_backend_begin_stop(); gsp_phys_gpu_release(); } |
