Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1951294pxj; Sun, 13 Jun 2021 04:01:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwzyFRaW31f3XvBmoArEdMQtsFndbmu4TBNeLgwjrkDMKEOR3pi4FOgJLRuz3wgTUGuTqHC X-Received: by 2002:a17:907:1c20:: with SMTP id nc32mr10734292ejc.21.1623582081060; Sun, 13 Jun 2021 04:01:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623582081; cv=none; d=google.com; s=arc-20160816; b=AVxbFYiophxs2pu417A+eSNIrV+iOYo28FGZa8ZTZVyoUKvnyz3s1Sxw5CO2ao+/l6 2ZQysxld2ilVccigj7Waqivcxp3w16wg8BaShuRRgzY7d/X7Ckeyi7m1Gxcgw3ptgJon ffwJ4fbn/48C5eZQPUf5n5eKBmw+DURW2Lh5J/mtdIRAWQ5G9F6ltUn2sCO0Q/TDYAvS 1DrkaY/S7/TFH2i1nkHpxKr39+dh2vL+OUHrBIBEtILxj5T7eqTp8NkwQID1V3GEJYay Q9IL7osnCDtW+mDl17jGL1klcC2Rwtvg0zikv6WlXrvCS/jY4TNdxmu9e3YUsPHC59Vp pJHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=KPIrsNBG3jw+H+sZqYv0mJnkmpfU9yg0jZVq1syPJH4=; b=BXQ3cPOauGLytaFwKpr/32ms11YfRRXwBXm074YFJEcCoDonWP9Gi83ibSojuxHZhs 9OPqDNm4ckkYvMSf1XbhTUMJZBxO4sk6drAYJgvI/8T+gmqZD8yK6A4GqZIjacf911Pe 3TZ4V8kbBxeU97OV3RgSxhslKAwyMo5H0JcMzLSXQR3sSlOEY6cnDvPBF6PIn6UlI7Y8 kgZlZHo8tAsTNLbPb4tI6fzAf8Ngdb1tbrpXGZB8DtDZtnjtaA0LijPuZ5uYeocjBpqh gDUdsvp63umUsqgyemtH5oypBXabqeBWT2oxNqfjfAZyYBclJXQV7Uy1UkzI/Zx3gX9g LHHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=FNCZzZOM; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id 8si9006764ejn.615.2021.06.13.04.00.57; Sun, 13 Jun 2021 04:01:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=FNCZzZOM; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231659AbhFMLCk (ORCPT + 99 others); Sun, 13 Jun 2021 07:02:40 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:64530 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S231176AbhFMLCh (ORCPT ); Sun, 13 Jun 2021 07:02:37 -0400 Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.43/8.16.0.43) with SMTP id 15DAn0PW023430; Sun, 13 Jun 2021 07:00:29 -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=KPIrsNBG3jw+H+sZqYv0mJnkmpfU9yg0jZVq1syPJH4=; b=FNCZzZOM6pvJYJo1dZ3mLdhPJE7WUxXXIAR9fMj1Ph6C3zv5sMKBnGrmLONG4pM/PHhc bzMqDgMvaZdEXGT4D1nTY8eVwLxTzhBBSsTN+W1++2JbvTB2FDEE2DIMkS/k8o5juOrc W+pKJCRWdag+6Fk5eWv8LaWSvJJXPfHou6nR3eGtl9r3hIQVPRMSQb8wPk6QIf5ABIdI 5sfDCFoAr6E0SI3v4T6T2Ud4NnmkXHf3qtcLD8pRxpn+85VzmWAsFm/waqANlbhVfeKz ukZFISibC+XVaVQ4aMeCdVKS48hO3+zEINeWQt60hxM/hm/yc+UnccEuNPH405T4n3hg BQ== Received: from pps.reinject (localhost [127.0.0.1]) by mx0b-001b2d01.pphosted.com with ESMTP id 395gkpg3w4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 13 Jun 2021 07:00:29 -0400 Received: from m0098419.ppops.net (m0098419.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.43/8.16.0.43) with SMTP id 15DB048u053507; Sun, 13 Jun 2021 07:00:28 -0400 Received: from ppma04dal.us.ibm.com (7a.29.35a9.ip4.static.sl-reverse.com [169.53.41.122]) by mx0b-001b2d01.pphosted.com with ESMTP id 395gkpg3vm-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 13 Jun 2021 07:00:28 -0400 Received: from pps.filterd (ppma04dal.us.ibm.com [127.0.0.1]) by ppma04dal.us.ibm.com (8.16.1.2/8.16.1.2) with SMTP id 15DAw9GA012295; Sun, 13 Jun 2021 11:00:28 GMT Received: from b01cxnp22033.gho.pok.ibm.com (b01cxnp22033.gho.pok.ibm.com [9.57.198.23]) by ppma04dal.us.ibm.com with ESMTP id 394yr5pchq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 13 Jun 2021 11:00:28 +0000 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 15DB0R7C28836246 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 13 Jun 2021 11:00:27 GMT Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 3996812405A; Sun, 13 Jun 2021 11:00:27 +0000 (GMT) Received: from b01ledav002.gho.pok.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 352EE124058; Sun, 13 Jun 2021 11:00:26 +0000 (GMT) Received: from localhost.localdomain (unknown [9.160.180.39]) by b01ledav002.gho.pok.ibm.com (Postfix) with ESMTP; Sun, 13 Jun 2021 11:00:26 +0000 (GMT) Message-ID: <64c8e95b25f58c5e05c98765dab2bc8eb9b1483d.camel@linux.ibm.com> Subject: [PATCH v5 09/17] 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: Sun, 13 Jun 2021 04:00:24 -0700 In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.2 (3.36.2-1.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: BwxHcinrPRQZhNRFLzXpMzV8ODis8QLo X-Proofpoint-ORIG-GUID: dsZoI3iKJ061FgtLcjyGs5x9_8sb5urG X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.391,18.0.761 definitions=2021-06-13_04:2021-06-11,2021-06-13 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=999 impostorscore=0 phishscore=0 lowpriorityscore=0 suspectscore=0 bulkscore=0 mlxscore=0 priorityscore=1501 clxscore=1015 malwarescore=0 spamscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2104190000 definitions=main-2106130078 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org PowerVM 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, the hypervisor ntroduces QoS credit type which makes sure guaranteed access to NX esources. The system admins can assign QoS credits or 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_TX_WIN_FLAG_QOS_CREDIT flag with VAS_TX_WIN_OPEN ioctl to open 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..7c81301ecdba 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 use default credit */ +#define VAS_TX_WIN_FLAG_QOS_CREDIT 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]; }; -- 2.18.2