From patchwork Sun Apr 11 00:35:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Haren Myneni X-Patchwork-Id: 419330 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=-13.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS 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 52D8BC433B4 for ; Sun, 11 Apr 2021 00:36:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 26E96610D1 for ; Sun, 11 Apr 2021 00:36:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234751AbhDKAga (ORCPT ); Sat, 10 Apr 2021 20:36:30 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:10116 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S234548AbhDKAg3 (ORCPT ); Sat, 10 Apr 2021 20:36:29 -0400 Received: from pps.filterd (m0098413.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 13B0WYZA040206; Sat, 10 Apr 2021 20:36:07 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : subject : from : to : cc : date : in-reply-to : references : content-type : mime-version : content-transfer-encoding; s=pp1; bh=xAabvqf+7v65N95vm6otfwdaGYBW7MTh6Z+fcF2lOwU=; b=RVpZnEPV3Xg17GX/FDUZ+QCcf88Zk+oGfn4yIiNIHwjbIBUDxQB2g2cLe2ZHHEuZ/9yI nySu9NAEmwllWaO5OGA3ZQs3le9UD8rn8EfQy09cE/JAxXizCDHk+V60oqfxqcYqdtwA GKabSWLO4oJp9Wj+wl8OMcSIVjEEOXr4ulAAm021OqMUDZ8zDTcffM7xy0u8wYPLh+Tr P9HkKAIuWW6fGUgEr/5+7FA2QX7lZC/1SvmbLKuUEuL7PlHqOUxxKhw/Ygn92crUdOMD i5FeQ3TVa0tDRRz+7Ou9jrOaFYoAjqycaiMRNPksWeniWJ6TfxIOtdj5Bpil7BhvpUod fw== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 37u65nx0vu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 10 Apr 2021 20:36:06 -0400 Received: from m0098413.ppops.net (m0098413.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 13B0XcZ4041930; Sat, 10 Apr 2021 20:36:06 -0400 Received: from ppma05wdc.us.ibm.com (1b.90.2fa9.ip4.static.sl-reverse.com [169.47.144.27]) by mx0b-001b2d01.pphosted.com with ESMTP id 37u65nx0vq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sat, 10 Apr 2021 20:36:06 -0400 Received: from pps.filterd (ppma05wdc.us.ibm.com [127.0.0.1]) by ppma05wdc.us.ibm.com (8.16.0.43/8.16.0.43) with SMTP id 13B0S5Js003799; Sun, 11 Apr 2021 00:36:05 GMT Received: from b01cxnp22035.gho.pok.ibm.com (b01cxnp22035.gho.pok.ibm.com [9.57.198.25]) by ppma05wdc.us.ibm.com with ESMTP id 37u3n95403-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 11 Apr 2021 00:36:05 +0000 Received: from b01ledav005.gho.pok.ibm.com (b01ledav005.gho.pok.ibm.com [9.57.199.110]) by b01cxnp22035.gho.pok.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 13B0a5j023396684 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 11 Apr 2021 00:36:05 GMT Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3A544AE067; Sun, 11 Apr 2021 00:36:05 +0000 (GMT) Received: from b01ledav005.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 127FCAE05C; Sun, 11 Apr 2021 00:36:04 +0000 (GMT) Received: from localhost.localdomain (unknown [9.80.232.48]) by b01ledav005.gho.pok.ibm.com (Postfix) with ESMTP; Sun, 11 Apr 2021 00:36:03 +0000 (GMT) Message-ID: <2489cf15fafb25fab3f608d6ecae72665738bd27.camel@linux.ibm.com> Subject: [PATCH 07/16] powerpc/vas: Define QoS credit flag to allocate window From: Haren Myneni To: linuxppc-dev@lists.ozlabs.org, linux-crypto@vger.kernel.org, mpe@ellerman.id.au, herbert@gondor.apana.org.au, npiggin@gmail.com Cc: hbabu@us.ibm.com, haren@us.ibm.com Date: Sat, 10 Apr 2021 17:35:54 -0700 In-Reply-To: References: User-Agent: Evolution 3.36.2 (3.36.2-1.fc32) MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-GUID: O047JVj8iGEMCghYtav-qZwvoKY_ts75 X-Proofpoint-ORIG-GUID: 3bJgJnLaIjJNqwGQLoQ2COQ6vOJwefNB X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391, 18.0.761 definitions=2021-04-10_07:2021-04-09,2021-04-10 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 spamscore=0 mlxlogscore=999 priorityscore=1501 phishscore=0 adultscore=0 impostorscore=0 clxscore=1015 malwarescore=0 mlxscore=0 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104060000 definitions=main-2104110000 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org pHyp introduces two different type of credits: Default and Quality of service (QoS). The total number of default credits available on each LPAR depends on CPU resources configured. But these credits can be shared or over-committed across LPARs in shared mode which can result in paste command failure (RMA_busy). To avoid NX HW contention, phyp introduces QoS credit type which makes sure guaranteed access to NX resources. The system admins can assign QoS credits for each LPAR via HMC. Default credit type is used to allocate a VAS window by default as on powerVM implementation. But the process can pass VAS_WIN_QOS_CREDITS flag with VAS_TX_WIN_OPEN ioctl to open VAS QoS type window. Signed-off-by: Haren Myneni --- arch/powerpc/include/uapi/asm/vas-api.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/arch/powerpc/include/uapi/asm/vas-api.h b/arch/powerpc/include/uapi/asm/vas-api.h index ebd4b2424785..eb7c8694174f 100644 --- a/arch/powerpc/include/uapi/asm/vas-api.h +++ b/arch/powerpc/include/uapi/asm/vas-api.h @@ -13,11 +13,15 @@ #define VAS_MAGIC 'v' #define VAS_TX_WIN_OPEN _IOW(VAS_MAGIC, 0x20, struct vas_tx_win_open_attr) +/* Flags to VAS TX open window ioctl */ +/* To allocate a window with QoS credit, otherwise default credit is used */ +#define VAS_WIN_QOS_CREDITS 0x0000000000000001 + struct vas_tx_win_open_attr { __u32 version; __s16 vas_id; /* specific instance of vas or -1 for default */ __u16 reserved1; - __u64 flags; /* Future use */ + __u64 flags; __u64 reserved2[6]; };