From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-17.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 20A0EC433E9 for ; Thu, 4 Mar 2021 12:29:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C97B764F2C for ; Thu, 4 Mar 2021 12:29:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240487AbhCDM2d (ORCPT ); Thu, 4 Mar 2021 07:28:33 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:55262 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240544AbhCDM2W (ORCPT ); Thu, 4 Mar 2021 07:28:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1614860816; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GV+/hvLdgVZKvT1Z0TKqGD9Co1FMVPmtvKNuz0pZAyQ=; b=C4sCsEaoH+Zr8uAwnFXes5xfG0YDst/MFKG9sp/UqkEJ5LBfp/XVOAY/z+tEC4y9CT6TM7 52q4/0LtiKWLXybk60EaTuBTO2RyKrt03JnCkgNQ1UOBeltPrER3EK6EuifvaCgGO34AP+ rHVxbSE+vcrw1dCfHcK4s/bk6N9eMHs= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-557-liIo97nSM8uWX7TMKGzUvA-1; Thu, 04 Mar 2021 07:26:55 -0500 X-MC-Unique: liIo97nSM8uWX7TMKGzUvA-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A76F284B7D8; Thu, 4 Mar 2021 12:26:53 +0000 (UTC) Received: from thuth.remote.csb (ovpn-112-31.ams2.redhat.com [10.36.112.31]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3DA46100E114; Thu, 4 Mar 2021 12:26:48 +0000 (UTC) Subject: Re: [kvm-unit-tests PATCH v3 6/7] s390x: Move diag308_load_reset to stack saving To: Janosch Frank , kvm@vger.kernel.org Cc: linux-s390@vger.kernel.org, imbrenda@linux.ibm.com, pmorel@linux.ibm.com, david@redhat.com References: <20210222085756.14396-1-frankja@linux.ibm.com> <20210222085756.14396-7-frankja@linux.ibm.com> From: Thomas Huth Message-ID: Date: Thu, 4 Mar 2021 13:26:47 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: <20210222085756.14396-7-frankja@linux.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Precedence: bulk List-ID: X-Mailing-List: linux-s390@vger.kernel.org On 22/02/2021 09.57, Janosch Frank wrote: > By moving the last user of SAVE/RESTORE_REGS to the macros that use > the stack we can finally remove these macros. > > Signed-off-by: Janosch Frank > Reviewed-by: Claudio Imbrenda > Reviewed-by: Pierre Morel > --- > s390x/cpu.S | 6 ++++-- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/s390x/cpu.S b/s390x/cpu.S > index 5267f029..e2ad56c8 100644 > --- a/s390x/cpu.S > +++ b/s390x/cpu.S > @@ -18,7 +18,7 @@ > */ > .globl diag308_load_reset > diag308_load_reset: > - SAVE_REGS > + SAVE_REGS_STACK > /* Backup current PSW mask, as we have to restore it on success */ > epsw %r0, %r1 > st %r0, GEN_LC_SW_INT_PSW > @@ -31,6 +31,7 @@ diag308_load_reset: > ogr %r0, %r1 > /* Store it at the reset PSW location (real 0x0) */ > stg %r0, 0 > + stg %r15, GEN_LC_SW_INT_GRS + 15 * 8 > /* Do the reset */ > diag %r0,%r2,0x308 > /* Failure path */ > @@ -40,7 +41,8 @@ diag308_load_reset: > /* load a cr0 that has the AFP control bit which enables all FPRs */ > 0: larl %r1, initial_cr0 > lctlg %c0, %c0, 0(%r1) > - RESTORE_REGS > + lg %r15, GEN_LC_SW_INT_GRS + 15 * 8 > + RESTORE_REGS_STACK > lhi %r2, 1 > larl %r0, 1f > stg %r0, GEN_LC_SW_INT_PSW + 8 > Reviewed-by: Thomas Huth