From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Huth Subject: Re: [kvm-unit-tests PATCH v2 14/14] powerpc/ppc64: HACK: make a fake debug-exit Date: Fri, 12 Feb 2016 19:07:12 +0100 Message-ID: <56BE1F50.6030504@redhat.com> References: <1454957594-30601-1-git-send-email-drjones@redhat.com> <1454957594-30601-15-git-send-email-drjones@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: dgibson@redhat.com, david@gibson.dropbear.id.au, agraf@suse.de, lvivier@redhat.com, pbonzini@redhat.com To: Andrew Jones , kvm@vger.kernel.org, kvm-ppc@vger.kernel.org Return-path: Received: from mx1.redhat.com ([209.132.183.28]:38033 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751325AbcBLSHQ (ORCPT ); Fri, 12 Feb 2016 13:07:16 -0500 In-Reply-To: <1454957594-30601-15-git-send-email-drjones@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 08.02.2016 19:53, Andrew Jones wrote: > We should use a QEMU debug-exit device like chr-testdev, but for > now we just fake things by outputting the exit code (which we > parse later) and quitting with RTAS (which always exits with zero). > > (When we've got a real debug-exit working, then this patch can > be reverted.) > > Signed-off-by: Andrew Jones > --- > lib/powerpc/io.c | 4 ++++ > powerpc/run | 7 +++++-- > 2 files changed, 9 insertions(+), 2 deletions(-) Patch looks fine to me as an initial solution (and I'd also suggest to remove the "HACK" in the title, as Paolo already said). For a future improvement: Not sure, but there is a "ibm,os-term" RTAS call which "[...] is provided for the OS to indicate to the platform that it has terminated normal operation. A string of information is passed to the platform", according to LoPAPR chapter 7.3.9.1. Maybe that could be used to implement the debug-exit functionality? QEMU seems to already send a GUEST_PANIC_ACTION_PAUSE event in this case, but the parameter string is not taken into account yet... Thomas From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Huth Date: Fri, 12 Feb 2016 18:07:12 +0000 Subject: Re: [kvm-unit-tests PATCH v2 14/14] powerpc/ppc64: HACK: make a fake debug-exit Message-Id: <56BE1F50.6030504@redhat.com> List-Id: References: <1454957594-30601-1-git-send-email-drjones@redhat.com> <1454957594-30601-15-git-send-email-drjones@redhat.com> In-Reply-To: <1454957594-30601-15-git-send-email-drjones@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Andrew Jones , kvm@vger.kernel.org, kvm-ppc@vger.kernel.org Cc: dgibson@redhat.com, david@gibson.dropbear.id.au, agraf@suse.de, lvivier@redhat.com, pbonzini@redhat.com On 08.02.2016 19:53, Andrew Jones wrote: > We should use a QEMU debug-exit device like chr-testdev, but for > now we just fake things by outputting the exit code (which we > parse later) and quitting with RTAS (which always exits with zero). > > (When we've got a real debug-exit working, then this patch can > be reverted.) > > Signed-off-by: Andrew Jones > --- > lib/powerpc/io.c | 4 ++++ > powerpc/run | 7 +++++-- > 2 files changed, 9 insertions(+), 2 deletions(-) Patch looks fine to me as an initial solution (and I'd also suggest to remove the "HACK" in the title, as Paolo already said). For a future improvement: Not sure, but there is a "ibm,os-term" RTAS call which "[...] is provided for the OS to indicate to the platform that it has terminated normal operation. A string of information is passed to the platform", according to LoPAPR chapter 7.3.9.1. Maybe that could be used to implement the debug-exit functionality? QEMU seems to already send a GUEST_PANIC_ACTION_PAUSE event in this case, but the parameter string is not taken into account yet... Thomas