From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Huth Subject: Re: [kvm-unit-tests PATCH] powerpc: Fix endless loop that occurs without a device tree Date: Tue, 30 May 2017 18:13:56 +0200 Message-ID: <2d7b5b2e-3ea6-1203-9fdd-2d2ac047f159@redhat.com> References: <1496156844-29196-1-git-send-email-thuth@redhat.com> <95e3bc86-10a7-8c4e-94d7-dee63c67be2d@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: rkrcmar@redhat.com, lvivier@redhat.com, kvm-ppc@vger.kernel.org To: Paolo Bonzini , kvm@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:36846 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750733AbdE3QOI (ORCPT ); Tue, 30 May 2017 12:14:08 -0400 In-Reply-To: <95e3bc86-10a7-8c4e-94d7-dee63c67be2d@redhat.com> Content-Language: en-US Sender: kvm-owner@vger.kernel.org List-ID: 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