On 03.09.2024 16:19, Andrew Cooper wrote: > SBI has an API for shutdown so wire it up. However, the spec does allow the > call not to be implemented, so we have to cope with the call return returning. > > There is a reboot-capable SBI extention, but in the short term route route > machine_restart() into machine_halt(). > > Then, use use machine_halt() rather than an infinite loop at the end of > start_xen(). This avoids the Qemu smoke test needing to wait for the full > timeout in order to succeed. > > Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com>
Acked-by: Jan Beulich <jbeul...@suse.com> ideally with ... > --- /dev/null > +++ b/xen/arch/riscv/shutdown.c > @@ -0,0 +1,25 @@ > +/* SPDX-License-Identifier: GPL-2.0-or-later */ > +#include <xen/shutdown.h> > + > +#include <asm/sbi.h> > + > +void machine_halt(void) > +{ > + sbi_shutdown(); > + > + for ( ;; ) > + asm volatile ("wfi"); ... the missing blanks added here, as you move that loop around. Jan