Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp771853imm; Fri, 17 Aug 2018 06:28:34 -0700 (PDT) X-Google-Smtp-Source: AA+uWPxjfmAHBNs2oDT6AMikXfKbdFPCWfQB7yiUR2Ld0f0vhwhU77gCFprBog0MotdjWFQtwFvq X-Received: by 2002:a63:4d06:: with SMTP id a6-v6mr32657909pgb.408.1534512514660; Fri, 17 Aug 2018 06:28:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534512514; cv=none; d=google.com; s=arc-20160816; b=GsEx8BvrIwMnX7rPoLkooL3scBnbFX8yMkp26+9lz4z45ROfegjlnD46kg0yOvWELA VE4GMdEg3uqSgZVGH4U+4X88kJqpDB9fuVAwbGwllb6JNzCFA6A1iwjf3EfXqrQBJiY0 cyRyQ0IE8dpLOPOUIMHv7LTe1/P9cJXKxwZI61vQ///RuzY1GBJ5+Q+zKoYbkl8Fljn2 SxOdpi7tK64fo5Q3Okk5G0U87lGHflYuD2B7YkklRWB8TLENZsLqOk1tz/q6hiSrjTi9 7YU0t1c+sag2v7wuF8x2OylU3xARIBM4k14EgumBlrqDTYCsymjs6dwT49VYiyr5DC9c Y+XQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date:arc-authentication-results; bh=earm1fP93EFCl0B3iUiaFKSBQiDGFvb8eQEwoyx7YY8=; b=m8DeGvoInUYdL74BVzckSR6l4xafXdrxUwMhQV6EHnaNYPv7qJCXAbDsjfHbAHXfUi 1dga3G+iY0KfTaPHPPK1Psa/A/Wy+dHglHQv9QBnOewk72uZ81H0fkF9ZElPbMakNJkU K92vLx1puob2Iy/xAY19PRsOHthOk0yFCS9ZjlUQwjBwfVCWFIfzrc74S0PSm8s5QWSQ y5KYeYM+eq4S9/PEBbdhb8M8M4FqLtUd9gWstqQv1rNKHbZB2MpHAiIoqCJzPNWNXYVU UciidI5OvrgQaQz9UR76QkESL5Ku5jhb8ZHQg6DlVsobNBKvjaDBedACUJ2fdf9mEXcu WjKg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y18-v6si2293340pll.82.2018.08.17.06.28.18; Fri, 17 Aug 2018 06:28:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727331AbeHQQaf (ORCPT + 99 others); Fri, 17 Aug 2018 12:30:35 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:55216 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726355AbeHQQae (ORCPT ); Fri, 17 Aug 2018 12:30:34 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 276B28182D3A; Fri, 17 Aug 2018 13:27:10 +0000 (UTC) Received: from gondolin (dhcp-192-222.str.redhat.com [10.33.192.222]) by smtp.corp.redhat.com (Postfix) with ESMTP id 497DA2026D6C; Fri, 17 Aug 2018 13:27:05 +0000 (UTC) Date: Fri, 17 Aug 2018 15:27:03 +0200 From: Cornelia Huck To: Tony Krowiak Cc: Tony Krowiak , linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, freude@de.ibm.com, schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com, borntraeger@de.ibm.com, kwankhede@nvidia.com, bjsdjshi@linux.vnet.ibm.com, pbonzini@redhat.com, alex.williamson@redhat.com, pmorel@linux.vnet.ibm.com, alifm@linux.vnet.ibm.com, mjrosato@linux.vnet.ibm.com, jjherne@linux.vnet.ibm.com, thuth@redhat.com, pasic@linux.vnet.ibm.com, berrange@redhat.com, fiuczy@linux.vnet.ibm.com, buendgen@de.ibm.com, frankja@linux.ibm.com Subject: Re: [PATCH v9 04/22] s390/zcrypt: Integrate ap_asm.h into include/asm/ap.h. Message-ID: <20180817152703.6de02166.cohuck@redhat.com> In-Reply-To: <49e99e8a-7de8-abde-6775-af11680db13d@linux.ibm.com> References: <1534196899-16987-1-git-send-email-akrowiak@linux.vnet.ibm.com> <1534196899-16987-5-git-send-email-akrowiak@linux.vnet.ibm.com> <20180814104335.4bc3630a.cohuck@redhat.com> <49e99e8a-7de8-abde-6775-af11680db13d@linux.ibm.com> Organization: Red Hat GmbH MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Fri, 17 Aug 2018 13:27:10 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Fri, 17 Aug 2018 13:27:10 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'cohuck@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 17 Aug 2018 09:18:51 -0400 Tony Krowiak wrote: > On 08/14/2018 04:43 AM, Cornelia Huck wrote: > > On Mon, 13 Aug 2018 17:48:01 -0400 > > Tony Krowiak wrote: > > > >> From: Harald Freudenberger > >> > >> Move all the inline functions from the ap bus header > >> file ap_asm.h into the in-kernel api header file > >> arch/s390/include/asm/ap.h so that KVM can make use > >> of all the low level AP functions. > >> > >> Signed-off-by: Harald Freudenberger > >> Signed-off-by: Christian Borntraeger > >> Signed-off-by: Tony Krowiak > >> --- > >> arch/s390/include/asm/ap.h | 284 ++++++++++++++++++++++++++++++++++++---- > >> drivers/s390/crypto/ap_bus.c | 23 +--- > >> drivers/s390/crypto/ap_bus.h | 1 + > >> drivers/s390/crypto/ap_card.c | 1 - > >> drivers/s390/crypto/ap_queue.c | 1 - > >> 5 files changed, 260 insertions(+), 50 deletions(-) > >> > >> diff --git a/arch/s390/include/asm/ap.h b/arch/s390/include/asm/ap.h > >> index c1bedb4..887494a 100644 > >> --- a/arch/s390/include/asm/ap.h > >> +++ b/arch/s390/include/asm/ap.h > >> @@ -47,6 +47,50 @@ struct ap_queue_status { > >> }; > >> > >> /** > >> + * ap_intructions_available() - Test if AP instructions are available. > >> + * > >> + * Returns 1 if the AP instructions are installed, otherwise 0. > >> + */ > >> +static inline int ap_instructions_available(void) > >> +{ > >> + register unsigned long reg0 asm ("0") = AP_MKQID(0, 0); > >> + register unsigned long reg1 asm ("1") = 0; > >> + register unsigned long reg2 asm ("2") = 0; > >> + > >> + asm volatile( > >> + " .long 0xb2af0000\n" /* PQAP(TAPQ) */ > >> + "0: la %0,1\n" > >> + "1:\n" > >> + EX_TABLE(0b, 1b) > >> + : "+d" (reg1), "+d" (reg2) > >> + : "d" (reg0) > >> + : "cc"); > >> + return reg1; > >> +} > > I think upstream this change (have this function return !0 when the > > instructions are installed) will be an addon patch to the one which has > > already made its way into master. Not really relevant for the remainder > > of this patch series, though. > > I noticed that Harald's patches showed up in our master branch yesterday > without this change. Yep, but the s390/features branch has the patch changing the return code. Maybe just wait for the next s390 pull request before you rebase :)