Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1097339pxj; Wed, 2 Jun 2021 21:08:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy4KQv/x/1NmsZZms+Uuk8mkDxl0FWR2ZjlJUA++v6pMt/TQA/2xLgHT5pFtrW+LEUXXWvW X-Received: by 2002:a17:906:a95:: with SMTP id y21mr11568225ejf.522.1622693326886; Wed, 02 Jun 2021 21:08:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622693326; cv=none; d=google.com; s=arc-20160816; b=UCpJxYl9HvawQM5ntn8eXvDoATu+qPbv3xCjPeLFnMbr7pD196s95kOmMBDhVi8dff RiyEIw+7z1FqJpHG7mBxLcSvL+8jUqR5H8WGzBSOmSrhzVRZjGcAyab/KMj+Au/4brh5 YxNQAWaWI5bet1Z/JC6i/4Q+k5+z2+1GHT8D82X7KpF9rACZTV74UUQKXQ9gvOZqi3WV kJ2GHj8CnlywGYzY4Fc8atFcIBoV1zcj5atjIJ/1LZCBteNJvGCEXZNKMJMFCA8HRaSA p2uZsMMjOZlrvA6uqYlWs8cEKhiIsTQpE8B5x7Oj4Z3HoxZoD5GnHr3hyW6nOw9S80MA 9I3w== 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=795WZ/W4WPdDcq8kKiZWiu2NEgJWT4oKxelx0R4hEO8=; b=olvlyVuyMonEoNvEt+VNeJrO2MFWIQjtqXqQemWu+mfuVCBzj3Ei4YXn6yhnD0Xg+l fo+QsypPz9NlyJQXWFwhXRPBPkoiBTATwJFhIjwe653YeU9CVrJwPbEUOl0MhuGN9gln 1ES31Iqn1YRwd5ebe2HvmY/VoXwjPIytVnWgz58+37/llt/VCnQSiUrxqNY3uDPKl2oJ z+fuLxQC7ccmrJ/Shnakg2XcRMcDKbTDm0NVSTuQ1yzH84Rtgot3pS9tVFj/0hjZlilf u2e2bUPRCJQqLHZFa66TGGDMhsuv/p3AoT6lYl7gpqQXiqMZA7nN6ZevdPOz6uaCYTE0 cERg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=TTyiAwJ3; 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 dx1si1339178ejb.657.2021.06.02.21.08.14; Wed, 02 Jun 2021 21:08:46 -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=TTyiAwJ3; 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 S229487AbhFCEHZ (ORCPT + 99 others); Thu, 3 Jun 2021 00:07:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229441AbhFCEHY (ORCPT ); Thu, 3 Jun 2021 00:07:24 -0400 Received: from mail-pf1-x434.google.com (mail-pf1-x434.google.com [IPv6:2607:f8b0:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8BA6DC06174A for ; Wed, 2 Jun 2021 21:05:26 -0700 (PDT) Received: by mail-pf1-x434.google.com with SMTP id u18so3869469pfk.11 for ; Wed, 02 Jun 2021 21:05:26 -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=795WZ/W4WPdDcq8kKiZWiu2NEgJWT4oKxelx0R4hEO8=; b=TTyiAwJ3SUuLjCZCApR55XIk/saCQ2zDy3RFA8o0NikxDgZWw5nMzYJONgf6XJaxYb lgEzTUfE9efXxv1XawtZ5IVAs6wW7nJyCMyOw0tayWGQ0EeBR033QPQcYOhCG4ZcU+6H xTLP2GCR3qOpcv/druIRfwQYYuHFjvMuclo70aBQYQlTKZOl/O/07r7HWE8uwzX7f8sp nIZAWDJ/vb7HJ8Zd7TD5hX9rjqSfgNYrjnEn8fIA25dDmovwxzxfEiVm8BlMR69wuyYT EvaSUN+qdsOhf8Ia7Xt3zh1DAJC57L48jDo3tx4NXmp01t9LVKjonvy9UqOqYJESePvx bLkw== 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=795WZ/W4WPdDcq8kKiZWiu2NEgJWT4oKxelx0R4hEO8=; b=J+oWPSmSE+pNySTWzj2OHQQyEE3+jIGkQwPZ7i+0Y9SUCYfQzLzDdJm5ypj7sH+YLe tXP8A5G2DAyGThK8PTXlR6sUYRoypF1T9i2TjbYL1X2HEroMMG3nnwhrUzE3pzzrsVb/ gGpg5D+ZDHoNk66X9uJfInboy6Grq/3H0Nud0XjlKcNlrpYFv0ArCEzy89z+KFdL4ec1 ePLpuKxME9F76uV5cZLhAYcl+YKrfbCZ793FiRVmspdGXKjd+zyIiP0CvVhaWtTbykW/ ybNcOODQU6P/H3W+6aFEpJGP7Ecc26rem1UIKIcUrrOcAUJKBkR5s/6I4jm52uV0mZH5 5SCw== X-Gm-Message-State: AOAM530EYQSR3WZuuK+MMwICgsmu9PWNzxIQe4TJobQ8UdPBrereAr1v RPIxr44bn/8MbLND+A0mA+8= X-Received: by 2002:a63:1c6:: with SMTP id 189mr37271392pgb.144.1622693126063; Wed, 02 Jun 2021 21:05:26 -0700 (PDT) Received: from localhost (60-242-147-73.tpgi.com.au. [60.242.147.73]) by smtp.gmail.com with ESMTPSA id n129sm501962pfn.167.2021.06.02.21.05.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 02 Jun 2021 21:05:25 -0700 (PDT) Date: Thu, 03 Jun 2021 14:05:20 +1000 From: Nicholas Piggin Subject: Re: [PATCH v4 03/16] powerpc/vas: Add platform specific user window operations 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: <8d219c0816133a8643d650709066cf04c9c77322.camel@linux.ibm.com> In-Reply-To: MIME-Version: 1.0 Message-Id: <1622692598.4iphcb4vdf.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 May 21, 2021 7:30 pm: >=20 > PowerNV uses registers to open/close VAS windows, and getting the > paste address. Whereas the hypervisor calls are used on PowerVM. >=20 > This patch adds the platform specific user space window operations > and register with the common VAS user space interface. Basic idea makes sense. I don't understand this code in detail though. A couple of things, >=20 > Signed-off-by: Haren Myneni > --- > arch/powerpc/include/asm/vas.h | 14 +++++- > arch/powerpc/platforms/book3s/vas-api.c | 52 ++++++++++++--------- > arch/powerpc/platforms/powernv/vas-window.c | 46 +++++++++++++++++- > 3 files changed, 89 insertions(+), 23 deletions(-) >=20 > diff --git a/arch/powerpc/include/asm/vas.h b/arch/powerpc/include/asm/va= s.h > index 6076adf9ab4f..668303198772 100644 > --- a/arch/powerpc/include/asm/vas.h > +++ b/arch/powerpc/include/asm/vas.h > @@ -5,6 +5,7 @@ > =20 > #ifndef _ASM_POWERPC_VAS_H > #define _ASM_POWERPC_VAS_H > +#include > =20 > struct vas_window; > =20 > @@ -48,6 +49,16 @@ enum vas_cop_type { > VAS_COP_TYPE_MAX, > }; > =20 > +/* > + * User space window operations used for powernv and powerVM > + */ > +struct vas_user_win_ops { > + struct vas_window * (*open_win)(struct vas_tx_win_open_attr *, > + enum vas_cop_type); > + u64 (*paste_addr)(void *); > + int (*close_win)(void *); Without looking further into the series, why do these two take void *=20 when the first returns a vas_window * which appears to be the required argument to these? > +static struct vas_user_win_ops vops =3D { > + .open_win =3D vas_user_win_open, > + .paste_addr =3D vas_user_win_paste_addr, > + .close_win =3D vas_user_win_close, > +}; const? Thanks, Nick