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

Guest reboot support #157

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open

Guest reboot support #157

wants to merge 6 commits into from

Conversation

josecm
Copy link
Member

@josecm josecm commented Jul 9, 2024

This PR adds support for VM reset. Guest can request a VM reset by issuing standard system calls, i.e., PSCI_RESET and SBI_SRST, for arm and risc-v systems, respectively.

It starts by adding support for allowing CPUs to go idle in the middle of an interrupt. This is necessary because CPUs will receive an IPI from the CPU that emitted the reset and will be required to go idle if they are not the VM's primary CPU.

Besides the generic VM rest logic and the arch-specific calls for requesting a reset, this PR adds arch-specific logic to reset the virtual interrupt controllers.

josecm added 6 commits July 9, 2024 15:32
This allows a cpu to enter idle state after hanlding an interrupt, while
leaving the interrupt in the correct state. If this was not carried out,
the cpu might not wake up on another interrupt because it is still
handling the current interrupt or the same interrupt might not be
triggered again.

Signed-off-by: Jose Martins <[email protected]>
Signed-off-by: Jose Martins <[email protected]>
@josecm josecm force-pushed the feat/guest_reboot branch from 89cbc22 to 6a216f4 Compare July 9, 2024 14:33
@DavidMCerdeira DavidMCerdeira self-assigned this Jul 9, 2024
@DavidMCerdeira DavidMCerdeira force-pushed the main branch 2 times, most recently from 59a293c to 8837766 Compare July 16, 2024 10:47
@danielRep danielRep marked this pull request as ready for review September 5, 2024 10:12
Copy link
Member

@danielRep danielRep left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just tested with the baremetal demo and it seems to be correctly working for qemu-aarch64-virt, but for qemu-riscv64-virt bao crashes after some reboot iterations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants