You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(aarch64): support external graceful shutdown via SendCtrlAltDel
Until now `SendCtrlAltDel` was rejected with a 400 on aarch64 and there was
no way to request a graceful shutdown of a microVM from the host. Fixes#2046.
Add a minimal PL061 GPIO controller as an aarch64 MMIO device and describe a
`gpio-keys` power button (KEY_POWER) in the FDT. `SendCtrlAltDel` is reused: on
x86_64 it still injects CTRL+ALT+DEL through the i8042 device; on aarch64 it
drives a short press/release pulse on the virtual power button. A guest with the
standard gpio-keys driver and a power-key consumer (e.g. systemd-logind, which
defaults to HandlePowerKey=poweroff) then shuts down cleanly and Firecracker
exits on the resulting KVM_SYSTEM_EVENT_SHUTDOWN.
Details:
- The PL061 SPI is declared edge-triggered to match Firecracker's plain irqfd
injection (no resample fd). A level-high line would never be de-asserted and
the GIC would re-fire it after the guest EOIs, storming the host.
- The PL061 register state is saved and restored across snapshots, so the power
button keeps working on a restored microVM. The snapshot version is bumped to
11.0.0 accordingly.
- The press/release pulse runs synchronously so the two edges stay atomic with
respect to other API actions; a concurrent snapshot can never capture the
button half-pressed.
Validated on aarch64 + KVM hardware: KEY_POWER is delivered to the guest with no
interrupt storm, systemd-logind powers the VM off automatically, and the path
also works after a snapshot/restore cycle.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: 14sea <wanhuaning@gmail.com>
0 commit comments