Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1003539pxj; Thu, 17 Jun 2021 19:54:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxF8s+JtZSAiymPb6uYZOAZ5w2f6hRjCu5iVZyGM33R8lIbjQ62IXRJhndlHwZFy9JN9gWv X-Received: by 2002:a17:906:2c4a:: with SMTP id f10mr8433942ejh.493.1623984875506; Thu, 17 Jun 2021 19:54:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1623984875; cv=none; d=google.com; s=arc-20160816; b=Uvvwb1o7FhfDb/Jxw2naEvCUWUP9uaM2Jrqn+2/5ObPPHQiR0nlZPnSgBYEC/quHQ2 yafnkm8TasjPl/E4nnxmf1A3+Ai0Tviua1cts3JYS4F+Co1/KBqD6jDDnzCpGjRGicpD Md7fXHHS0H6gv2cgpRQGXAZudBwdPdHNA7scTPiXG1zIE/BXoLEeIs1QzLlejp2zUpJN 2Caosu1KR3n0gTmnGR8Fmt1zHfAl/THZE9wS+Vf/YlWPiHC2WT7HiqG4rIuXULhmF4Tv liWILUyB4PeRXi0nzzCxWaGY6lke/TTi+NI6tYGKazZOP4TP3nQCyE49K7C4xI3ygU2i EaDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:message-id :mime-version:in-reply-to:references:cc:to:subject:from:date :dkim-signature; bh=qOGxnA+w295Zfdqp/3EIV/boS8jDDN3t7281bqtmFyk=; b=IR6wg0BwsQtI54pnKJ/U9wRYD0rl6GSW0/6gmX5bolR+3lfY61de3OXkOKNvYMi6rf fWzPk2MkzerAEl5JRbPdd4bOLS3nN+ozeN+HzSZ9jSS3HlTw9qM/x3eKJYA3EOUlDMdg UuiqRl3/m6ILIg7Bq9JrDEiIuINX57TF67oe+VPhuVyRgVJLqFXgCouuCijeCLU7Xpgw 7tmPMi2mwmRQewm3rghCTzk5tPZOJ5keZVfZNOKSBpsmNh6deILYKkqRq5fiqHEBQl0T OT297AKRAWexlOYg0kcBC7NYWQFs6UPiKPWf57jxcjqLxbzGPB5D78ykKwDg6yVfguJq OQRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ir87RIq6; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id d23si7220216ede.200.2021.06.17.19.54.12; Thu, 17 Jun 2021 19:54:35 -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=@gmail.com header.s=20161025 header.b=ir87RIq6; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232217AbhFQXY2 (ORCPT + 99 others); Thu, 17 Jun 2021 19:24:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41634 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232024AbhFQXY1 (ORCPT ); Thu, 17 Jun 2021 19:24:27 -0400 Received: from mail-pf1-x431.google.com (mail-pf1-x431.google.com [IPv6:2607:f8b0:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3343DC061574 for ; Thu, 17 Jun 2021 16:22:19 -0700 (PDT) Received: by mail-pf1-x431.google.com with SMTP id h12so6254226pfe.2 for ; Thu, 17 Jun 2021 16:22:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:subject:to:cc:references:in-reply-to:mime-version :message-id:content-transfer-encoding; bh=qOGxnA+w295Zfdqp/3EIV/boS8jDDN3t7281bqtmFyk=; b=ir87RIq6aaUio14CEQu9Dg1UaOAcsDflyOo8FkKXldN9ZoQ6I5wCPknP5NKvSLrgZ8 t8BYa+PWl82kqVa54W6ujKqy6QJ7UZBzBSfX+Nj7eS9ic5bV8Tc4UwlmeHIDGsDa06zP w/+oD6UxaC7Jgppy2kI84XBk2XlYkFZaf9rKObE58oUt2H5+ugOphi/86/uv+GM1HtEz JCzQ0h8IproccM3LZvzrvOQ/BSuNYeiqCf5xd6YYbxNaB96z+vZQ3Y74R1tlwTWPoTSv 11o64cpOt78exCXXsHQ2pqcboPNq4B8oCD5VHFMyRmTpvkLusvMKANhSPbWx2oF9rapL arVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:subject:to:cc:references:in-reply-to :mime-version:message-id:content-transfer-encoding; bh=qOGxnA+w295Zfdqp/3EIV/boS8jDDN3t7281bqtmFyk=; b=AI+eFvpz7+e9fjFsmctKV2bh2SNW8tMnDdPdnXjfu/9qVddA5unC4ch/64zusOxUDu wPGfx0jyL8BnyZjCkzdvk787bc5KyVAC9n2bbhniwt2xhe2MlxYskYy2kgWuHm501UlY hmZ/OgqYqxPY4gBH7JuswMjkoihkTw/NhQaSgXGwOr+BWXA6NX5nbo2gZkct1liFLm7P l9+R9042WvFi5E1fYuK41nZWvUvWC4KMOIh9fJh1MqZee0rT/44K1f72qFHbsR1cyTl1 09HaSJSsFb+91hKAWfUQguW9rx6/kHxHDkEHWbBeEW/L76LrVTmwFG4k8zJLGtui7Ntx Sjow== X-Gm-Message-State: AOAM533Jw5Chjh/IE5jg7PXhG6HIRgnFLzb56W3fMOUf0EbMFl78Jk3s 1cwAvSQ1AUz2i7LRZY/6yHo= X-Received: by 2002:a63:f13:: with SMTP id e19mr6955047pgl.112.1623972138656; Thu, 17 Jun 2021 16:22:18 -0700 (PDT) Received: from localhost (60-242-147-73.tpgi.com.au. [60.242.147.73]) by smtp.gmail.com with ESMTPSA id b65sm6087820pfa.32.2021.06.17.16.22.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Jun 2021 16:22:18 -0700 (PDT) Date: Fri, 18 Jun 2021 09:22:13 +1000 From: Nicholas Piggin Subject: Re: [PATCH v6 12/17] powerpc/pseries/vas: Integrate API with open/close windows To: Haren Myneni , herbert@gondor.apana.org.au, linux-crypto@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, mpe@ellerman.id.au Cc: haren@us.ibm.com, hbabu@us.ibm.com References: <827bf56dce09620ebecd8a00a5f97105187a6205.camel@linux.ibm.com> In-Reply-To: MIME-Version: 1.0 Message-Id: <1623971609.844odc55aw.astroid@bobo.none> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Excerpts from Haren Myneni's message of June 18, 2021 6:36 am: >=20 > This patch adds VAS window allocatioa/close with the corresponding > hcalls. Also changes to integrate with the existing user space VAS > API and provide register/unregister functions to NX pseries driver. >=20 > The driver register function is used to create the user space > interface (/dev/crypto/nx-gzip) and unregister to remove this entry. >=20 > The user space process opens this device node and makes an ioctl > to allocate VAS window. The close interface is used to deallocate > window. >=20 > Signed-off-by: Haren Myneni Reviewed-by: Nicholas Piggin Unless there is some significant performance reason it might be simplest to take the mutex for the duration of the allocate and frees rather than=20 taking it several times, covering the atomic with the lock instead. You have a big lock, might as well use it and not have to wonder what if=20 things race here or there. But don't rework that now, maybe just something to consider for later. Thanks, Nick