lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CALxtO0k3_ib2G-4pL0h5HxHUXgJ=ArNY6eaThEzdsPiYPauDWw@mail.gmail.com>
Date: Tue, 24 Jun 2025 13:19:37 +0530
From: Pavitrakumar Managutte <pavitrakumarm@...avyalabs.com>
To: Krzysztof Kozlowski <krzk@...nel.org>
Cc: linux-crypto@...r.kernel.org, linux-kernel@...r.kernel.org, 
	devicetree@...r.kernel.org, herbert@...dor.apana.org.au, robh@...nel.org, 
	krzk+dt@...nel.org, conor+dt@...nel.org, Ruud.Derwig@...opsys.com, 
	manjunath.hadli@...avyalabs.com, adityak@...avyalabs.com, 
	Bhoomika Kadabi <bhoomikak@...avyalabs.com>
Subject: Re: [PATCH v3 1/6] dt-bindings: crypto: Document support for SPAcc

Hi Krzysztof,
   My comments are embedded below, appreciate your inputs.

Warm regards,
PK

On Fri, Jun 6, 2025 at 6:34 PM Krzysztof Kozlowski <krzk@...nel.org> wrote:
>
> On 06/06/2025 14:58, Pavitrakumar Managutte wrote:
> > On Fri, Jun 6, 2025 at 4:55 PM Krzysztof Kozlowski <krzk@...nel.org> wrote:
> >>
> >> On 06/06/2025 13:02, Pavitrakumar Managutte wrote:
> >>> Hi Krzysztof,
> >>>   Appreciate your inputs and feedback. My comments are embedded below.
> >>>
> >>> Warm regards,
> >>> PK
> >>>
> >>> On Wed, Jun 4, 2025 at 7:37 PM Krzysztof Kozlowski <krzk@...nel.org> wrote:
> >>>>
> >>>> On 04/06/2025 14:20, Pavitrakumar Managutte wrote:
> >>>>>>
> >>>>>>>>> +
> >>>>>>>>> +  snps,vspacc-id:
> >>>>>>>>> +    $ref: /schemas/types.yaml#/definitions/uint32
> >>>>>>>>> +    description: |
> >>>>>>>>> +      Virtual SPAcc instance identifier.
> >>>>>>>>> +      The SPAcc hardware supports multiple virtual instances (determined by
> >>>>>>>>> +      ELP_SPACC_CONFIG_VSPACC_CNT parameter), and this ID is used to identify
> >>>>>>>>> +      which virtual instance this node represents.
> >>>>>>>>
> >>>>>>>> No, IDs are not accepted.
> >>>>>>>
> >>>>>>> PK: This represents the specific virtual SPAcc that is being used in
> >>>>>>> the current configuration. It is used to index into the register banks
> >>>>>>> and the context memories of the virtual SPAcc that is being used. The
> >>>>>>> SPAcc IP can be configured as dedicated virtual SPAccs in
> >>>>>>> heterogeneous environments.
> >>>>>>
> >>>>>> OK. Why registers are not narrowed to only this instance? It feels like
> >>>>>> you provide here full register space for multiple devices and then
> >>>>>> select the bank with above ID.
> >>>>>
> >>>>> PK: No, we cant narrow the registers to only this instance since its
> >>>>> is just a single SPAcc with multiple virtual SPAcc instances. The same
> >>>>> set of registers(aka register banks) and context memories are
> >>>>> repeated, but sit at different offset addresses (i*4000 +
> >>>>> register-offsets). The crypto hardware engine inside is shared by all
> >>>>> the virtual SPAccs. This is very much for a heterogeneous computing
> >>>>> scenario.
> >>>>
> >>>> Then maybe you have one crypto engine? You ask us to guess all of this,
> >>>> also because you do not upstream the DTS for real product. Any
> >>>> mentioning of "virtual" already raises concerns...
> >>>
> >>> PK: Yes this is a single crypto engine, maybe I should have detailed
> >>> that in the cover letter. I will fix that. And what I have pushed in
> >>
> >> So one node, thus no need for this entire virtual device split.
> >
> > PK: Agreed, its one node for our test case.
>
>
> We do not talk about test case. We talk about this device.
PK: Sure
> >
> >>
> >>> the patch is my complete DTS. It might need updating depending on the
> >>
> >> If this is complete, then obviously "snps,vspacc-id" is not necessary.
> >
> > PK: Yes, its one node, to keep things simple. So we pick a virtual
> > spacc with its vspacc-id for testing. That way we could test all the
> > virtual spaccs with a single node, on a need basis.
> >
> > On the other hand we could create 'n' nodes for 'n' virtual spaccs and
>
> You said it is complete, now you said you have 'n' more.

PK: I think the mistake from my side was to create 'n' nodes with the
same base addresses and different Virtual IDs, and misinterpret your
earlier guidance on this. Instead every "virtual" SPAcc instance can
be represented with its own DT node, since its base address and IRQ
numbers are unique. The "virtual" refers to a hardware feature in the
SPAcc. Each virtual SPAcc, configured at hardware design-time, has its
own control registers, IRQ numbers and contexts, only the crypto
hardware is shared.

>
> > register 'n' vspacc devices with the crypto subsystem. And bind the
> > individual nodes with unique vspacc-ids. That might depend on the
>
> I don't understand what is "binding" here. Use Linux or DT terminology.

PK: My bad, I will take care of that.

>
> > vendor use case, for which we will add incremental support.
>
> You did not get the point but you keep saying "yes". This discussion is
> getting meaningless and you really do not want to listen. You have
> either incomplete picture here or you have only one node. In both cases
> virtual ID is not necessary. If you claim virtual ID is necessary, I
> claim you have here incomplete picture and you are trying to represent
> one device in multiple nodes. No.
>
> Typically one device, one node.
>
> NOT one device and 10 virtual nodes representing virtual devices.

PK: Thanks, I believe I finally understand your point.

>
> Amount of ping pongs here is way beyond my patience, so before you
> respond read that carefully and come with full and accurate hardware
> description, so we will not have to ping pong trying to get any sort of
> details.
>
> Best regards,
> Krzysztof

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ