From 89aace067cb26865d0ffa36f995d6c9ff2a3fd17 Mon Sep 17 00:00:00 2001 From: Arthur Hanson Rasmusson Date: Wed, 30 Sep 2026 06:56:05 -0400 Subject: sema-svc: CE op translation falls back to the GMMU walk for virtual operands --- kernel/gsp_sema_service.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'kernel') diff --git a/kernel/gsp_sema_service.c b/kernel/gsp_sema_service.c index 04716a2..7a3b282 100644 --- a/kernel/gsp_sema_service.c +++ b/kernel/gsp_sema_service.c @@ -1960,6 +1960,24 @@ static int svc_op_translate(struct nv_vgpu_device *vgpu, u64 va, u64 *addr, *aperture = CE_APERTURE_SYS; return 0; } + /* + * Virtual operands can also live in a page directory the driver + * published (the UVM client VA space). With the walk decode fixed, + * this resolves CE copies whose src/dst is a plain GPU VA that never + * entered the content-scanned map. + */ + if (!svc_walk_vaspaces(vgpu, va & ~0xfffULL, &pa, &ap)) { + *addr = pa + (va & 0xfff); + *aperture = (ap == SVC_APERTURE_FB) ? CE_APERTURE_VID : + CE_APERTURE_SYS; + return 0; + } + if (!svc_walk_discovered(vgpu, va & ~0xfffULL, &pa, &ap)) { + *addr = pa + (va & 0xfff); + *aperture = (ap == SVC_APERTURE_FB) ? CE_APERTURE_VID : + CE_APERTURE_SYS; + return 0; + } return -ENOENT; } -- cgit v1.2.3