From: Thomas Huth Date: Tue, 30 May 2017 16:13:56 +0000 Subject: Re: [kvm-unit-tests PATCH] powerpc: Fix endless loop that occurs without a device tree Message-Id: <2d7b5b2e-3ea6-1203-9fdd-2d2ac047f159@redhat.com> List-Id: References: <1496156844-29196-1-git-send-email-thuth@redhat.com> <95e3bc86-10a7-8c4e-94d7-dee63c67be2d@redhat.com> In-Reply-To: <95e3bc86-10a7-8c4e-94d7-dee63c67be2d@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Paolo Bonzini , kvm@vger.kernel.org Cc: rkrcmar@redhat.com, lvivier@redhat.com, kvm-ppc@vger.kernel.org On 30.05.2017 17:19, Paolo Bonzini wrote: > > > On 30/05/2017 17:07, Thomas Huth wrote: >> , NULL, -1, -1); >> + int token, ret; >> + >> + token = rtas_token("power-off"); >> + if (token < 0) { >> + puts("RTAS power-off not available\n"); >> + return; >> + } > > Should this do some kind of infinite loop (Linux arch/x86 has play_dead > which does cli;hlt, not sure if there's something similar for sPAPR)? The exit() function in lib/powerpc/io.c already calls halt() after trying to run rtas_power_off() ... I think that should be enough here. Thomas