Commit f806f97
committed
efi: Implement reset_system for Cloud Hypervisor
The ResetSystem runtime service was intentionally left as a no-op
to force Linux to use ACPI for shutdown. However, Windows calls
ResetSystem(EfiResetShutdown) as its final shutdown step and does
not fall back to ACPI when the call returns. This causes the
Cloud Hypervisor process to hang indefinitely after Windows shuts
down.
Write the appropriate value to Cloud Hypervisor's shutdown I/O
port (0x600) based on the reset type:
- EfiResetShutdown: SLP_TYP=5 + SLP_EN (triggers VM exit)
- EfiResetCold/Warm: reboot value (triggers VM reset)
Linux guests are unaffected as they use ACPI directly.
Fixes: #422
Signed-off-by: CMGS <ilskdw@gmail.com>1 parent 286a40e commit f806f97
1 file changed
Lines changed: 29 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
199 | | - | |
200 | | - | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
201 | 228 | | |
202 | 229 | | |
203 | 230 | | |
| |||
0 commit comments