@@ -66,15 +66,6 @@ type IoctlRegisterFD struct {
66
66
CtlFD int32
67
67
}
68
68
69
- // GetStatus implements HasStatus.GetStatus.
70
- func (p * IoctlRegisterFD ) GetStatus () uint32 {
71
- // nv_ioctl_register_fd_t doesn't have a NvStatus field. Any failures are
72
- // returned from src/nvidia/arch/nvalloc/unix/src/escape.c:nvidia_ioctl()'s
73
- // NV_ESC_REGISTER_FD case to kernel-open/nvidia/nv.c:nvidia_ioctl()'s
74
- // default case, which converts it to an ioctl(2) syscall error.
75
- return NV_OK
76
- }
77
-
78
69
// IoctlAllocOSEvent is the parameter type for NV_ESC_ALLOC_OS_EVENT.
79
70
//
80
71
// +marshal
@@ -100,6 +91,11 @@ func (p *IoctlAllocOSEvent) GetStatus() uint32 {
100
91
return p .Status
101
92
}
102
93
94
+ // SetStatus implements HasStatus.SetStatus.
95
+ func (p * IoctlAllocOSEvent ) SetStatus (status uint32 ) {
96
+ p .Status = status
97
+ }
98
+
103
99
// IoctlFreeOSEvent is the parameter type for NV_ESC_FREE_OS_EVENT.
104
100
//
105
101
// +marshal
@@ -125,6 +121,11 @@ func (p *IoctlFreeOSEvent) GetStatus() uint32 {
125
121
return p .Status
126
122
}
127
123
124
+ // SetStatus implements HasStatus.SetStatus.
125
+ func (p * IoctlFreeOSEvent ) SetStatus (status uint32 ) {
126
+ p .Status = status
127
+ }
128
+
128
129
// RMAPIVersion is the parameter type for NV_ESC_CHECK_VERSION_STR.
129
130
//
130
131
// +marshal
@@ -134,29 +135,13 @@ type RMAPIVersion struct {
134
135
VersionString [64 ]byte
135
136
}
136
137
137
- // GetStatus implements HasStatus.GetStatus.
138
- func (p * RMAPIVersion ) GetStatus () uint32 {
139
- // nv_ioctl_rm_api_version_t doesn't have a NvStatus field. The driver
140
- // translates the rmStatus to an ioctl(2) failure. See
141
- // kernel-open/nvidia/nv.c:nvidia_ioctl() => case NV_ESC_CHECK_VERSION_STR.
142
- return NV_OK
143
- }
144
-
145
138
// IoctlSysParams is the parameter type for NV_ESC_SYS_PARAMS.
146
139
//
147
140
// +marshal
148
141
type IoctlSysParams struct {
149
142
MemblockSize uint64
150
143
}
151
144
152
- // GetStatus implements HasStatus.GetStatus.
153
- func (p * IoctlSysParams ) GetStatus () uint32 {
154
- // nv_ioctl_sys_params_t doesn't have a NvStatus field. The driver fails the
155
- // ioctl(2) syscall in case of any failure. See
156
- // kernel-open/nvidia/nv.c:nvidia_ioctl() => case NV_ESC_SYS_PARAMS.
157
- return NV_OK
158
- }
159
-
160
145
// IoctlWaitOpenComplete is the parameter type for NV_ESC_WAIT_OPEN_COMPLETE.
161
146
//
162
147
// +marshal
@@ -170,6 +155,11 @@ func (p *IoctlWaitOpenComplete) GetStatus() uint32 {
170
155
return p .AdapterStatus
171
156
}
172
157
158
+ // SetStatus implements HasStatus.SetStatus.
159
+ func (p * IoctlWaitOpenComplete ) SetStatus (status uint32 ) {
160
+ p .AdapterStatus = status
161
+ }
162
+
173
163
// IoctlNVOS02ParametersWithFD is the parameter type for NV_ESC_RM_ALLOC_MEMORY.
174
164
//
175
165
// +marshal
@@ -184,6 +174,11 @@ func (p *IoctlNVOS02ParametersWithFD) GetStatus() uint32 {
184
174
return p .Params .Status
185
175
}
186
176
177
+ // SetStatus implements HasStatus.SetStatus.
178
+ func (p * IoctlNVOS02ParametersWithFD ) SetStatus (status uint32 ) {
179
+ p .Params .Status = status
180
+ }
181
+
187
182
// +marshal
188
183
type NVOS02_PARAMETERS struct {
189
184
HRoot Handle
@@ -224,6 +219,11 @@ func (p *NVOS00_PARAMETERS) GetStatus() uint32 {
224
219
return p .Status
225
220
}
226
221
222
+ // SetStatus implements HasStatus.SetStatus.
223
+ func (p * NVOS00_PARAMETERS ) SetStatus (status uint32 ) {
224
+ p .Status = status
225
+ }
226
+
227
227
// RmAllocParamType should be implemented by all possible parameter types for
228
228
// NV_ESC_RM_ALLOC.
229
229
type RmAllocParamType interface {
@@ -308,11 +308,16 @@ func (n *NVOS21_PARAMETERS) ToOS64() NVOS64_PARAMETERS {
308
308
}
309
309
}
310
310
311
- // GetStatus implements RmAllocParamType .GetStatus.
311
+ // GetStatus implements HasStatus .GetStatus.
312
312
func (n * NVOS21_PARAMETERS ) GetStatus () uint32 {
313
313
return n .Status
314
314
}
315
315
316
+ // SetStatus implements HasStatus.SetStatus.
317
+ func (n * NVOS21_PARAMETERS ) SetStatus (status uint32 ) {
318
+ n .Status = status
319
+ }
320
+
316
321
// NVOS55_PARAMETERS is the parameter type for NV_ESC_RM_DUP_OBJECT.
317
322
//
318
323
// +marshal
@@ -331,6 +336,11 @@ func (n *NVOS55_PARAMETERS) GetStatus() uint32 {
331
336
return n .Status
332
337
}
333
338
339
+ // SetStatus implements HasStatus.SetStatus.
340
+ func (n * NVOS55_PARAMETERS ) SetStatus (status uint32 ) {
341
+ n .Status = status
342
+ }
343
+
334
344
// NVOS57_PARAMETERS is the parameter type for NV_ESC_RM_SHARE.
335
345
//
336
346
// +marshal
@@ -346,6 +356,11 @@ func (n *NVOS57_PARAMETERS) GetStatus() uint32 {
346
356
return n .Status
347
357
}
348
358
359
+ // SetStatus implements HasStatus.SetStatus.
360
+ func (n * NVOS57_PARAMETERS ) SetStatus (status uint32 ) {
361
+ n .Status = status
362
+ }
363
+
349
364
// NVOS30_PARAMETERS is the parameter type for NV_ESC_RM_IDLE_CHANNELS.
350
365
//
351
366
// +marshal
@@ -370,6 +385,11 @@ func (n *NVOS30_PARAMETERS) GetStatus() uint32 {
370
385
return n .Status
371
386
}
372
387
388
+ // SetStatus implements HasStatus.SetStatus.
389
+ func (n * NVOS30_PARAMETERS ) SetStatus (status uint32 ) {
390
+ n .Status = status
391
+ }
392
+
373
393
// NVOS32_PARAMETERS is the parameter type for NV_ESC_RM_VID_HEAP_CONTROL.
374
394
//
375
395
// +marshal
@@ -391,6 +411,11 @@ func (n *NVOS32_PARAMETERS) GetStatus() uint32 {
391
411
return n .Status
392
412
}
393
413
414
+ // SetStatus implements HasStatus.SetStatus.
415
+ func (n * NVOS32_PARAMETERS ) SetStatus (status uint32 ) {
416
+ n .Status = status
417
+ }
418
+
394
419
// Possible values for NVOS32Parameters.Function:
395
420
const (
396
421
NVOS32_FUNCTION_ALLOC_SIZE = 2
@@ -457,6 +482,11 @@ func (p *IoctlNVOS33ParametersWithFD) GetStatus() uint32 {
457
482
return p .Params .Status
458
483
}
459
484
485
+ // SetStatus implements HasStatus.SetStatus.
486
+ func (p * IoctlNVOS33ParametersWithFD ) SetStatus (status uint32 ) {
487
+ p .Params .Status = status
488
+ }
489
+
460
490
// +marshal
461
491
type NVOS33_PARAMETERS struct {
462
492
HClient Handle
@@ -500,6 +530,11 @@ func (n *NVOS34_PARAMETERS) GetStatus() uint32 {
500
530
return n .Status
501
531
}
502
532
533
+ // SetStatus implements HasStatus.SetStatus.
534
+ func (n * NVOS34_PARAMETERS ) SetStatus (status uint32 ) {
535
+ n .Status = status
536
+ }
537
+
503
538
// NVOS39_PARAMETERS is the parameter type for NV_ESC_RM_ALLOC_CONTEXT_DMA2.
504
539
//
505
540
// +marshal
@@ -523,6 +558,11 @@ func (n *NVOS39_PARAMETERS) GetStatus() uint32 {
523
558
return n .Status
524
559
}
525
560
561
+ // SetStatus implements HasStatus.SetStatus.
562
+ func (n * NVOS39_PARAMETERS ) SetStatus (status uint32 ) {
563
+ n .Status = status
564
+ }
565
+
526
566
// NVOS46_PARAMETERS is the parameter type for NV_ESC_RM_MAP_MEMORY_DMA.
527
567
//
528
568
// +marshal
@@ -545,6 +585,11 @@ func (n *NVOS46_PARAMETERS) GetStatus() uint32 {
545
585
return n .Status
546
586
}
547
587
588
+ // SetStatus implements HasStatus.SetStatus.
589
+ func (n * NVOS46_PARAMETERS ) SetStatus (status uint32 ) {
590
+ n .Status = status
591
+ }
592
+
548
593
// NVOS47_PARAMETERS is the parameter type for NV_ESC_RM_UNMAP_MEMORY_DMA.
549
594
//
550
595
// +marshal
@@ -565,6 +610,11 @@ func (n *NVOS47_PARAMETERS) GetStatus() uint32 {
565
610
return n .Status
566
611
}
567
612
613
+ // SetStatus implements HasStatus.SetStatus.
614
+ func (n * NVOS47_PARAMETERS ) SetStatus (status uint32 ) {
615
+ n .Status = status
616
+ }
617
+
568
618
// NVOS47_PARAMETERS_V550 is the updated version of NVOS47_PARAMETERS since
569
619
// 550.54.04.
570
620
//
@@ -587,6 +637,11 @@ func (n *NVOS47_PARAMETERS_V550) GetStatus() uint32 {
587
637
return n .Status
588
638
}
589
639
640
+ // SetStatus implements HasStatus.SetStatus.
641
+ func (n * NVOS47_PARAMETERS_V550 ) SetStatus (status uint32 ) {
642
+ n .Status = status
643
+ }
644
+
590
645
// NVOS54_PARAMETERS is the parameter type for NV_ESC_RM_CONTROL.
591
646
//
592
647
// +marshal
@@ -605,6 +660,11 @@ func (n *NVOS54_PARAMETERS) GetStatus() uint32 {
605
660
return n .Status
606
661
}
607
662
663
+ // SetStatus implements HasStatus.SetStatus.
664
+ func (n * NVOS54_PARAMETERS ) SetStatus (status uint32 ) {
665
+ n .Status = status
666
+ }
667
+
608
668
// NVOS56_PARAMETERS is the parameter type for NV_ESC_RM_UPDATE_DEVICE_MAPPING_INFO.
609
669
//
610
670
// +marshal
@@ -624,6 +684,11 @@ func (n *NVOS56_PARAMETERS) GetStatus() uint32 {
624
684
return n .Status
625
685
}
626
686
687
+ // SetStatus implements HasStatus.SetStatus.
688
+ func (n * NVOS56_PARAMETERS ) SetStatus (status uint32 ) {
689
+ n .Status = status
690
+ }
691
+
627
692
// NVOS64_PARAMETERS is one possible parameter type for NV_ESC_RM_ALLOC.
628
693
//
629
694
// +marshal
@@ -668,11 +733,16 @@ func (n *NVOS64_PARAMETERS) FromOS64(other NVOS64_PARAMETERS) { *n = other }
668
733
// ToOS64 implements RmAllocParamType.ToOS64.
669
734
func (n * NVOS64_PARAMETERS ) ToOS64 () NVOS64_PARAMETERS { return * n }
670
735
671
- // GetStatus implements RmAllocParamType .GetStatus.
736
+ // GetStatus implements HasStatus .GetStatus.
672
737
func (n * NVOS64_PARAMETERS ) GetStatus () uint32 {
673
738
return n .Status
674
739
}
675
740
741
+ // SetStatus implements HasStatus.SetStatus.
742
+ func (n * NVOS64_PARAMETERS ) SetStatus (status uint32 ) {
743
+ n .Status = status
744
+ }
745
+
676
746
// HasFrontendFD is a type constraint for parameter structs containing a
677
747
// frontend FD field. This is necessary because, as of this writing (Go 1.20),
678
748
// there is no way to enable field access using a Go type constraint.
0 commit comments