]> xenbits.xensource.com Git - unikraft/unikraft.git/commitdiff
plat/kvm: Fix guest hang on `UKPLAT_HALT` during shutdown request
authorSergiu Moga <sergiu@unikraft.io>
Fri, 11 Aug 2023 17:51:08 +0000 (20:51 +0300)
committerUnikraft <monkey@unikraft.io>
Fri, 11 Aug 2023 21:59:54 +0000 (21:59 +0000)
As soon as
commit 170a8a4fb242 ("plat/kvm/shutdown.c: If on a `UEFI` system, rely on Runtime Services")
got merged guests would not finish on successful runs by exiting, but
instead by halting.

Although confusing, the intention was to use `UKPLAT_HALT` for a
graceful shutdown instead of a `cpu_halt` as it acts now.

Therefore, fix this by deleting the `UKPLAT_HALT` `case` from the
`switch` statement.

Signed-off-by: Sergiu Moga <sergiu@unikraft.io>
Reviewed-by: Alexander Jung <alex@unikraft.io>
Reviewed-by: Simon Kuenzer <simon@unikraft.io>
Approved-by: Simon Kuenzer <simon@unikraft.io>
Tested-by: Unikraft CI <monkey@unikraft.io>
GitHub-Closes: #1039

plat/kvm/shutdown.c

index a4f7a972528e7135101b27066617e59f5cbe7825..c0e13cb1be73420cf5fc484bc1e16098c501e662 100644 (file)
@@ -59,10 +59,6 @@ void ukplat_terminate(enum ukplat_gstate request)
        uk_pr_info("Unikraft halted\n");
 
        switch (request) {
-       case UKPLAT_HALT:
-               cpu_halt();
-
-               break;
        case UKPLAT_RESTART:
                uk_efi_rs_reset_system(UK_EFI_RESET_COLD);