Commit fa4ae42
committed
virt/coco/sev-guest: Convert the sw_exit_info_2 checking to a switch-case
snp_issue_guest_request() checks the value returned by the hypervisor in
sw_exit_info_2 and returns a different error depending on it.
Convert those checks into a switch-case to make it more readable when
more error values are going to be checked in the future.
No functional changes.
Signed-off-by: Borislav Petkov (AMD) <[email protected]>
Reviewed-by: Tom Lendacky <[email protected]>
Link: https://lore.kernel.org/r/[email protected]1 parent d25bae7 commit fa4ae42
1 file changed
Lines changed: 11 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2210 | 2210 | | |
2211 | 2211 | | |
2212 | 2212 | | |
2213 | | - | |
| 2213 | + | |
| 2214 | + | |
| 2215 | + | |
| 2216 | + | |
| 2217 | + | |
2214 | 2218 | | |
2215 | | - | |
2216 | | - | |
| 2219 | + | |
2217 | 2220 | | |
2218 | 2221 | | |
2219 | | - | |
2220 | | - | |
| 2222 | + | |
2221 | 2223 | | |
| 2224 | + | |
| 2225 | + | |
| 2226 | + | |
| 2227 | + | |
2222 | 2228 | | |
2223 | 2229 | | |
2224 | 2230 | | |
| |||
0 commit comments