Commit 8eb71fe
committed
rebinding: populate UTF-8 reason string on SPDM error paths
The non-SPDM rebinding_old_prepare / rebinding_new_prepare populate the
VMM ReportStatus reason buffer (data: &mut Vec<u8>) on transport
failures, gated by #[cfg(feature = "vmcall-raw")]. The SPDM-featured
counterparts had the parameter spelled _data and never wrote to it, so
GHCI 1.5 ReportStatus (p. 47-48, Tables 3-55/3-56) had no diagnostic
payload when an SPDM rebind failed.
Mirror the non-SPDM pattern at the three SPDM error sites:
* spdm_requester / spdm_responder transport setup failure
* with_timeout timeout error around spdm_requester_rebind_old /
spdm_responder_rebind_new
* the SPDM rebind operation itself
Each .map_err closure now pushes a one-line UTF-8 reason string
(operation name, MigrationResult variant, migration ID in hex) into
data, gated by #[cfg(feature = "vmcall-raw")] to match the non-SPDM
RA-TLS arms. log::error! calls are preserved verbatim.
No behavior change with vmcall-raw off: data is unused (same warning as
the existing non-SPDM functions on that configuration).
Signed-off-by: Stanislaw Grams <stanislaw.grams@intel.com>1 parent 089a69e commit 8eb71fe
1 file changed
Lines changed: 50 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
177 | 177 | | |
178 | 178 | | |
179 | 179 | | |
180 | | - | |
| 180 | + | |
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
187 | 195 | | |
188 | 196 | | |
189 | 197 | | |
| |||
201 | 209 | | |
202 | 210 | | |
203 | 211 | | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
204 | 220 | | |
205 | 221 | | |
206 | 222 | | |
207 | 223 | | |
208 | 224 | | |
209 | 225 | | |
210 | 226 | | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
211 | 235 | | |
212 | 236 | | |
213 | 237 | | |
| |||
223 | 247 | | |
224 | 248 | | |
225 | 249 | | |
226 | | - | |
| 250 | + | |
227 | 251 | | |
228 | 252 | | |
229 | 253 | | |
230 | 254 | | |
231 | 255 | | |
232 | 256 | | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
233 | 265 | | |
234 | 266 | | |
235 | 267 | | |
| |||
248 | 280 | | |
249 | 281 | | |
250 | 282 | | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
251 | 291 | | |
252 | 292 | | |
253 | 293 | | |
254 | 294 | | |
255 | 295 | | |
256 | 296 | | |
257 | 297 | | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
258 | 306 | | |
259 | 307 | | |
260 | 308 | | |
| |||
0 commit comments