From 40b15f121a0d0f36d20299fc8f274ab6bf936d4b Mon Sep 17 00:00:00 2001 From: Eric Hartford Date: Sat, 5 Dec 2026 16:52:34 -0800 Subject: [PATCH] rmapi/vm: fix master gate clippy and EDU guest FB geometry fixture (#631) (#646) * rmapi/vm: fix clippy int_plus_one and EDU guest FB geometry register fixture * tests/vm: use exact V100-SXM2-32GB FbGeometry register values in EDU fixture --------- Co-authored-by: Eric Hartford --- src/nvidia/src/rmapi/nvml_ctrl.rs | 2 +- tests/vm/edu_adapter_test.c | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/nvidia/src/rmapi/nvml_ctrl.rs b/src/nvidia/src/rmapi/nvml_ctrl.rs index 3125fe18..23c72bfe 100644 --- a/src/nvidia/src/rmapi/nvml_ctrl.rs +++ b/src/nvidia/src/rmapi/nvml_ctrl.rs @@ -378,7 +378,7 @@ pub fn read_prom_vbios_p0_clocks(mut rd32: impl FnMut(u64) -> u32) -> Option=0xa10000&&offset<=0xa38000&&!((offset-0xa10000)&0x7fff)){*value=0;return 0;} if(offset==0x20400){*value=30<<8;return 0;} + /* GV100 FB/L2 geometry registers (FbGeometry::REGISTERS) matching V100-SXM2-32GB + * (8 FBPs, 16 HBM2 FBPAs -> 4096-bit bus, 16 LTCs * 4 slices * 96 KiB = 6 MiB L2). */ + if(offset==0x22438){*value=8;return 0;} + if(offset==0x2243c||offset==0x12006c){*value=16;return 0;} + if(offset==0x21d38||offset==0x21c14||offset==0x21c00){*value=0;return 0;} + if(offset==0x17e480){*value=4U<<28;return 0;} + if(offset==0x14058c||offset==0x17e58c){*value=(4U<<16)|96U;return 0;} + if(offset==0x9a0590){*value=7;return 0;} + if(offset==0x10f590){*value=0xbadf0000U;return 0;} return -ERANGE; } /* System memory of the RM API (rmapi_node.c) DMA-mapped for the listed GPU: an allocation of more than one page is