Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp3600260imm; Mon, 13 Aug 2018 14:53:55 -0700 (PDT) X-Google-Smtp-Source: AA+uWPzgKs2ss0RDHyYqWBooC1t/nAhFVOA8/KoK2fEP+jxJABAFhIIPL4v7TNSuzdMIK3RHduq3 X-Received: by 2002:a63:4b1f:: with SMTP id y31-v6mr18935166pga.14.1534197235067; Mon, 13 Aug 2018 14:53:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534197235; cv=none; d=google.com; s=arc-20160816; b=GRhuOHSuWbBg253HPJ0a1sjVAKcA+xh5xFM29BnSC88NJOqniSrOMNEcIIBhiHK8OM STBsBA/H6i6qUX8n4aKVXRdYCfzdRP5NQIzSBWG5GEk3iq4EwO97OrrDiUm876TQTRfj 2uaMxSr7tTUvIxZbEjQZZIm36RUnwfh1dbSe+vO7cCffW5GQwUm+0toQhRPfzCaqg+rN qXW68kw4JVDRq2LKh4bKv6dl5gUjkob9MTvAnZDpUmZLjnw9iuSOKSM/IpbdOIeJufLE A+XtDnuGYngtWCkxILa/ZeevMT3m9tO5bTWvfUU2pHJWF6UHnSm8I9DwNcAZjOPtjx74 /4sw== 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=T7kudFNfIDcZ2RHj+GfZBD9VSfqZuuOBtUd7Vk3qfcU=; b=b13ZFbFB+NYz8vA3BskO4G4rc++jLEc7a6WizH34rwUrDLtZ5ivaNpyhVW6IA+vGiU +EklcDWKo4K39P5ods4qZtf2Ib35JzQVnIX5nxkL3VR5IPKoPSRvJ18YyHGy0Z4Si1mE VfJvGPVj2UoWTcVTdqP2WD67wkrEkXPrqTeTm8XnP5Ca47HhdL/exERWWpyYLMtE2Fda eKBszlQAC+Wc4go5RxL3q4nHasqrobnva9zmd86VlPefcfjUjkOUER8XeBTeOVkVtFcE kBvw6+q3AYdcUEGwLybR4AocDug9Zm5kBC94mamUP6t3kyDb2FamIh+gWrK2mmGis+rK j2yg== 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 z8-v6si18897465pgr.260.2018.08.13.14.53.40; Mon, 13 Aug 2018 14:53:55 -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 S1731026AbeHNAci (ORCPT + 99 others); Mon, 13 Aug 2018 20:32:38 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:60510 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730602AbeHNAci (ORCPT ); Mon, 13 Aug 2018 20:32:38 -0400 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w7DLcm3F124334 for ; Mon, 13 Aug 2018 17:48:34 -0400 Received: from e17.ny.us.ibm.com (e17.ny.us.ibm.com [129.33.205.207]) by mx0a-001b2d01.pphosted.com with ESMTP id 2kue4uh9j3-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 13 Aug 2018 17:48:33 -0400 Received: from localhost by e17.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 13 Aug 2018 17:48:32 -0400 Received: from b01cxnp22036.gho.pok.ibm.com (9.57.198.26) by e17.ny.us.ibm.com (146.89.104.204) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 13 Aug 2018 17:48:28 -0400 Received: from b01ledav002.gho.pok.ibm.com (b01ledav002.gho.pok.ibm.com [9.57.199.107]) by b01cxnp22036.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w7DLmQT85767594 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 13 Aug 2018 21:48:26 GMT Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A4354124055; Mon, 13 Aug 2018 18:49:24 -0400 (EDT) Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 8EC77124053; Mon, 13 Aug 2018 18:49:23 -0400 (EDT) Received: from localhost.localdomain (unknown [9.85.141.105]) by b01ledav002.gho.pok.ibm.com (Postfix) with ESMTPS; Mon, 13 Aug 2018 18:49:23 -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, frankja@linux.ibm.com, Tony Krowiak Subject: [PATCH v9 01/22] s390/zcrypt: Add ZAPQ inline function. Date: Mon, 13 Aug 2018 17:47:58 -0400 X-Mailer: git-send-email 1.7.1 In-Reply-To: <1534196899-16987-1-git-send-email-akrowiak@linux.vnet.ibm.com> References: <1534196899-16987-1-git-send-email-akrowiak@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18081321-0040-0000-0000-0000045E55B3 X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009538; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000266; SDB=6.01073087; UDB=6.00552882; IPR=6.00853043; MB=3.00022698; MTD=3.00000008; XFM=3.00000015; UTC=2018-08-13 21:48:30 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18081321-0041-0000-0000-000008655D84 Message-Id: <1534196899-16987-2-git-send-email-akrowiak@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-08-13_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=848 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1808130218 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: Christian Borntraeger 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