Skip to content

Commit

Permalink
spapr: Use SHUTDOWN_CAUSE_SUBSYSTEM_RESET for CAS reboots
Browse files Browse the repository at this point in the history
The sPAPR platform includes feature negotiation between the guest and
platform.  That sometimes requires reconfiguring the virtual hardware, and
in some cases that is a complex enough process that we trigger a system
reset to handle it.  That interacts badly with -no-reboot - we trigger the
reboot, -no-reboot means we exit and so the guest never gets to try again.

Eventually we want to get rid of CAS reboots entirely, since they're odd
and irritating for the user.  But in the meantime we can fix the -no-reboot
problem by using SHUTDOWN_CAUSE_SUBSYSTEM_RESET which ignores -no-reboot
and seems to be designed for this sort of faux-reset for internal purposes
only.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
  • Loading branch information
dgibson committed Aug 28, 2019
1 parent 289af4a commit 9146206
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hw/ppc/spapr_hcall.c
Expand Up @@ -1811,7 +1811,7 @@ static target_ulong h_client_architecture_support(PowerPCCPU *cpu,
spapr_ovec_cleanup(ov5_updates);

if (spapr->cas_reboot) {
qemu_system_reset_request(SHUTDOWN_CAUSE_GUEST_RESET);
qemu_system_reset_request(SHUTDOWN_CAUSE_SUBSYSTEM_RESET);
}

return H_SUCCESS;
Expand Down

0 comments on commit 9146206

Please sign in to comment.