Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp600908iob; Wed, 18 May 2022 08:56:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzzYc7IqBYjC2AU/9P0AtDd37t0CDXzFTpTf0bKGYuzqUfwjoZwplxXqvqqgxuT7gEyXFNX X-Received: by 2002:a17:903:52:b0:161:51c9:c3e5 with SMTP id l18-20020a170903005200b0016151c9c3e5mr343929pla.7.1652889362793; Wed, 18 May 2022 08:56:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652889362; cv=none; d=google.com; s=arc-20160816; b=B22IjZigmjVeI2kyGsEAOSNvHwFmr3MdowZRqPkijZGFsYORgtTrPr2NvjPQt4nvrv MYhCWJZchNcUzNsz6ILCuV7obHZO7kyJ49bOmWOtX2bORS6vR7qsfzO6zerMHCm8i849 temnX0jrdKG8hhC09677kvczvfgwv3kEr1wDc+SG7AQOfCs0I7MzzL2OVY01nAIpKEKq efZb94WcRj9q5lakeM6kQG4gFKJbm/u43Uh1RHbnmwlEJr901u/ihhMgJnRNEO3Ki465 qRIFCjs0/tFllEJqVI56iLkzV//6vCITXTJM9ChfWtyHguFxCPzCzlEzbjBwbGZc9QvN YYZQ== 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 :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=YnOdaKK3XP2+9AUVisQH84iFwCNcXcc2Mc2OZKHgzjY=; b=e1VjwJJpnFtZE8pnSDXJ5R0pSWeBUW3tZwbrSExV8fccNBta9eQZBqjdCkL2fSd5wk o4kqYxHNv6sHdqhhhoRymZ7lubEJ/46qoDDsbLX8WObxa8CCcOiqYwA99xKolEh2Rhku W235XUhcFQgIGH/zPm8aAcXaKMrWWFpG3LXN6hV8wUEjRatqLRrGhVRoDbUHJ8Y9hsVp ZlWIqtWG1s4HMI7xUeq9v1HhzdsndQJHyr7ZqXEK64Hoz4MhXAAbbW+sow+gqCl/SmIW 0lbPX5isNBEG+LnHSaFpgimOG078zzN8iwVsCIeKlesLlydRGp5BJ8uVYOGHVqyUiMq6 Q5Fw== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-crypto-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id 69-20020a630448000000b003f618192b16si1671034pge.215.2022.05.18.08.56.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 May 2022 08:56:02 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-crypto-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-crypto-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B3F481D3D1A; Wed, 18 May 2022 08:55:23 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239721AbiERPzT (ORCPT + 99 others); Wed, 18 May 2022 11:55:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34752 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239703AbiERPzS (ORCPT ); Wed, 18 May 2022 11:55:18 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id B92DB1CEEF6; Wed, 18 May 2022 08:55:16 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 7985E23A; Wed, 18 May 2022 08:55:16 -0700 (PDT) Received: from donnerap.cambridge.arm.com (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 4E99C3F718; Wed, 18 May 2022 08:55:15 -0700 (PDT) Date: Wed, 18 May 2022 16:55:12 +0100 From: Andre Przywara To: Ard Biesheuvel Cc: yoan.picchi@arm.com, Giovanni Cabiddu , Herbert Xu , "David S . Miller" , qat-linux , Linux Crypto Mailing List , Linux Kernel Mailing List Subject: Re: [RFC PATCH 2/2] Removes the x86 dependency on the QAT drivers Message-ID: <20220518165512.3e07c4b3@donnerap.cambridge.arm.com> In-Reply-To: References: <20220516101635.1082132-1-yoan.picchi@arm.com> <20220516101635.1082132-3-yoan.picchi@arm.com> Organization: ARM X-Mailer: Claws Mail 3.18.0 (GTK+ 2.24.32; aarch64-unknown-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org On Tue, 17 May 2022 10:11:09 +0200 Ard Biesheuvel wrote: Hi, > On Mon, 16 May 2022 at 12:16, wrote: > > > > From: Yoan Picchi > > > > This dependency looks outdated. After the previous patch, we have been able > > to use this driver to encrypt some data and to create working VF on arm64. > > > > Signed-off-by: Yoan Picchi > > Are you sure the driver is safe for non-coherent DMA as well? That depends on your definition of "sure". We indeed tested this only on a server with coherent PCIe. I skimmed through the driver, and it looks like to use the DMA API correctly: - I see dma_alloc_coherent() calls for DMA ring buffers. - There are dma_map_single()/dma_unmap_single() pairs in other parts. - Accesses to the BARs are capsuled via macros, using readl/writel. - Access the the SRAM BAR is also only done via those macros. I didn't go through the driver systematically, and of course the interesting parts are the ones you don't see easily, so I am eager to hear any other opinions on this topic. Ard, do you have anything special in mind? Is there something to look out for, specifically? The few cards we have access to are in some server in the data centre, so I can't easily walk in with, say a RockPro64, and test this there. Cheers, Andre > > > --- > > drivers/crypto/qat/Kconfig | 14 +++++++------- > > 1 file changed, 7 insertions(+), 7 deletions(-) > > > > diff --git a/drivers/crypto/qat/Kconfig b/drivers/crypto/qat/Kconfig > > index 4b90c0f22b03..88df2cf4cac9 100644 > > --- a/drivers/crypto/qat/Kconfig > > +++ b/drivers/crypto/qat/Kconfig > > @@ -17,7 +17,7 @@ config CRYPTO_DEV_QAT > > > > config CRYPTO_DEV_QAT_DH895xCC > > tristate "Support for Intel(R) DH895xCC" > > - depends on X86 && PCI > > + depends on PCI > > select CRYPTO_DEV_QAT > > help > > Support for Intel(R) DH895xcc with Intel(R) QuickAssist Technology > > @@ -28,7 +28,7 @@ config CRYPTO_DEV_QAT_DH895xCC > > > > config CRYPTO_DEV_QAT_C3XXX > > tristate "Support for Intel(R) C3XXX" > > - depends on X86 && PCI > > + depends on PCI > > select CRYPTO_DEV_QAT > > help > > Support for Intel(R) C3xxx with Intel(R) QuickAssist Technology > > @@ -39,7 +39,7 @@ config CRYPTO_DEV_QAT_C3XXX > > > > config CRYPTO_DEV_QAT_C62X > > tristate "Support for Intel(R) C62X" > > - depends on X86 && PCI > > + depends on PCI > > select CRYPTO_DEV_QAT > > help > > Support for Intel(R) C62x with Intel(R) QuickAssist Technology > > @@ -50,7 +50,7 @@ config CRYPTO_DEV_QAT_C62X > > > > config CRYPTO_DEV_QAT_4XXX > > tristate "Support for Intel(R) QAT_4XXX" > > - depends on X86 && PCI > > + depends on PCI > > select CRYPTO_DEV_QAT > > help > > Support for Intel(R) QuickAssist Technology QAT_4xxx > > @@ -61,7 +61,7 @@ config CRYPTO_DEV_QAT_4XXX > > > > config CRYPTO_DEV_QAT_DH895xCCVF > > tristate "Support for Intel(R) DH895xCC Virtual Function" > > - depends on X86 && PCI > > + depends on PCI > > select PCI_IOV > > select CRYPTO_DEV_QAT > > > > @@ -74,7 +74,7 @@ config CRYPTO_DEV_QAT_DH895xCCVF > > > > config CRYPTO_DEV_QAT_C3XXXVF > > tristate "Support for Intel(R) C3XXX Virtual Function" > > - depends on X86 && PCI > > + depends on PCI > > select PCI_IOV > > select CRYPTO_DEV_QAT > > help > > @@ -86,7 +86,7 @@ config CRYPTO_DEV_QAT_C3XXXVF > > > > config CRYPTO_DEV_QAT_C62XVF > > tristate "Support for Intel(R) C62X Virtual Function" > > - depends on X86 && PCI > > + depends on PCI > > select PCI_IOV > > select CRYPTO_DEV_QAT > > help > > -- > > 2.25.1 > >