github.com/MerlinKodo/gvisor@v0.0.0-20231110090155-957f62ecf90e/pkg/sentry/devices/nvproxy/nvproxy_state_autogen.go (about) 1 // automatically generated by stateify. 2 3 package nvproxy 4 5 import ( 6 "github.com/MerlinKodo/gvisor/pkg/state" 7 ) 8 9 func (dev *frontendDevice) StateTypeName() string { 10 return "pkg/sentry/devices/nvproxy.frontendDevice" 11 } 12 13 func (dev *frontendDevice) StateFields() []string { 14 return []string{ 15 "nvp", 16 "minor", 17 } 18 } 19 20 func (dev *frontendDevice) beforeSave() {} 21 22 // +checklocksignore 23 func (dev *frontendDevice) StateSave(stateSinkObject state.Sink) { 24 dev.beforeSave() 25 stateSinkObject.Save(0, &dev.nvp) 26 stateSinkObject.Save(1, &dev.minor) 27 } 28 29 func (dev *frontendDevice) afterLoad() {} 30 31 // +checklocksignore 32 func (dev *frontendDevice) StateLoad(stateSourceObject state.Source) { 33 stateSourceObject.Load(0, &dev.nvp) 34 stateSourceObject.Load(1, &dev.minor) 35 } 36 37 func (n *nvproxy) StateTypeName() string { 38 return "pkg/sentry/devices/nvproxy.nvproxy" 39 } 40 41 func (n *nvproxy) StateFields() []string { 42 return []string{ 43 "objsLive", 44 } 45 } 46 47 func (n *nvproxy) beforeSave() {} 48 49 // +checklocksignore 50 func (n *nvproxy) StateSave(stateSinkObject state.Sink) { 51 n.beforeSave() 52 stateSinkObject.Save(0, &n.objsLive) 53 } 54 55 func (n *nvproxy) afterLoad() {} 56 57 // +checklocksignore 58 func (n *nvproxy) StateLoad(stateSourceObject state.Source) { 59 stateSourceObject.Load(0, &n.objsLive) 60 } 61 62 func (o *object) StateTypeName() string { 63 return "pkg/sentry/devices/nvproxy.object" 64 } 65 66 func (o *object) StateFields() []string { 67 return []string{ 68 "impl", 69 } 70 } 71 72 func (o *object) beforeSave() {} 73 74 // +checklocksignore 75 func (o *object) StateSave(stateSinkObject state.Sink) { 76 o.beforeSave() 77 stateSinkObject.Save(0, &o.impl) 78 } 79 80 func (o *object) afterLoad() {} 81 82 // +checklocksignore 83 func (o *object) StateLoad(stateSourceObject state.Source) { 84 stateSourceObject.Load(0, &o.impl) 85 } 86 87 func (o *osDescMem) StateTypeName() string { 88 return "pkg/sentry/devices/nvproxy.osDescMem" 89 } 90 91 func (o *osDescMem) StateFields() []string { 92 return []string{ 93 "object", 94 "pinnedRanges", 95 } 96 } 97 98 func (o *osDescMem) beforeSave() {} 99 100 // +checklocksignore 101 func (o *osDescMem) StateSave(stateSinkObject state.Sink) { 102 o.beforeSave() 103 stateSinkObject.Save(0, &o.object) 104 stateSinkObject.Save(1, &o.pinnedRanges) 105 } 106 107 func (o *osDescMem) afterLoad() {} 108 109 // +checklocksignore 110 func (o *osDescMem) StateLoad(stateSourceObject state.Source) { 111 stateSourceObject.Load(0, &o.object) 112 stateSourceObject.Load(1, &o.pinnedRanges) 113 } 114 115 func (dev *uvmDevice) StateTypeName() string { 116 return "pkg/sentry/devices/nvproxy.uvmDevice" 117 } 118 119 func (dev *uvmDevice) StateFields() []string { 120 return []string{ 121 "nvp", 122 } 123 } 124 125 func (dev *uvmDevice) beforeSave() {} 126 127 // +checklocksignore 128 func (dev *uvmDevice) StateSave(stateSinkObject state.Sink) { 129 dev.beforeSave() 130 stateSinkObject.Save(0, &dev.nvp) 131 } 132 133 func (dev *uvmDevice) afterLoad() {} 134 135 // +checklocksignore 136 func (dev *uvmDevice) StateLoad(stateSourceObject state.Source) { 137 stateSourceObject.Load(0, &dev.nvp) 138 } 139 140 func init() { 141 state.Register((*frontendDevice)(nil)) 142 state.Register((*nvproxy)(nil)) 143 state.Register((*object)(nil)) 144 state.Register((*osDescMem)(nil)) 145 state.Register((*uvmDevice)(nil)) 146 }