Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(vmm): exit the VMM on kbd reset #12

Merged
merged 1 commit into from
Apr 4, 2024

Conversation

Kuruyia
Copy link
Contributor

@Kuruyia Kuruyia commented Mar 31, 2024

What does this PR do?

Currently, when killing the init process, the VMM hangs because it is unable to handle the kernel trying to reboot the machine.

On an x86 PC platform, it is possible to reset the CPU by sending byte 0xFE to the keyboard controller command register. This is actually part of the emergency reboot procedure of the Linux kernel.

This adds a bit of code to handle such a write operation by exiting the VMM process.

Currently, when killing the `init` process, the VMM hangs because it is
unable to handle the kernel trying to reboot the machine.

On an x86 PC platform, it is possible to reset the CPU by [sending byte
`0xFE` to the keyboard controller command register](https://wiki.osdev.org/%228042%22_PS/2_Controller#CPU_Reset).
This is actually part of the emergency reboot procedure of [the Linux kernel](https://elixir.bootlin.com/linux/v6.8.2/source/arch/x86/kernel/reboot.c#L627).

This adds a bit of code to handle such a write operation by exiting the
VMM process.

Signed-off-by: Kuruyia <[email protected]>
@Kuruyia Kuruyia added the enhancement New feature or request label Mar 31, 2024
@Kuruyia Kuruyia self-assigned this Mar 31, 2024
@Kuruyia Kuruyia requested review from a team and removed request for Hunh0w, charley04310, MurielParaire and thomas-mauran March 31, 2024 15:54
@Kuruyia Kuruyia merged commit 823743d into virt-do:main Apr 4, 2024
2 checks passed
@Kuruyia Kuruyia deleted the feat/guest-poweroff branch April 4, 2024 16:16
sea-gull-diana referenced this pull request in Mathias-Boulay/cloudlet Apr 13, 2024
Currently, when killing the `init` process, the VMM hangs because it is
unable to handle the kernel trying to reboot the machine.

On an x86 PC platform, it is possible to reset the CPU by [sending byte
`0xFE` to the keyboard controller command register](https://wiki.osdev.org/%228042%22_PS/2_Controller#CPU_Reset).
This is actually part of the emergency reboot procedure of [the Linux kernel](https://elixir.bootlin.com/linux/v6.8.2/source/arch/x86/kernel/reboot.c#L627).

This adds a bit of code to handle such a write operation by exiting the
VMM process.

Signed-off-by: Kuruyia <[email protected]>
sea-gull-diana referenced this pull request in Mathias-Boulay/cloudlet Apr 15, 2024
Currently, when killing the `init` process, the VMM hangs because it is
unable to handle the kernel trying to reboot the machine.

On an x86 PC platform, it is possible to reset the CPU by [sending byte
`0xFE` to the keyboard controller command register](https://wiki.osdev.org/%228042%22_PS/2_Controller#CPU_Reset).
This is actually part of the emergency reboot procedure of [the Linux kernel](https://elixir.bootlin.com/linux/v6.8.2/source/arch/x86/kernel/reboot.c#L627).

This adds a bit of code to handle such a write operation by exiting the
VMM process.

Signed-off-by: Kuruyia <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants