From 31594b263cc4fbe30ebbe412a4a788f726f03a02 Mon Sep 17 00:00:00 2001 From: Arthur Hanson Rasmusson Date: Sun, 4 Oct 2026 16:19:31 -0400 Subject: vgsp: end-to-end CUDA acceptance in the guest The no-claim emulation path now runs a stock CUDA program end to end: device properties, cudaMalloc, a GPU-authored string kernel read back byte-for-byte, two 4 MB host-to-device copies, a 1 M-element vectorAdd executed on the physical GPU through the host bridge, and the device-to-host copy-back verified element by element. Three consecutive supervised cycles report MAIL + VADD bad=0 checksum=392344090.500000 + STATUS OK with identical input/output hashes. Two data-path correctness fixes make the transfers sound: - Once-only op execution per GPFIFO entry. The pump replays recently consumed ring entries when translation batches are injected so missed releases can land; re-executing a CE copy is not idempotent because its source is a client staging buffer that may have been refilled. Slots now record their raw entry words and a replayed entry matching that identity suppresses operations while still processing releases. - Per-page translation of virtual operands. svc_copy resolved only the first page of a VA range and walked the PA linearly; client staging ranges are frequently split (observed 195 + 61 pages), so the tail of alternating chunks was read from unrelated memory. Multi-page copies now re-resolve each 4 KB page through the trusted resolver. Also carries the earlier uncommitted emulation fixes that got the client to the launch (QMD address-window gate, counter registration persistence, 512 MiB emulated FB, bridge slot hygiene) and bounded diagnostics (sema-bigop, sema-bigcopy, bridge-in/out hashes, daemon INCHECK/OUTCHECK/dumps). --- kernel/gsp_rpc_client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'kernel/gsp_rpc_client.c') diff --git a/kernel/gsp_rpc_client.c b/kernel/gsp_rpc_client.c index 0b7f7a2..28659ff 100644 --- a/kernel/gsp_rpc_client.c +++ b/kernel/gsp_rpc_client.c @@ -592,7 +592,7 @@ int gsp_rpc_alloc_emul(struct gsp_client *client, u64 va = addr_hint ? addr_hint : 0x100000000ULL; /* Default 4GB */ dma_addr_t iova; static u64 next_vidmem_va = 0x100000; /* Start after 1MB (skip WPR2/reserved) */ - u64 fb_size = vgpu->fb_size ? vgpu->fb_size : NV_VGPU_BAR1_SIZE; + u64 fb_size = NV_VGPU_EMUL_FB_SIZE; /* For vidmem allocations (golden image, channels, etc.), allocate from * the emulated GPU's vidmem address range (0 - fb_size). The memmgr -- cgit v1.2.3