The script runs with set -e, so if QEMU fails, we never restore Ctrl-C remapping to Ctrl-].
For example, this happens all the time when we run scripts/test-in-svsm.sh because QEMU exits with a value other than 0 (perhaps due to exit via isa-debug-exit).
To solve it, set a handler to re-install them when the script exits, also save the original values to restore exactly the initial configuration.
The script runs with
set -e
, so if QEMU fails, we never restore Ctrl-C remapping to Ctrl-].For example, this happens all the time when we run
scripts/test-in-svsm.sh
because QEMU exits with a value other than 0 (perhaps due to exit via isa-debug-exit).To solve it, set a handler to re-install them when the script exits, also save the original values to restore exactly the initial configuration.