diff options
| author | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-10-02 15:13:06 -0400 |
|---|---|---|
| committer | Arthur Hanson Rasmusson <arthur@vgpu.io> | 2026-10-02 15:13:06 -0400 |
| commit | 4bb8550a72597ec098c6d62a75006a0aba61972e (patch) | |
| tree | bd0ec74c26ff056251052a5e1ba0b59d14fb1f6a /kernel/gsp_rm_emulation.c | |
| parent | 8b491c4e7ebde76c17faddaad47f92898d6c97de (diff) | |
| download | open-iov-4bb8550a72597ec098c6d62a75006a0aba61972e.tar.gz open-iov-4bb8550a72597ec098c6d62a75006a0aba61972e.zip | |
kernel: GR context-promote bisection modes 4-17 and server-managed-ctxbuf registry variant; complete vgsp rename; docs/tooling refresh
- gsp_phys_booter: GR promote bisection modes 4-17 (two-phase zero-field VA,
batched entries, hVirtMemory, bare VA, KMD SKIP_CTXBUFFER_ALLOC channel,
old-interface GPU_INITIALIZE_CTX, FBMEM context buffer, UVM-faithful PA-only,
PATCH/PM auxiliary promotes, server-managed no-promote path); PATCH/PM
geometry queries and buffers; pre-boot SET_REGISTRY profile selection
- gsp_phys_gpu: gsp_phys_rmcall_gr_promote clamp 0..17 and gsp_phys_srv_ctxbuf
parameter; registry image variant with RMSetClientRMAllocatedCtxBuffer=0
- vgsp rename across kernel, scripts, tools and docs (module vgsp.ko,
/sys/kernel/debug/vgsp/, vgsp-<subsystem>: log prefixes)
- risc-v-gsp-rm-debugger user-facing rename and docs/CI refresh; guest-diag
tool updates; README/SBOM/install/Makefile sync
Live status: CE ladder and P6 guest-copy forwarding green; GR engine context
commit still open (all promote shapes accepted or cleanly refused; the channel
stays CTXNOTVALID) - see Handoff-vGPU-IO.md Addendum 21 (local).
Diffstat (limited to 'kernel/gsp_rm_emulation.c')
| -rw-r--r-- | kernel/gsp_rm_emulation.c | 218 |
1 files changed, 109 insertions, 109 deletions
diff --git a/kernel/gsp_rm_emulation.c b/kernel/gsp_rm_emulation.c index b0ad98f..ad0b4f5 100644 --- a/kernel/gsp_rm_emulation.c +++ b/kernel/gsp_rm_emulation.c @@ -90,13 +90,13 @@ int gsp_rm_scan_guest_ram(struct nv_vgpu_device *vgpu, u64 needle, memcpy(&v32, buf + off, 4); if (v == needle) { - pr_info("gsp-resman-vfio: scan: u64 0x%llx at gpa 0x%llx (page off 0x%x)\n", + pr_info("vgsp-rm: scan: u64 0x%llx at gpa 0x%llx (page off 0x%x)\n", needle, gpa + off, off); if (++hits >= max_hits) break; } if (v32 == (u32)needle && needle <= 0xffffffffULL) { - pr_info("gsp-resman-vfio: scan: u32 0x%x at gpa 0x%llx (page off 0x%x)\n", + pr_info("vgsp-rm: scan: u32 0x%x at gpa 0x%llx (page off 0x%x)\n", (u32)needle, gpa + off, off); if (++hits >= max_hits) break; @@ -105,7 +105,7 @@ int gsp_rm_scan_guest_ram(struct nv_vgpu_device *vgpu, u64 needle, } kfree(buf); - pr_info("gsp-resman-vfio: scan: needle=0x%llx range=0x%llx..0x%llx hits=%u\n", + pr_info("vgsp-rm: scan: needle=0x%llx range=0x%llx..0x%llx hits=%u\n", needle, start, end, hits); return hits; } @@ -141,13 +141,13 @@ int gsp_rm_scan_guest_ram_masked(struct nv_vgpu_device *vgpu, u64 value, memcpy(&v64, buf + off, 8); memcpy(&v32, buf + off, 4); if ((v64 & mask) == value) { - pr_info("nvidia-vgpu-vfio: masked scan: u64 0x%llx at gpa 0x%llx (off 0x%x)\n", + pr_info("vgsp-rm: masked scan: u64 0x%llx at gpa 0x%llx (off 0x%x)\n", v64, gpa + off, off); if (++hits >= max_hits) break; } if ((v32 & (u32)mask) == (u32)value) { - pr_info("nvidia-vgpu-vfio: masked scan: u32 0x%x at gpa 0x%llx (off 0x%x)\n", + pr_info("vgsp-rm: masked scan: u32 0x%x at gpa 0x%llx (off 0x%x)\n", v32, gpa + off, off); if (++hits >= max_hits) break; @@ -156,7 +156,7 @@ int gsp_rm_scan_guest_ram_masked(struct nv_vgpu_device *vgpu, u64 value, } kfree(buf); - pr_info("nvidia-vgpu-vfio: masked scan: value=0x%llx mask=0x%llx hits=%u\n", + pr_info("vgsp-rm: masked scan: value=0x%llx mask=0x%llx hits=%u\n", value, mask, hits); return hits; } @@ -194,13 +194,13 @@ int gsp_rm_scan_guest_ram_pt(struct nv_vgpu_device *vgpu, u64 pa, memcpy(&v64, buf + off, 8); memcpy(&v32, buf + off, 4); if ((v64 & 0xfffffffffffff000ULL) == pa_page) { - pr_info("gsp-resman-vfio: pt scan: u64 pte 0x%llx at gpa 0x%llx (off 0x%x)\n", + pr_info("vgsp-rm: pt scan: u64 pte 0x%llx at gpa 0x%llx (off 0x%x)\n", v64, gpa + off, off); if (++hits >= max_hits) break; } if ((v32 & 0xfffff000U) == (u32)pa_page) { - pr_info("gsp-resman-vfio: pt scan: u32 pte 0x%x at gpa 0x%llx (off 0x%x)\n", + pr_info("vgsp-rm: pt scan: u32 pte 0x%x at gpa 0x%llx (off 0x%x)\n", v32, gpa + off, off); if (++hits >= max_hits) break; @@ -209,7 +209,7 @@ int gsp_rm_scan_guest_ram_pt(struct nv_vgpu_device *vgpu, u64 pa, } kfree(buf); - pr_info("gsp-resman-vfio: pt scan: pa=0x%llx hits=%u\n", pa, hits); + pr_info("vgsp-rm: pt scan: pa=0x%llx hits=%u\n", pa, hits); return hits; } @@ -252,7 +252,7 @@ int gsp_rm_scan_guest_ram_seq(struct nv_vgpu_device *vgpu, const u32 *pat, } } if (ok) { - pr_info("gsp-resman-vfio: seq scan: hit in guest RAM at gpa 0x%llx (page off 0x%x)\n", + pr_info("vgsp-rm: seq scan: hit in guest RAM at gpa 0x%llx (page off 0x%x)\n", gpa + off, off); if (++hits >= max_hits) break; @@ -261,7 +261,7 @@ int gsp_rm_scan_guest_ram_seq(struct nv_vgpu_device *vgpu, const u32 *pat, } kfree(buf); - pr_info("gsp-resman-vfio: seq scan: range=0x%llx..0x%llx hits=%u\n", + pr_info("vgsp-rm: seq scan: range=0x%llx..0x%llx hits=%u\n", start, end, hits); return hits; }static u64 gsp_rm_off_to_gpa(struct gsp_rm_emu *rm, u64 off) @@ -400,7 +400,7 @@ static u32 gsp_rm_build_record(struct gsp_rm_emu *rm, u8 *buf, u32 buf_size, elem_count = 1; if (elem_count * GSPRM_QUEUE_ELEMENT_SIZE > buf_size) { - pr_err("GSPRM: build_record overflow: need %u have %u\n", + pr_err("vgsp-rm: build_record overflow: need %u have %u\n", elem_count * GSPRM_QUEUE_ELEMENT_SIZE, buf_size); return 0; } @@ -494,7 +494,7 @@ static int gsp_rm_send(struct gsp_emu_context *ctx, u32 function, if (rm->events_dropped <= 8 || (rm->events_dropped % 1000) == 0) nv_vgpu_info(ctx->vgpu, - "GSPRM: event burst capped (%u), dropped total=%llu", + "vgsp-rm: event burst capped (%u), dropped total=%llu", GSPRM_EVENT_BURST_MAX, rm->events_dropped); mutex_unlock(&rm->stat_lock); @@ -517,7 +517,7 @@ static int gsp_rm_send(struct gsp_emu_context *ctx, u32 function, /* Check we don't overflow the status queue */ if (elem_count > rm->stat_msgcount) { - nv_vgpu_err(ctx->vgpu, "GSPRM: record too large: %u elements > queue %u", + nv_vgpu_err(ctx->vgpu, "vgsp-rm: record too large: %u elements > queue %u", elem_count, rm->stat_msgcount); kfree(buf); mutex_unlock(&rm->stat_lock); @@ -539,7 +539,7 @@ static int gsp_rm_send(struct gsp_emu_context *ctx, u32 function, ret = gsp_rm_write_buf(ctx, rec_off, buf, first_chunk * GSPRM_QUEUE_ELEMENT_SIZE); if (ret) { - nv_vgpu_err(ctx->vgpu, "GSPRM: status write failed off=0x%llx ret=%d", + nv_vgpu_err(ctx->vgpu, "vgsp-rm: status write failed off=0x%llx ret=%d", rec_off, ret); kfree(buf); mutex_unlock(&rm->stat_lock); @@ -551,7 +551,7 @@ static int gsp_rm_send(struct gsp_emu_context *ctx, u32 function, buf + first_chunk * GSPRM_QUEUE_ELEMENT_SIZE, second_chunk * GSPRM_QUEUE_ELEMENT_SIZE); if (ret) { - nv_vgpu_err(ctx->vgpu, "GSPRM: status wrap write failed ret=%d", + nv_vgpu_err(ctx->vgpu, "vgsp-rm: status wrap write failed ret=%d", ret); kfree(buf); mutex_unlock(&rm->stat_lock); @@ -574,7 +574,7 @@ static int gsp_rm_send(struct gsp_emu_context *ctx, u32 function, ret = gsp_rm_write_buf(ctx, rm->stat_off + 0x10, &new_wp, sizeof(new_wp)); if (ret) { - nv_vgpu_err(ctx->vgpu, "GSPRM: status writePtr update failed ret=%d", ret); + nv_vgpu_err(ctx->vgpu, "vgsp-rm: status writePtr update failed ret=%d", ret); mutex_unlock(&rm->stat_lock); return ret; } @@ -656,7 +656,7 @@ int gsp_rm_post_channel_event(struct nv_vgpu_device *vgpu, u32 h_src) if (gsp_sema_dbg && (rm->events_posted <= 32 || (rm->events_posted % 5000) == 0)) nv_vgpu_info(vgpu, - "GSPRM: post_event hSrc=0x%x posted=%d total=%llu", + "vgsp-rm: post_event hSrc=0x%x posted=%d total=%llu", h_src, posted, rm->events_posted); } return posted ? 0 : -ENOENT; @@ -775,7 +775,7 @@ int gsp_rm_dump_state(struct nv_vgpu_device *vgpu) gsp_rm_read_buf(ctx, rm->stat_off + stat_rxoff, &our_cmd_read, 4); nv_vgpu_info(vgpu, - "GSPRM: rmstate cmd{gpa=0x%llx->0x%llx off=0x%llx size=0x%x mc=%u ptes=%u read=%d our_read=%u hdr{wr=%u fl=0x%x rxoff=0x%x entryoff=0x%x}} " + "vgsp-rm: rmstate cmd{gpa=0x%llx->0x%llx off=0x%llx size=0x%x mc=%u ptes=%u read=%d our_read=%u hdr{wr=%u fl=0x%x rxoff=0x%x entryoff=0x%x}} " "stat{gpa=0x%llx->0x%llx off=0x%llx size=0x%x mc=%u read=%d our_write=%u seq=%u hdr{wr=%u fl=0x%x rxoff=0x%x ours_written=%u} guest_read=%u gr_ret=%d}", rm->cmd_gpa, cmd_gpa_now, rm->cmd_off, rm->cmd_size, rm->cmd_msgcount, rm->mq.pageTableEntryCount, cmd_ret, @@ -786,14 +786,14 @@ int gsp_rm_dump_state(struct nv_vgpu_device *vgpu) guest_read, gr_ret); - nv_vgpu_info(vgpu, "GSPRM: rmstate events_n=%u posted=%llu", + nv_vgpu_info(vgpu, "vgsp-rm: rmstate events_n=%u posted=%llu", rm->events_n, rm->events_posted); for (i = 0; i < rm->events_n && i < GSPRM_MAX_EVENTS; i++) { if (!rm->events[i].valid) continue; nv_vgpu_info(vgpu, - "GSPRM: event[%u] hClient=0x%x hEvent=0x%x hSrc=0x%x notifyIndex=0x%x data=0x%x", + "vgsp-rm: event[%u] hClient=0x%x hEvent=0x%x hSrc=0x%x notifyIndex=0x%x data=0x%x", i, rm->events[i].h_client, rm->events[i].h_event, rm->events[i].h_src, rm->events[i].notify_index, rm->events[i].data); @@ -823,7 +823,7 @@ static int gsp_rm_parse_queue_chain(struct gsp_emu_context *ctx) ret = gsp_rm_read(ctx, rm->libos_args_gpa, regions, GSPRM_MAX_LIBOS_REGIONS * sizeof(*regions)); if (ret) { - nv_vgpu_err(ctx->vgpu, "GSPRM: libos args read failed gpa=0x%llx ret=%d", + nv_vgpu_err(ctx->vgpu, "vgsp-rm: libos args read failed gpa=0x%llx ret=%d", rm->libos_args_gpa, ret); goto out; } @@ -832,14 +832,14 @@ static int gsp_rm_parse_queue_chain(struct gsp_emu_context *ctx) for (i = 0; i < GSPRM_MAX_LIBOS_REGIONS; i++) { if (regions[i].id8 == 0) break; - nv_vgpu_info(ctx->vgpu, "GSPRM: libos region[%d] id8=0x%llx pa=0x%llx size=0x%llx kind=%u loc=%u", + nv_vgpu_info(ctx->vgpu, "vgsp-rm: libos region[%d] id8=0x%llx pa=0x%llx size=0x%llx kind=%u loc=%u", i, regions[i].id8, regions[i].pa, regions[i].size, regions[i].kind, regions[i].loc); if (regions[i].id8 == GSPRM_LIBOS_ID_RMARGS) gsp_args_gpa = regions[i].pa; } if (!gsp_args_gpa) { - nv_vgpu_err(ctx->vgpu, "GSPRM: RMARGS region not found"); + nv_vgpu_err(ctx->vgpu, "vgsp-rm: RMARGS region not found"); ret = -ENOENT; goto out; } @@ -848,11 +848,11 @@ static int gsp_rm_parse_queue_chain(struct gsp_emu_context *ctx) /* 3. Read GSP_ARGUMENTS_CACHED (MESSAGE_QUEUE_INIT_ARGUMENTS first) */ ret = gsp_rm_read(ctx, gsp_args_gpa, &rm->mq, sizeof(rm->mq)); if (ret) { - nv_vgpu_err(ctx->vgpu, "GSPRM: GSP_ARGUMENTS_CACHED read failed ret=%d", ret); + nv_vgpu_err(ctx->vgpu, "vgsp-rm: GSP_ARGUMENTS_CACHED read failed ret=%d", ret); goto out; } - nv_vgpu_info(ctx->vgpu, "GSPRM: queue args sharedPA=0x%llx ptes=%u cmdOff=0x%llx statOff=0x%llx hdrSize=0x%llx elemMin=0x%llx elemMax=0x%llx hdrAlign=%u elemAlign=%u", + nv_vgpu_info(ctx->vgpu, "vgsp-rm: queue args sharedPA=0x%llx ptes=%u cmdOff=0x%llx statOff=0x%llx hdrSize=0x%llx elemMin=0x%llx elemMax=0x%llx hdrAlign=%u elemAlign=%u", rm->mq.sharedMemPhysAddr, rm->mq.pageTableEntryCount, rm->mq.cmdQueueOffset, rm->mq.statQueueOffset, rm->mq.queueElementHdrSize, rm->mq.queueElementSizeMin, @@ -863,7 +863,7 @@ static int gsp_rm_parse_queue_chain(struct gsp_emu_context *ctx) if (!rm->mq.sharedMemPhysAddr || !rm->mq.pageTableEntryCount || rm->mq.pageTableEntryCount > 1024) { - nv_vgpu_err(ctx->vgpu, "GSPRM: invalid queue args"); + nv_vgpu_err(ctx->vgpu, "vgsp-rm: invalid queue args"); ret = -EINVAL; goto out; } @@ -878,7 +878,7 @@ static int gsp_rm_parse_queue_chain(struct gsp_emu_context *ctx) ret = gsp_rm_read(ctx, rm->mq.sharedMemPhysAddr, rm->ptes, rm->mq.pageTableEntryCount * sizeof(u64)); if (ret) { - nv_vgpu_err(ctx->vgpu, "GSPRM: page table read failed ret=%d", ret); + nv_vgpu_err(ctx->vgpu, "vgsp-rm: page table read failed ret=%d", ret); goto out; } @@ -897,14 +897,14 @@ static int gsp_rm_parse_queue_chain(struct gsp_emu_context *ctx) rm->stat_msgcount = (rm->stat_size - rm->entry_off) / GSPRM_QUEUE_ELEMENT_SIZE; if (!rm->cmd_gpa || !rm->stat_gpa || !rm->cmd_msgcount || !rm->stat_msgcount) { - nv_vgpu_err(ctx->vgpu, "GSPRM: bad queue geometry cmd_gpa=0x%llx stat_gpa=0x%llx cmd_mc=%u stat_mc=%u", + nv_vgpu_err(ctx->vgpu, "vgsp-rm: bad queue geometry cmd_gpa=0x%llx stat_gpa=0x%llx cmd_mc=%u stat_mc=%u", rm->cmd_gpa, rm->stat_gpa, rm->cmd_msgcount, rm->stat_msgcount); ret = -EINVAL; goto out; } - nv_vgpu_info(ctx->vgpu, "GSPRM: cmd queue gpa=0x%llx size=0x%x mc=%u; status queue gpa=0x%llx size=0x%x mc=%u", + nv_vgpu_info(ctx->vgpu, "vgsp-rm: cmd queue gpa=0x%llx size=0x%x mc=%u; status queue gpa=0x%llx size=0x%x mc=%u", rm->cmd_gpa, rm->cmd_size, rm->cmd_msgcount, rm->stat_gpa, rm->stat_size, rm->stat_msgcount); @@ -936,7 +936,7 @@ static int gsp_rm_link_status_queue(struct gsp_emu_context *ctx) ret = gsp_rm_write_buf(ctx, rm->stat_off, &tx, sizeof(tx)); if (ret) { - nv_vgpu_err(ctx->vgpu, "GSPRM: status TX header write failed ret=%d", ret); + nv_vgpu_err(ctx->vgpu, "vgsp-rm: status TX header write failed ret=%d", ret); return ret; } @@ -944,11 +944,11 @@ static int gsp_rm_link_status_queue(struct gsp_emu_context *ctx) ret = gsp_rm_write_buf(ctx, rm->stat_off + tx.rxHdrOff, &zero, sizeof(zero)); if (ret) { - nv_vgpu_err(ctx->vgpu, "GSPRM: status RX header write failed ret=%d", ret); + nv_vgpu_err(ctx->vgpu, "vgsp-rm: status RX header write failed ret=%d", ret); return ret; } - nv_vgpu_info(ctx->vgpu, "GSPRM: status queue linked (size=0x%x msgCount=%u)", + nv_vgpu_info(ctx->vgpu, "vgsp-rm: status queue linked (size=0x%x msgCount=%u)", tx.size, tx.msgCount); return 0; } @@ -1001,18 +1001,18 @@ static void gsp_rm_handle_set_guest_system_info(struct gsp_emu_context *ctx, reply = kzalloc(GSPRM_SET_GUEST_INFO_SIZE, GFP_KERNEL); if (!reply) { - nv_vgpu_err(ctx->vgpu, "GSPRM: SET_GUEST_SYSTEM_INFO reply alloc failed"); + nv_vgpu_err(ctx->vgpu, "vgsp-rm: SET_GUEST_SYSTEM_INFO reply alloc failed"); return; } memcpy(reply + 0, &major, 4); memcpy(reply + 4, &minor, 4); - nv_vgpu_info(ctx->vgpu, "GSPRM: SET_GUEST_SYSTEM_INFO seq=%u -> VGX %u.%u", + nv_vgpu_info(ctx->vgpu, "vgsp-rm: SET_GUEST_SYSTEM_INFO seq=%u -> VGX %u.%u", sequence, major, minor); if (gsp_rm_send(ctx, GSPRM_RPC_FUNC_SET_GUEST_SYSTEM_INFO, sequence, 0, reply, GSPRM_SET_GUEST_INFO_SIZE)) - nv_vgpu_err(ctx->vgpu, "GSPRM: SET_GUEST_SYSTEM_INFO reply send failed"); + nv_vgpu_err(ctx->vgpu, "vgsp-rm: SET_GUEST_SYSTEM_INFO reply send failed"); else rm->rpcs_replied++; @@ -1222,7 +1222,7 @@ static void gsp_rm_apply_static_overlay(struct gsp_emu_context *ctx, u8 *buf) rm->static_live++; nv_vgpu_info(ctx->vgpu, - "GSPRM: static-info overlay applied (generation=%u): name='%s' short='%s' vbiosValid=%u subVendor=0x%04x subDevice=0x%04x", + "vgsp-rm: static-info overlay applied (generation=%u): name='%s' short='%s' vbiosValid=%u subVendor=0x%04x subDevice=0x%04x", snap.generation, snap.gpu_name, snap.gpu_short_name, snap.b_vbios_valid, (u16)snap.vbios_sub_vendor, (u16)snap.vbios_sub_device); @@ -1236,20 +1236,20 @@ static void gsp_rm_handle_get_static_info(struct gsp_emu_context *ctx, reply = kzalloc(TU104_GSCI_SIZE, GFP_KERNEL); if (!reply) { - nv_vgpu_err(ctx->vgpu, "GSPRM: GET_GSP_STATIC_INFO reply alloc failed"); + nv_vgpu_err(ctx->vgpu, "vgsp-rm: GET_GSP_STATIC_INFO reply alloc failed"); return; } gsp_rm_build_static_info(reply); gsp_rm_apply_static_overlay(ctx, reply); - nv_vgpu_info(ctx->vgpu, "GSPRM: GET_GSP_STATIC_INFO seq=%u -> %u bytes (fb=%lluMB, engines=0x%x/0x%x)", + nv_vgpu_info(ctx->vgpu, "vgsp-rm: GET_GSP_STATIC_INFO seq=%u -> %u bytes (fb=%lluMB, engines=0x%x/0x%x)", sequence, TU104_GSCI_SIZE, 0x10000000ULL >> 20, 0x60003E02, 0x362020); if (gsp_rm_send(ctx, GSPRM_RPC_FUNC_GET_GSP_STATIC_INFO, sequence, 0, reply, TU104_GSCI_SIZE)) - nv_vgpu_err(ctx->vgpu, "GSPRM: GET_GSP_STATIC_INFO reply send failed"); + nv_vgpu_err(ctx->vgpu, "vgsp-rm: GET_GSP_STATIC_INFO reply send failed"); else rm->rpcs_replied++; @@ -1317,7 +1317,7 @@ static void gsp_rm_handle_fifo_device_table(struct gsp_emu_context *ctx, copy_count * sizeof(struct tu104_fifo_device_entry); *out_status = 0; /* NV_OK */ - nv_vgpu_info(ctx->vgpu, "GSPRM: FIFO_GET_DEVICE_INFO_TABLE base=%u count=%u more=%u", + nv_vgpu_info(ctx->vgpu, "vgsp-rm: FIFO_GET_DEVICE_INFO_TABLE base=%u count=%u more=%u", base, copy_count, fifo_params->bMore); } @@ -1370,7 +1370,7 @@ static void gsp_rm_handle_intr_kernel_table(struct gsp_emu_context *ctx, sizeof(intr_params->subtreeMap); *out_status = 0; - nv_vgpu_info(ctx->vgpu, "GSPRM: INTR_GET_KERNEL_TABLE tableLen=%u", + nv_vgpu_info(ctx->vgpu, "vgsp-rm: INTR_GET_KERNEL_TABLE tableLen=%u", TU104_INTR_KERNEL_TABLE_SIZE); } @@ -1395,7 +1395,7 @@ static void gsp_rm_handle_constructed_falcon_info(struct gsp_emu_context *ctx, sizeof(struct tu104_constructed_falcon_info); *out_status = 0; - nv_vgpu_info(ctx->vgpu, "GSPRM: GET_CONSTRUCTED_FALCON_INFO numFalcons=%u", + nv_vgpu_info(ctx->vgpu, "vgsp-rm: GET_CONSTRUCTED_FALCON_INFO numFalcons=%u", TU104_FALCON_TABLE_SIZE); } @@ -1420,7 +1420,7 @@ static void gsp_rm_handle_internal_device_table(struct gsp_emu_context *ctx, deviceInfoTable) + copy_size; *out_status = 0; - nv_vgpu_info(ctx->vgpu, "GSPRM: INTERNAL_GET_DEVICE_INFO_TABLE numEntries=%u", + nv_vgpu_info(ctx->vgpu, "vgsp-rm: INTERNAL_GET_DEVICE_INFO_TABLE numEntries=%u", TU104_INTERNAL_DEVICE_TABLE_SIZE); } @@ -1454,7 +1454,7 @@ static void gsp_rm_handle_user_register_access_map(struct gsp_emu_context *ctx, *out_params_size = 8204; *out_status = 0; - nv_vgpu_info(ctx->vgpu, "GSPRM: USER_REGISTER_ACCESS_MAP -> empty map"); + nv_vgpu_info(ctx->vgpu, "vgsp-rm: USER_REGISTER_ACCESS_MAP -> empty map"); } /* @@ -1480,7 +1480,7 @@ static void gsp_rm_handle_fifo_get_num_channels(struct gsp_emu_context *ctx, *out_params_size = 8; *out_status = 0; - nv_vgpu_info(ctx->vgpu, "GSPRM: FIFO_GET_NUM_CHANNELS -> %u", val32); + nv_vgpu_info(ctx->vgpu, "vgsp-rm: FIFO_GET_NUM_CHANNELS -> %u", val32); } /* @@ -1525,7 +1525,7 @@ static void gsp_rm_handle_bus_get_pci_bar_info(struct gsp_emu_context *ctx, *out_params_size = 8 + 8 * 24; *out_status = 0; - nv_vgpu_info(ctx->vgpu, "GSPRM: BUS_GET_PCI_BAR_INFO -> %u BARs (BAR1=%uMB)", + nv_vgpu_info(ctx->vgpu, "vgsp-rm: BUS_GET_PCI_BAR_INFO -> %u BARs (BAR1=%uMB)", count, (u32)(sizes[1] >> 20)); } @@ -1558,7 +1558,7 @@ static void gsp_rm_handle_display_get_static_info(struct gsp_emu_context *ctx, *out_params_size = 36; *out_status = 0; - nv_vgpu_info(ctx->vgpu, "GSPRM: DISPLAY_GET_STATIC_INFO -> heads=1 dispChannels=1"); + nv_vgpu_info(ctx->vgpu, "vgsp-rm: DISPLAY_GET_STATIC_INFO -> heads=1 dispChannels=1"); } /* @@ -1580,7 +1580,7 @@ static void gsp_rm_handle_display_get_ip_version(struct gsp_emu_context *ctx, *out_params_size = 4; *out_status = 0; - nv_vgpu_info(ctx->vgpu, "GSPRM: DISPLAY_GET_IP_VERSION -> 0x%x", val32); + nv_vgpu_info(ctx->vgpu, "vgsp-rm: DISPLAY_GET_IP_VERSION -> 0x%x", val32); } /* @@ -1604,7 +1604,7 @@ static void gsp_rm_handle_ce_get_fault_method_buffer_size( *out_params_size = 4; *out_status = 0; - nv_vgpu_info(ctx->vgpu, "GSPRM: CE_GET_FAULT_METHOD_BUFFER_SIZE -> %u", val32); + nv_vgpu_info(ctx->vgpu, "vgsp-rm: CE_GET_FAULT_METHOD_BUFFER_SIZE -> %u", val32); } /* @@ -1653,7 +1653,7 @@ static void gsp_rm_handle_ce_physical_caps(struct gsp_emu_context *ctx, } else { *out_status = 0x56; /* NV_ERR_NOT_SUPPORTED */ *out_params_size = req_size; - nv_vgpu_info(ctx->vgpu, "GSPRM: CE_GET_PHYSICAL_CAPS type=0x%x -> NOT_SUPPORTED", + nv_vgpu_info(ctx->vgpu, "vgsp-rm: CE_GET_PHYSICAL_CAPS type=0x%x -> NOT_SUPPORTED", ce_type); return; } @@ -1661,7 +1661,7 @@ static void gsp_rm_handle_ce_physical_caps(struct gsp_emu_context *ctx, *out_params_size = req_size ? req_size : 8; *out_status = 0; - nv_vgpu_info(ctx->vgpu, "GSPRM: CE_GET_PHYSICAL_CAPS type=0x%x -> caps=%02x %02x", + nv_vgpu_info(ctx->vgpu, "vgsp-rm: CE_GET_PHYSICAL_CAPS type=0x%x -> caps=%02x %02x", ce_type, out_params[4], out_params[5]); } @@ -1691,7 +1691,7 @@ static void gsp_rm_handle_ce_all_caps(struct gsp_emu_context *ctx, *out_params_size = 136; *out_status = 0; - nv_vgpu_info(ctx->vgpu, "GSPRM: CE_GET_ALL(_PHYSICAL)_CAPS -> %u CEs present=0x%llx", + nv_vgpu_info(ctx->vgpu, "vgsp-rm: CE_GET_ALL(_PHYSICAL)_CAPS -> %u CEs present=0x%llx", TU104_NUM_CES, present); } @@ -1723,7 +1723,7 @@ static void gsp_rm_handle_ce_pce_mask(struct gsp_emu_context *ctx, *out_params_size = req_size ? req_size : 8; *out_status = 0; - nv_vgpu_info(ctx->vgpu, "GSPRM: CE_GET_CE_PCE_MASK type=0x%x -> 0x%x", + nv_vgpu_info(ctx->vgpu, "vgsp-rm: CE_GET_CE_PCE_MASK type=0x%x -> 0x%x", ce_type, mask); } @@ -1757,7 +1757,7 @@ static void gsp_rm_handle_gmmu_get_static_info(struct gsp_emu_context *ctx, *out_params_size = 16; *out_status = 0; - nv_vgpu_info(ctx->vgpu, "GSPRM: GMMU_GET_STATIC_INFO -> replayFaultBuf=0x%x nonReplayFaultBuf=0x%x", + nv_vgpu_info(ctx->vgpu, "vgsp-rm: GMMU_GET_STATIC_INFO -> replayFaultBuf=0x%x nonReplayFaultBuf=0x%x", replay, nonreplay); } @@ -1805,7 +1805,7 @@ static void gsp_rm_handle_kgr_get_global_sm_order(struct gsp_emu_context *ctx, sizeof(struct tu104_gr_global_sm_order); *out_status = 0; - nv_vgpu_info(ctx->vgpu, "GSPRM: KGR_GET_GLOBAL_SM_ORDER -> %u SMs, %u TPCs on GR0", + nv_vgpu_info(ctx->vgpu, "vgsp-rm: KGR_GET_GLOBAL_SM_ORDER -> %u SMs, %u TPCs on GR0", TU104_NUM_SM, TU104_NUM_TPC); } @@ -1866,7 +1866,7 @@ static void gsp_rm_handle_kgr_get_info(struct gsp_emu_context *ctx, sizeof(struct tu104_gr_static_info); *out_status = 0; - nv_vgpu_info(ctx->vgpu, "GSPRM: KGR_GET_INFO -> GR0 litter %uGPC/%uTPC/%uSM, maxSubctx=%u", + nv_vgpu_info(ctx->vgpu, "vgsp-rm: KGR_GET_INFO -> GR0 litter %uGPC/%uTPC/%uSM, maxSubctx=%u", TU104_NUM_GPC, TU104_TPC_PER_GPC, TU104_NUM_SM, TU104_MAX_SUBCONTEXT_COUNT); } @@ -1908,7 +1908,7 @@ static void gsp_rm_handle_kgr_get_floorsweeping_masks( sizeof(struct tu104_gr_floorsweeping_masks); *out_status = 0; - nv_vgpu_info(ctx->vgpu, "GSPRM: KGR_GET_FLOORSWEEPING_MASKS -> gpcMask=0x%x tpc/gpc=%u", + nv_vgpu_info(ctx->vgpu, "vgsp-rm: KGR_GET_FLOORSWEEPING_MASKS -> gpcMask=0x%x tpc/gpc=%u", m->gpcMask, TU104_TPC_PER_GPC); } @@ -1975,7 +1975,7 @@ static void gsp_rm_handle_kgr_get_context_buffers_info( *out_params_size = sizeof(*info); *out_status = 0; - nv_vgpu_info(ctx->vgpu, "GSPRM: KGR_GET_CONTEXT_BUFFERS_INFO -> main ctx 0x%x, patch 0x%x, pm 0x%x (engines=%u x %u)", + nv_vgpu_info(ctx->vgpu, "vgsp-rm: KGR_GET_CONTEXT_BUFFERS_INFO -> main ctx 0x%x, patch 0x%x, pm 0x%x (engines=%u x %u)", TU104_CTX_SIZE_MAIN, TU104_CTX_SIZE_PATCH, TU104_CTX_SIZE_PM, TU104_CTX_GPU_MAX_ENGINES, TU104_CTX_ENGINE_ID_COUNT); } @@ -2088,7 +2088,7 @@ static void gsp_rm_handle_fb_get_info_v2(struct gsp_emu_context *ctx, *out_params_size = sizeof(*reply); *out_status = 0; - nv_vgpu_info(ctx->vgpu, "GSPRM: FB_GET_INFO_V2 -> %u entries populated (first idx=0x%x)", + nv_vgpu_info(ctx->vgpu, "vgsp-rm: FB_GET_INFO_V2 -> %u entries populated (first idx=0x%x)", count, count ? reply->fbInfoList[0].index : 0); } @@ -2142,7 +2142,7 @@ static void gsp_rm_handle_clk_domain_info(struct gsp_emu_context *ctx, u32 cmd, *out_status = 0; if (gsp_sema_dbg) - nv_vgpu_info(ctx->vgpu, "GSPRM: CLK domain info cmd=0x%x size=%u", + nv_vgpu_info(ctx->vgpu, "vgsp-rm: CLK domain info cmd=0x%x size=%u", cmd, n); } @@ -2217,10 +2217,10 @@ static void gsp_rm_handle_bus_get_info_v2(struct gsp_emu_context *ctx, *out_params_size = sizeof(*reply); *out_status = 0; - nv_vgpu_info(ctx->vgpu, "GSPRM: BUS_GET_INFO_V2 -> %u entries populated (first idx=0x%x)", + nv_vgpu_info(ctx->vgpu, "vgsp-rm: BUS_GET_INFO_V2 -> %u entries populated (first idx=0x%x)", count, count ? reply->busInfoList[0].index : 0); for (i = 0; i < count; i++) - nv_vgpu_info(ctx->vgpu, "GSPRM: bus[%u] idx=0x%x data=0x%x", + nv_vgpu_info(ctx->vgpu, "vgsp-rm: bus[%u] idx=0x%x data=0x%x", i, reply->busInfoList[i].index, reply->busInfoList[i].data); } @@ -2278,7 +2278,7 @@ static void gsp_rm_handle_copy_server_pdes(struct gsp_emu_context *ctx, rm->pt.num_levels = num_levels; nv_vgpu_info(ctx->vgpu, - "GSPRM: COPY_SERVER_PDES va=[0x%llx..0x%llx] pageSize=0x%llx levels=%u", + "vgsp-rm: COPY_SERVER_PDES va=[0x%llx..0x%llx] pageSize=0x%llx levels=%u", va_lo, va_hi, page_size, num_levels); for (i = 0; i < num_levels; i++) { @@ -2303,7 +2303,7 @@ static void gsp_rm_handle_copy_server_pdes(struct gsp_emu_context *ctx, rm->pt.levels[i].page_shift = page_shift; nv_vgpu_info(ctx->vgpu, - "GSPRM: pt level[%u] phys=0x%llx size=0x%llx aperture=%u pageShift=%u", + "vgsp-rm: pt level[%u] phys=0x%llx size=0x%llx aperture=%u pageShift=%u", i, phys, size, aperture, page_shift); } } @@ -2402,7 +2402,7 @@ static void gsp_rm_handle_rm_alloc(struct gsp_emu_context *ctx, if (gsp_sema_dbg) nv_vgpu_info(ctx->vgpu, - "GSPRM: GSP_RM_ALLOC class=0x%x paramsSize=%u flags=0x%x hClient=0x%x hParent=0x%x hObject=0x%x", + "vgsp-rm: GSP_RM_ALLOC class=0x%x paramsSize=%u flags=0x%x hClient=0x%x hParent=0x%x hObject=0x%x", class_id, params_size, flags, hc, hp, ho); /* Full param dump for memory/channel classes and any class we have not @@ -2418,7 +2418,7 @@ static void gsp_rm_handle_rm_alloc(struct gsp_emu_context *ctx, u32 n = min(shown - off, (u32)64); nv_vgpu_info(ctx->vgpu, - "GSPRM: alloc class=0x%x params[%u..%u]=%*phN", + "vgsp-rm: alloc class=0x%x params[%u..%u]=%*phN", class_id, off, off + n, (int)n, params + off); } @@ -2477,7 +2477,7 @@ static void gsp_rm_handle_rm_alloc(struct gsp_emu_context *ctx, rm->events_n++; if (gsp_sema_dbg) nv_vgpu_info(ctx->vgpu, - "GSPRM: event registered hEvent=0x%x hSrc=0x%x notifyIndex=%u (off %d) params=%*phN", + "vgsp-rm: event registered hEvent=0x%x hSrc=0x%x notifyIndex=%u (off %d) params=%*phN", ho, h_src, notify_index, hc_off, (int)min(params_size, (u32)24), params); } @@ -2490,7 +2490,7 @@ static void gsp_rm_handle_rm_alloc(struct gsp_emu_context *ctx, reply = kmalloc(reply_len, GFP_KERNEL); if (!reply) { - nv_vgpu_err(ctx->vgpu, "GSPRM: GSP_RM_ALLOC reply alloc failed"); + nv_vgpu_err(ctx->vgpu, "vgsp-rm: GSP_RM_ALLOC reply alloc failed"); return; } @@ -2499,7 +2499,7 @@ static void gsp_rm_handle_rm_alloc(struct gsp_emu_context *ctx, if (gsp_rm_send(ctx, GSPRM_RPC_FUNC_GSP_RM_ALLOC, sequence, 0, reply, reply_len)) - nv_vgpu_err(ctx->vgpu, "GSPRM: GSP_RM_ALLOC reply send failed"); + nv_vgpu_err(ctx->vgpu, "vgsp-rm: GSP_RM_ALLOC reply send failed"); kfree(reply); } @@ -2521,7 +2521,7 @@ static void gsp_rm_handle_memsys_l2_invalidate_evict(struct gsp_emu_context *ctx */ const u32 *flags = (const u32 *)req_params; - nv_vgpu_info(ctx->vgpu, "GSPRM: MEMSYS_L2_INVALIDATE_EVICT flags=0x%x", + nv_vgpu_info(ctx->vgpu, "vgsp-rm: MEMSYS_L2_INVALIDATE_EVICT flags=0x%x", params_size >= 4 ? *flags : 0); *out_status = 0; /* NV_OK */ @@ -2557,7 +2557,7 @@ static void gsp_rm_handle_gr_get_fecs_trace_hw_enable(struct gsp_emu_context *ct * NV2080_CTRL_GR_ROUTE_INFO = { NvU64 base, size, alignment; NvU32 addressSpace, cpuCacheAttrib; } */ - nv_vgpu_info(ctx->vgpu, "GSPRM: GR_GET_FECS_TRACE_HW_ENABLE params_size=%u", params_size); + nv_vgpu_info(ctx->vgpu, "vgsp-rm: GR_GET_FECS_TRACE_HW_ENABLE params_size=%u", params_size); /* Return disabled (0) - no FECS tracing on vGPU */ memset(out, 0, sizeof(*out)); @@ -2589,7 +2589,7 @@ static void gsp_rm_handle_system_map_shared_data(struct gsp_emu_context *ctx, u8 bMap; } __attribute__((packed)) *in = (void *)req_params; - nv_vgpu_info(ctx->vgpu, "GSPRM: SYSTEM_MAP_SHARED_DATA base=0x%llx size=0x%llx subDev=%u bMap=%u", + nv_vgpu_info(ctx->vgpu, "vgsp-rm: SYSTEM_MAP_SHARED_DATA base=0x%llx size=0x%llx subDev=%u bMap=%u", in ? in->base : 0, in ? in->size : 0, in ? in->subDeviceInstance : 0, in ? in->bMap : 0); @@ -2663,7 +2663,7 @@ gsp_rm_handle_promote_fault_method_buffers(struct gsp_emu_context *ctx, memcpy(&m->e[i].address_space, p + 32 * i + 24, 4); if (gsp_sema_dbg) nv_vgpu_info(ctx->vgpu, - "GSPRM: FAULT_METHOD_BUFFER hObject=0x%x hClient=0x%x buf[%u] base=0x%llx size=%llu ap=%u", + "vgsp-rm: FAULT_METHOD_BUFFER hObject=0x%x hClient=0x%x buf[%u] base=0x%llx size=%llu ap=%u", req->hObject, req->hClient, i, m->e[i].base, m->e[i].size, m->e[i].address_space); @@ -2683,7 +2683,7 @@ static void gsp_rm_ctrl_forward_note(struct gsp_emu_context *ctx) if ((rm->ctrl_fwd_fallback && rm->ctrl_fwd_fallback <= 4) || (events && (events % 64) == 0)) nv_vgpu_info(ctx->vgpu, - "GSPRM: RM_CONTROL forward: ok=%llu fallback=%llu timeout=%llu", + "vgsp-rm: RM_CONTROL forward: ok=%llu fallback=%llu timeout=%llu", rm->ctrl_fwd_ok, rm->ctrl_fwd_fallback, rm->ctrl_fwd_timeout); } @@ -2802,7 +2802,7 @@ static bool gsp_rm_ctrl_forward(struct gsp_emu_context *ctx, if (gsp_rm_send(ctx, GSPRM_RPC_FUNC_GSP_RM_CONTROL, sequence, 0, reply, GSP_RM_CTRL_HDR_SIZE + out_params_size)) { - nv_vgpu_err(ctx->vgpu, "GSPRM: RM_CONTROL forward reply send failed cmd=0x%x", + nv_vgpu_err(ctx->vgpu, "vgsp-rm: RM_CONTROL forward reply send failed cmd=0x%x", req->cmd); rm->ctrl_fwd_fallback++; } else { @@ -2834,7 +2834,7 @@ static void gsp_rm_handle_rm_control(struct gsp_emu_context *ctx, memcpy(&req, req_data, GSP_RM_CTRL_HDR_SIZE); if (gsp_sema_dbg) - nv_vgpu_info(ctx->vgpu, "GSPRM: GSP_RM_CONTROL cmd=0x%x hClient=0x%x hObject=0x%x paramsSize=%u flags=0x%x", + nv_vgpu_info(ctx->vgpu, "vgsp-rm: GSP_RM_CONTROL cmd=0x%x hClient=0x%x hObject=0x%x paramsSize=%u flags=0x%x", req.cmd, req.hClient, req.hObject, req.paramsSize, req.flags); @@ -2842,7 +2842,7 @@ static void gsp_rm_handle_rm_control(struct gsp_emu_context *ctx, reply_data_len = GSP_RM_CTRL_HDR_SIZE + max(req.paramsSize, (u32)4096); reply = kzalloc(reply_data_len, GFP_KERNEL); if (!reply) { - nv_vgpu_err(ctx->vgpu, "GSPRM: RM_CONTROL reply alloc failed"); + nv_vgpu_err(ctx->vgpu, "vgsp-rm: RM_CONTROL reply alloc failed"); return; } @@ -3033,7 +3033,7 @@ static void gsp_rm_handle_rm_control(struct gsp_emu_context *ctx, * stack structs as input (e.g. DISPLAY_GET_IP_VERSION), so an * echo hands the driver its own stack garbage as the answer. */ if (gsp_sema_dbg) - nv_vgpu_info(ctx->vgpu, "GSPRM: RM_CONTROL unknown cmd=0x%x -> generic SUCCESS", + nv_vgpu_info(ctx->vgpu, "vgsp-rm: RM_CONTROL unknown cmd=0x%x -> generic SUCCESS", req.cmd); /* Dump small request params so mapping/alloc controls that * carry PAs can be identified (rate-limited). */ @@ -3041,7 +3041,7 @@ static void gsp_rm_handle_rm_control(struct gsp_emu_context *ctx, rm->ctrl_param_dumps < 400) { rm->ctrl_param_dumps++; nv_vgpu_info(ctx->vgpu, - "GSPRM: ctrl 0x%x params[0..%u]=%*phN", + "vgsp-rm: ctrl 0x%x params[0..%u]=%*phN", req.cmd, req.paramsSize, req.paramsSize, req_data + GSP_RM_CTRL_HDR_SIZE); } @@ -3055,7 +3055,7 @@ static void gsp_rm_handle_rm_control(struct gsp_emu_context *ctx, * and the calling ioctl never completes (nvidia-smi hang). * Echo the request's serialized params (valid stream) and * report NOT_SUPPORTED - headless vGPU has no DDC/I2C bus. */ - nv_vgpu_info(ctx->vgpu, "GSPRM: I2C_TRANSACTION -> NOT_SUPPORTED (echo)"); + nv_vgpu_info(ctx->vgpu, "vgsp-rm: I2C_TRANSACTION -> NOT_SUPPORTED (echo)"); out_status = 0x56; /* NV_ERR_NOT_SUPPORTED */ out_params_size = req.paramsSize; if (req.paramsSize && @@ -3078,7 +3078,7 @@ static void gsp_rm_handle_rm_control(struct gsp_emu_context *ctx, if (gsp_sema_dbg) nv_vgpu_info(ctx->vgpu, - "GSPRM: RM_CONTROL reply cmd=0x%x hClient=0x%x hObject=0x%x in=%u out=%u status=0x%x us=%llu", + "vgsp-rm: RM_CONTROL reply cmd=0x%x hClient=0x%x hObject=0x%x in=%u out=%u status=0x%x us=%llu", req.cmd, req.hClient, req.hObject, req.paramsSize, out_params_size, out_status, dt_us); @@ -3086,7 +3086,7 @@ static void gsp_rm_handle_rm_control(struct gsp_emu_context *ctx, if (gsp_rm_send(ctx, GSPRM_RPC_FUNC_GSP_RM_CONTROL, sequence, 0, reply, GSP_RM_CTRL_HDR_SIZE + out_params_size)) - nv_vgpu_err(ctx->vgpu, "GSPRM: RM_CONTROL reply send failed cmd=0x%x", + nv_vgpu_err(ctx->vgpu, "vgsp-rm: RM_CONTROL reply send failed cmd=0x%x", req.cmd); else rm->rpcs_replied++; @@ -3144,11 +3144,11 @@ static void gsp_rm_handle_free(struct gsp_emu_context *ctx, const u8 *elem, } if (removed) nv_vgpu_info(ctx->vgpu, - "GSPRM: retired %u event record(s) on FREE hObjOld=0x%x hRoot=0x%x", + "vgsp-rm: retired %u event record(s) on FREE hObjOld=0x%x hRoot=0x%x", removed, hObjOld, hRoot); if (gsp_sema_dbg) - nv_vgpu_info(ctx->vgpu, "GSPRM: FREE hObjOld=0x%x seq=%u cmd_read=%u stat_write=%u", + nv_vgpu_info(ctx->vgpu, "vgsp-rm: FREE hObjOld=0x%x seq=%u cmd_read=%u stat_write=%u", hObjOld, sequence, rm->cmd_read, rm->stat_write); /* Small delay before FREE/UNLOADING replies: mitigates an intermittent @@ -3157,7 +3157,7 @@ static void gsp_rm_handle_free(struct gsp_emu_context *ctx, const u8 *elem, if (gsp_rm_send(ctx, GSPRM_RPC_FUNC_FREE, sequence, 0, params, sizeof(params))) - nv_vgpu_err(ctx->vgpu, "GSPRM: FREE reply send failed"); + nv_vgpu_err(ctx->vgpu, "vgsp-rm: FREE reply send failed"); else rm->rpcs_replied++; } @@ -3233,11 +3233,11 @@ static void gsp_rm_handle_set_page_directory(struct gsp_emu_context *ctx, v); } nv_vgpu_info(ctx->vgpu, - "GSPRM: SET_PAGE_DIRECTORY len=%u payload: %s", + "vgsp-rm: SET_PAGE_DIRECTORY len=%u payload: %s", length, dump); } nv_vgpu_info(ctx->vgpu, - "GSPRM: SET_PAGE_DIRECTORY pdb=0x%llx entries=%u flags=0x%x hVASpace=0x%x chId=0x%x subDev=%u pasid=%u len=%u", + "vgsp-rm: SET_PAGE_DIRECTORY pdb=0x%llx entries=%u flags=0x%x hVASpace=0x%x chId=0x%x subDev=%u pasid=%u len=%u", phys, num_entries, flags, h_vas, ch_id, subdev, pasid, length); @@ -3273,14 +3273,14 @@ static void gsp_rm_handle_set_page_directory(struct gsp_emu_context *ctx, o += snprintf(b + o, sizeof(b) - o, "%016llx ", peek[i]); nv_vgpu_info(ctx->vgpu, - "GSPRM: directory[0..3]: %s", b); + "vgsp-rm: directory[0..3]: %s", b); } } } if (gsp_rm_send(ctx, GSPRM_RPC_FUNC_SET_PAGE_DIRECTORY, sequence, 0, NULL, 0)) - nv_vgpu_err(ctx->vgpu, "GSPRM: SET_PAGE_DIRECTORY reply send failed"); + nv_vgpu_err(ctx->vgpu, "vgsp-rm: SET_PAGE_DIRECTORY reply send failed"); } static void gsp_rm_handle_unset_page_directory(struct gsp_emu_context *ctx, @@ -3295,13 +3295,13 @@ static void gsp_rm_handle_unset_page_directory(struct gsp_emu_context *ctx, memcpy(&h_vas, p, 4); nv_vgpu_info(ctx->vgpu, - "GSPRM: UNSET_PAGE_DIRECTORY hVASpace=0x%x len=%u", + "vgsp-rm: UNSET_PAGE_DIRECTORY hVASpace=0x%x len=%u", h_vas, length); gsp_sema_service_vaspace_del(h_vas); if (gsp_rm_send(ctx, GSPRM_RPC_FUNC_UNSET_PAGE_DIRECTORY, sequence, 0, NULL, 0)) - nv_vgpu_err(ctx->vgpu, "GSPRM: UNSET_PAGE_DIRECTORY reply send failed"); + nv_vgpu_err(ctx->vgpu, "vgsp-rm: UNSET_PAGE_DIRECTORY reply send failed"); } static void gsp_rm_handle_element(struct gsp_emu_context *ctx, const u8 *elem) @@ -3319,7 +3319,7 @@ static void gsp_rm_handle_element(struct gsp_emu_context *ctx, const u8 *elem) case GSPRM_RPC_FUNC_SET_REGISTRY: /* Async init RPCs - fire and forget, no reply expected. * Guest was treating SUCCESS replies as "unexpected events". */ - nv_vgpu_info(ctx->vgpu, "GSPRM: async RPC %s(%u) seq=%u len=%u -> NO REPLY (fire-and-forget)", + nv_vgpu_info(ctx->vgpu, "vgsp-rm: async RPC %s(%u) seq=%u len=%u -> NO REPLY (fire-and-forget)", gsp_rm_rpc_name(function), function, sequence, hdr->length); rm->rpcs_replied++; @@ -3327,11 +3327,11 @@ static void gsp_rm_handle_element(struct gsp_emu_context *ctx, const u8 *elem) case GSPRM_RPC_FUNC_CONTINUATION_RECORD: /* CONTINUATION_RECORD: driver expects a reply. Send SUCCESS. */ - nv_vgpu_info(ctx->vgpu, "GSPRM: async RPC %s(%u) seq=%u len=%u -> SUCCESS reply", + nv_vgpu_info(ctx->vgpu, "vgsp-rm: async RPC %s(%u) seq=%u len=%u -> SUCCESS reply", gsp_rm_rpc_name(function), function, sequence, hdr->length); if (gsp_rm_send(ctx, function, sequence, 0, NULL, 0)) - nv_vgpu_err(ctx->vgpu, "GSPRM: reply send failed fn=%u", function); + nv_vgpu_err(ctx->vgpu, "vgsp-rm: reply send failed fn=%u", function); else rm->rpcs_replied++; return; @@ -3367,24 +3367,24 @@ static void gsp_rm_handle_element(struct gsp_emu_context *ctx, const u8 *elem) case GSPRM_RPC_FUNC_UPDATE_BAR_PDE: /* UPDATE_BAR_PDE: guest updates BAR page directory entries. * For vGPU, we just acknowledge success. */ - nv_vgpu_info(ctx->vgpu, "GSPRM: RPC UPDATE_BAR_PDE(%u) seq=%u len=%u -> SUCCESS", + nv_vgpu_info(ctx->vgpu, "vgsp-rm: RPC UPDATE_BAR_PDE(%u) seq=%u len=%u -> SUCCESS", function, sequence, hdr->length); if (gsp_rm_send(ctx, function, sequence, 0, NULL, 0)) - nv_vgpu_err(ctx->vgpu, "GSPRM: UPDATE_BAR_PDE reply send failed"); + nv_vgpu_err(ctx->vgpu, "vgsp-rm: UPDATE_BAR_PDE reply send failed"); else rm->rpcs_replied++; return; case GSPRM_RPC_FUNC_UNLOADING_GUEST_DRIVER: /* UNLOADING_GUEST_DRIVER: log for unload-cycle debugging */ - nv_vgpu_info(ctx->vgpu, "GSPRM: RPC UNLOADING_GUEST_DRIVER(%u) seq=%u cmd_read=%u stat_write=%u stat_seq=%u", + nv_vgpu_info(ctx->vgpu, "vgsp-rm: RPC UNLOADING_GUEST_DRIVER(%u) seq=%u cmd_read=%u stat_write=%u stat_seq=%u", function, sequence, rm->cmd_read, rm->stat_write, rm->stat_seq); /* Small delay before UNLOADING replies: mitigates an intermittent * driver-side reply-matching race in the cleanup path. */ udelay(2000); if (gsp_rm_send(ctx, function, sequence, 0, NULL, 0)) - nv_vgpu_err(ctx->vgpu, "GSPRM: UNLOADING reply send failed"); + nv_vgpu_err(ctx->vgpu, "vgsp-rm: UNLOADING reply send failed"); else rm->rpcs_replied++; return; @@ -3394,11 +3394,11 @@ static void gsp_rm_handle_element(struct gsp_emu_context *ctx, const u8 *elem) * driver's rpcRecvPoll completes. */ rm->unknown_rpcs++; if (gsp_sema_dbg) - nv_vgpu_info(ctx->vgpu, "GSPRM: RPC %s(%u) seq=%u len=%u -> generic SUCCESS reply (unknown #%llu)", + nv_vgpu_info(ctx->vgpu, "vgsp-rm: RPC %s(%u) seq=%u len=%u -> generic SUCCESS reply (unknown #%llu)", gsp_rm_rpc_name(function), function, sequence, hdr->length, rm->unknown_rpcs); if (gsp_rm_send(ctx, function, sequence, 0, NULL, 0)) - nv_vgpu_err(ctx->vgpu, "GSPRM: reply send failed fn=%u", function); + nv_vgpu_err(ctx->vgpu, "vgsp-rm: reply send failed fn=%u", function); else rm->rpcs_replied++; return; @@ -3431,7 +3431,7 @@ static void gsp_rm_poll_commands(struct gsp_emu_context *ctx) * without an observable GSP shutdown) - declare the emulated GSP * dead so the next probe's WPR2-up check passes and it re-boots. */ if (tx.writePtr >= rm->cmd_msgcount) { - nv_vgpu_warn(ctx->vgpu, "GSPRM: insane cmd writePtr %u (msgCount=%u), GSP boot declared dead", + nv_vgpu_warn(ctx->vgpu, "vgsp-rm: insane cmd writePtr %u (msgCount=%u), GSP boot declared dead", tx.writePtr, rm->cmd_msgcount); gsp_emu_clear_boot_state(ctx, "stale GSP-RM queue header"); gsp_rm_emu_reset(ctx); @@ -3469,7 +3469,7 @@ static void gsp_rm_poll_commands(struct gsp_emu_context *ctx) * via gsp_emu_clear_boot_state. This allows the * driver's cleanup frees to complete. */ if (gsp_sema_dbg) - nv_vgpu_info(ctx->vgpu, "GSPRM: garbage element idx=%u sig=0x%x elemCount=%u fn=%u, stopping poll (teardown?)", + nv_vgpu_info(ctx->vgpu, "vgsp-rm: garbage element idx=%u sig=0x%x elemCount=%u fn=%u, stopping poll (teardown?)", rm->cmd_read, signature, elem_count, hdr->function); kfree(elem); @@ -3532,7 +3532,7 @@ void gsp_rm_emu_reset(struct gsp_emu_context *ctx) if (!rm || !rm->parsed) return; - nv_vgpu_info(ctx->vgpu, "GSPRM: reset (rpcs=%llu replied=%llu unknown=%llu)", + nv_vgpu_info(ctx->vgpu, "vgsp-rm: reset (rpcs=%llu replied=%llu unknown=%llu)", rm->rpcs_seen, rm->rpcs_replied, rm->unknown_rpcs); kfree(rm->ptes); @@ -3573,17 +3573,17 @@ void gsp_rm_emu_on_booter_done(struct gsp_emu_context *ctx) mb_hi = gsp_emu_shadow_read32(ctx, GSP_EMU_REG_GSP_MAILBOX0 + 4); rm->libos_args_gpa = ((u64)mb_hi << 32) | mb_lo; - nv_vgpu_info(ctx->vgpu, "GSPRM: libos args at gpa=0x%llx (mailbox 0x%x:0x%x)", + nv_vgpu_info(ctx->vgpu, "vgsp-rm: libos args at gpa=0x%llx (mailbox 0x%x:0x%x)", rm->libos_args_gpa, mb_hi, mb_lo); if (!rm->libos_args_gpa) { - pr_warn_ratelimited("GSPRM: libos args GPA is 0, will retry\n"); + pr_warn_ratelimited("vgsp-rm: libos args GPA is 0, will retry\n"); return; } ret = gsp_rm_parse_queue_chain(ctx); if (ret) { - nv_vgpu_err(ctx->vgpu, "GSPRM: queue chain parse failed: %d", ret); + nv_vgpu_err(ctx->vgpu, "vgsp-rm: queue chain parse failed: %d", ret); return; } @@ -3598,12 +3598,12 @@ void gsp_rm_emu_on_booter_done(struct gsp_emu_context *ctx) ret = gsp_rm_send(ctx, GSPRM_RPC_EVENT_GSP_INIT_DONE, 0, 0, &b_is_d3hot, sizeof(b_is_d3hot)); if (ret) { - nv_vgpu_err(ctx->vgpu, "GSPRM: GSP_INIT_DONE send failed: %d", ret); + nv_vgpu_err(ctx->vgpu, "vgsp-rm: GSP_INIT_DONE send failed: %d", ret); return; } rm->init_done_sent = true; - nv_vgpu_info(ctx->vgpu, "GSPRM: GSP_INIT_DONE emitted, RPC loop active"); + nv_vgpu_info(ctx->vgpu, "vgsp-rm: GSP_INIT_DONE emitted, RPC loop active"); } void gsp_rm_emu_poll(struct gsp_emu_context *ctx) |
