Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp914553imm; Wed, 8 Aug 2018 07:49:38 -0700 (PDT) X-Google-Smtp-Source: AA+uWPwd9mYVnlInt0zUplO5ldyaazT268YBx+oVGyYpKKHN/3M9/LXvuIUkoJSoEMU1SywEudZA X-Received: by 2002:a62:5882:: with SMTP id m124-v6mr3202965pfb.249.1533739778258; Wed, 08 Aug 2018 07:49:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533739778; cv=none; d=google.com; s=arc-20160816; b=oYH/J2sZJe+Ng6o9vlHHUENWd48eAE9OOnsFfK0973haqxV3vUFkLWa11wMav7MUtz I6xl5JRB1jUB9uGtfFxAfN2D95T+lbmfpchOvIstnLTGUQzEKqibhH0FqPUuswhDrvl3 vRLCtmV9v3uSG49J54NQJaqGP0ZDbf74P4gpP/Y9RqSQteluMmfIvOz5MjnKNRXGPUWW 7wG8bGvEEr56HvHspI6jDtc/P+p8dQh7VBAt8UdJSVFBikrJtJZvjZV/ULGA1wdCWFc0 4V8lRnX7D6d7vVZpPIbq7EHrKnw6+4NGC1PPEHxpkQ9bv1Quwtb+e4PsM9PC4rKAe+vQ 9Nhw== 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=2nXXwe8TFmR7huqkVLGyu8B5q+3SGI/vBFHP1rpkyxc=; b=VE4FTwadd1B3msO1zIP4HdsmpLuzo9yUgWVLGIqFqGIJKxCbDyKo1Ff+RnqjGDrdHt GB+eGJ1MX9JZQY2QvG/tPbYsiP5hDWG5UINN9YLztI4aKF2sAHz9MjsX3msCY085LGoz sZgGD/qZ7iQXF/M2xl8vS5XrW+xcwnkD80fQJJhQOmgGGy73r0omrkmnGU0azBlkMoNg yrPP/mMlhxrZa/XEEFP0wrvtW4ewE0rF5vdHv4vZ1+Ad1vDb9rHzJLjORK/GPPuhxXbJ SaD4yp4dYXDQAU/raSFljRBz3vbjwVZaOzhc6o4SjvEoOzvht8c/HQEhi28e6Hda63aF HiTQ== 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 k38-v6si4209557pgi.147.2018.08.08.07.49.24; Wed, 08 Aug 2018 07:49:38 -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 S1727522AbeHHREr (ORCPT + 99 others); Wed, 8 Aug 2018 13:04:47 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:41676 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726954AbeHHREq (ORCPT ); Wed, 8 Aug 2018 13:04:46 -0400 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w78EiAp3092776 for ; Wed, 8 Aug 2018 10:44:47 -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 2kr0mjdqu6-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 08 Aug 2018 10:44:46 -0400 Received: from localhost by e11.ny.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 8 Aug 2018 10:44:46 -0400 Received: from b01cxnp22036.gho.pok.ibm.com (9.57.198.26) 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) Wed, 8 Aug 2018 10:44:42 -0400 Received: from b01ledav001.gho.pok.ibm.com (b01ledav001.gho.pok.ibm.com [9.57.199.106]) by b01cxnp22036.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w78Eie2V42795036 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 8 Aug 2018 14:44:40 GMT Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1D7C928058; Wed, 8 Aug 2018 10:43:29 -0400 (EDT) Received: from b01ledav001.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0F8EA28059; Wed, 8 Aug 2018 10:43:28 -0400 (EDT) Received: from localhost.localdomain (unknown [9.85.187.56]) by b01ledav001.gho.pok.ibm.com (Postfix) with ESMTPS; Wed, 8 Aug 2018 10:43:27 -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 Subject: [PATCH v8 01/22] s390/zcrypt: Add ZAPQ inline function. Date: Wed, 8 Aug 2018 10:44:11 -0400 X-Mailer: git-send-email 1.7.1 In-Reply-To: <1533739472-7172-1-git-send-email-akrowiak@linux.vnet.ibm.com> References: <1533739472-7172-1-git-send-email-akrowiak@linux.vnet.ibm.com> X-TM-AS-GCONF: 00 x-cbid: 18080814-2213-0000-0000-000002D773EB X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00009507; HX=3.00000242; KW=3.00000007; PH=3.00000004; SC=3.00000266; SDB=6.01070983; UDB=6.00551365; IPR=6.00850514; MB=3.00022589; MTD=3.00000008; XFM=3.00000015; UTC=2018-08-08 14:44:45 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18080814-2214-0000-0000-00005B216DEB Message-Id: <1533739472-7172-2-git-send-email-akrowiak@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-08-08_05:,, 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=1011 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=875 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1808080153 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 Reviewed-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