Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1309568imm; Fri, 29 Jun 2018 15:43:26 -0700 (PDT) X-Google-Smtp-Source: ADUXVKI3UzjRfxyw2/azna8uJdoAAjGJ56ZQZbZw5wC9MLbkwgnEcwMv4eZN9EnT0wYjUeape0VC X-Received: by 2002:a17:902:6b09:: with SMTP id o9-v6mr16445487plk.256.1530312206212; Fri, 29 Jun 2018 15:43:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530312206; cv=none; d=google.com; s=arc-20160816; b=cmVIALHcJM49+atJpODrEf6iF+j0F8AGurEY7gZIn9CGXN71Xt2R8AgbGy7xIrNWMd I1tB0gcXiqJBS5NpWOqeoUvGlsF5DhRv8wvgzcoadFe0Dt3oWnWhs7VAqmFlhSjrV5qM Hf2cUDB2RYK1Wwzag0VCLnwbpcERnKg4q7RHo2L+NAZmY+D9NqPuzZc5EOSZrlD+L5Xk hZ4uO2RwDT7FXoyWj4CXGrgpZdXql8YZYqdzH+IL5tBH1ghsKyJgLKiim7aTNWoNoIJI PKcst6FeK75jQUBzdhVmWMGRY8dmE+U25/Es3cI6+RvmT/+yc9YXD1e9hGTJQqZ7+vZg QWlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:references:in-reply-to:date :subject:cc:to:from:arc-authentication-results; bh=EzcTjHe7yGpnGGLNX4RIL2iXR4WO4jwycyGisKV8Go0=; b=J47RngvG7TVIGKNcYlhbGkzqveaCi2z3xNKtMhFRxZM+7WmdEX6zeGnu5CLiNSlGX9 zB5EyTrTtl60GpgEqDmIRqa3euBYsYgZmCiOn2WgyknrMHErHg6s1YI2UhLM5Rolhmh4 Sk9hQZbxY9FL3R/vkCsQzT6iKJ6Nfw9RMcSVsIL1MrOn7fADrL1+FwX4+B6TnO1NBYLe j0HaB3quoJ0ZJL0eNA8gCbXNTswcX1+CVniCPltJPp0YN5sYOdD0cFybxtDdBNyUJCkp 7WFIPtnHeaLk3XKrXM2CfKA3Y1qn3hy6NDSonb2YjJm+aLYRdqluA/nEz2y6U0MI7MIa eQWg== 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=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 69-v6si9875879pla.288.2018.06.29.15.43.12; Fri, 29 Jun 2018 15:43:26 -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=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936578AbeF2VLj (ORCPT + 99 others); Fri, 29 Jun 2018 17:11:39 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:48922 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S932345AbeF2VLg (ORCPT ); Fri, 29 Jun 2018 17:11:36 -0400 Received: from pps.filterd (m0098420.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w5TL9frX072903 for ; Fri, 29 Jun 2018 17:11:35 -0400 Received: from e11.ny.us.ibm.com (e11.ny.us.ibm.com [129.33.205.201]) by mx0b-001b2d01.pphosted.com with ESMTP id 2jws6170kg-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 29 Jun 2018 17:11:35 -0400 Received: from localhost by e11.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 29 Jun 2018 17:11:35 -0400 Received: from b01cxnp22033.gho.pok.ibm.com (9.57.198.23) by e11.ny.us.ibm.com (146.89.104.198) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Fri, 29 Jun 2018 17:11:32 -0400 Received: from b01ledav002.gho.pok.ibm.com (b01ledav002.gho.pok.ibm.com [9.57.199.107]) by b01cxnp22033.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w5TLBUcT7340540 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 29 Jun 2018 21:11:30 GMT Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4A80412405A; Fri, 29 Jun 2018 18:12:59 -0400 (EDT) Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3DD02124052; Fri, 29 Jun 2018 18:12:58 -0400 (EDT) Received: from localhost.localdomain (unknown [9.85.157.42]) by b01ledav002.gho.pok.ibm.com (Postfix) with ESMTPS; Fri, 29 Jun 2018 18:12:58 -0400 (EDT) From: Tony Krowiak To: linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, kvm@vger.kernel.org Cc: freude@de.ibm.com, schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com, borntraeger@de.ibm.com, cohuck@redhat.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, akrowiak@linux.vnet.ibm.com, Tony Krowiak Subject: [PATCH v6 01/21] s390/zcrypt: Add ZAPQ inline function. Date: Fri, 29 Jun 2018 17:11:03 -0400 X-Mailer: git-send-email 1.7.1 In-Reply-To: <1530306683-7270-1-git-send-email-akrowiak@linux.vnet.ibm.com> References: <1530306683-7270-1-git-send-email-akrowiak@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18062921-2213-0000-0000-000002C21E8F X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009278; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000266; SDB=6.01054189; UDB=6.00540581; IPR=6.00832111; MB=3.00021933; MTD=3.00000008; XFM=3.00000015; UTC=2018-06-29 21:11:34 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18062921-2214-0000-0000-00005AA78632 Message-Id: <1530306683-7270-2-git-send-email-akrowiak@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-06-29_10:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=822 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1806210000 definitions=main-1806290224 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Harald Freudenberger Added new inline function ap_pqap_zapq() which is a C inline function wrapper for the AP PQAP(ZAPQ) instruction. Signed-off-by: Harald Freudenberger Signed-off-by: Tony Krowiak --- drivers/s390/crypto/ap_asm.h | 19 +++++++++++++++++++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/drivers/s390/crypto/ap_asm.h b/drivers/s390/crypto/ap_asm.h index 16b59ce..b22d30a 100644 --- a/drivers/s390/crypto/ap_asm.h +++ b/drivers/s390/crypto/ap_asm.h @@ -70,6 +70,25 @@ static inline struct ap_queue_status ap_rapq(ap_qid_t qid) } /** + * ap_pqap_zapq(): Reset and zeroize adjunct processor queue. + * @qid: The AP queue number + * + * Returns AP queue status structure. + */ +static inline struct ap_queue_status ap_zapq(ap_qid_t qid) +{ + register unsigned long reg0 asm ("0") = qid | (2UL << 24); + register struct ap_queue_status reg1 asm ("1"); + + asm volatile( + ".long 0xb2af0000" /* PQAP(ZAPQ) */ + : "=d" (reg1) + : "d" (reg0) + : "cc"); + return reg1; +} + +/** * ap_aqic(): Control interruption for a specific AP. * @qid: The AP queue number * @qirqctrl: struct ap_qirq_ctrl (64 bit value) -- 1.7.1