From patchwork Mon Dec 18 20:47:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Zanussi X-Patchwork-Id: 180648 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp1522816dyi; Mon, 18 Dec 2023 12:48:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IHP/fGUUiHc8dZ2KkLXqW4OWtp801ui1lKeDJVC49OEoqJ2QGPt+7BY9eCVBHWYccIolZDZ X-Received: by 2002:a92:ca4a:0:b0:35f:727b:2193 with SMTP id q10-20020a92ca4a000000b0035f727b2193mr16219650ilo.25.1702932536666; Mon, 18 Dec 2023 12:48:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702932536; cv=none; d=google.com; s=arc-20160816; b=txCDLzIKOUKGG39Ip/hoK3QMOE9yJrxzDOZwWFHMvelWXmPYok80y6UNkmZ0gx4i8S 1b2iGMguU4a3XMcPlDYDub3w6OWsj5Hw+J+pzM7FwmDvz2VpquJqN1CH2VLd7/pVrVmw /FMSj3o3jBeZIr2BAosSegRB/h5rBltZBXjNpC5A7W4MgOStfaRlNfs5BZ9weJLM0hW/ ukM9fzMI9kBjh4Rogfe7PHrHeNcpWgie5HIyv4AcGYtILG64ppQ1jyEYw7zpKUBvkJcs feW72SzPf+0G6nFvrxRA6uctcQ3XfH1YStRvmGKwjpvUeYwJ4Qnmm9aYfyeFlgp766HU AnQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=vJoHmXOcdNaooKZWMEzmRWsgqBrAzC0NgkpUOQ3w7wM=; fh=uBWmXToShFR3GvhEPY1gX3zJanM/CT+3dK+9GAeCZ6w=; b=zTh8Fw0p9ivMb7yPTrTgy+Fg/veR2TJbcBeJcCDT9igaypLCXQG6kAPGla1Uz2a+/h VyVkhCIQpiB5yjOMl291UUx2omVAk5eUDMUE+vAyyAIMhW1a072jcXRAnhbe7x2knO+V qcSd5NBXAmfbiMXwDEA0/F6VareHuU+Z1fldCdkeq2+4ilzcb+JrO5dh7sVViZt57sVk zCnh0NJ3zhRfyskjx/slPM6tYD5TrXlZV40NmhZY07XIat6qpu5KXU7D+0DBsQGHKsHW DrX/sBu8q64vCLv6qqI0xMc6UtBTCOqrmFMLL2pJb+5p4s7YFPQtW/XUDQoIBrcBB2JR wUSQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Phkd6X+L; spf=pass (google.com: domain of linux-kernel+bounces-4374-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4374-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id q4-20020a63e944000000b005be03f0da68si18471631pgj.13.2023.12.18.12.48.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 12:48:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-4374-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Phkd6X+L; spf=pass (google.com: domain of linux-kernel+bounces-4374-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4374-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 6CDF9286056 for ; Mon, 18 Dec 2023 20:48:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C2345768E9; Mon, 18 Dec 2023 20:47:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Phkd6X+L" X-Original-To: linux-kernel@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4C0C77609F; Mon, 18 Dec 2023 20:47:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1702932443; x=1734468443; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=/k2cTzSR0pOb1jdaif8MCfX4AFDnVlRKFPQm0DqF9zk=; b=Phkd6X+LL31vJ4gNPQRwztsdDkLLRyL2w0ZEkQCRZev+sTE+7O+mQ12m KKEb5c9LIrMzq90kPwJNMErXTSWTVhhN+uc8DYHDrwmlkMMxqceGgqqvB 76RPLHrHKYYT9dqWu7CvNNaTp+QJC+7IUwMftiKyUfCQdB28VHuxMgg09 HgP8sHc0hYBtPIHO9A9n/4w18FSODmKkd4rjFukTnyxB90s9cn/I1LupC 2psebwCX8q1LZpujx0Br3zdUC0Ea0mENlxlgGzMDS4qWe1D434juxienw TP4IKL+ORNgGg5M1F6j48xrnQ9g8g/no5BUQcWLer4ruoGOT/BBYI8BdV g==; X-IronPort-AV: E=McAfee;i="6600,9927,10928"; a="462015879" X-IronPort-AV: E=Sophos;i="6.04,286,1695711600"; d="scan'208";a="462015879" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Dec 2023 12:47:23 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10928"; a="899101508" X-IronPort-AV: E=Sophos;i="6.04,286,1695711600"; d="scan'208";a="899101508" Received: from ssomasun-mobl1.amr.corp.intel.com (HELO tzanussi-mobl1.hsd1.il.comcast.net) ([10.212.116.107]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Dec 2023 12:47:21 -0800 From: Tom Zanussi To: herbert@gondor.apana.org.au, davem@davemloft.net, fenghua.yu@intel.com Cc: dave.jiang@intel.com, tony.luck@intel.com, jacob.jun.pan@intel.com, christophe.jaillet@wanadoo.fr, linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, dmaengine@vger.kernel.org Subject: [PATCH 1/2] crypto: iaa - Change desc->priv to 0 Date: Mon, 18 Dec 2023 14:47:14 -0600 Message-Id: <20231218204715.220299-2-tom.zanussi@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231218204715.220299-1-tom.zanussi@linux.intel.com> References: <20231218204715.220299-1-tom.zanussi@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785654187543785653 X-GMAIL-MSGID: 1785654187543785653 In order for shared workqeues to work properly, desc->priv should be set to 0 rather than 1. The need for this is described in commit f5ccf55e1028 (dmaengine/idxd: Re-enable kernel workqueue under DMA API), so we need to make IAA consistent with IOMMU settings, otherwise we get: [ 141.948389] IOMMU: dmar15: Page request in Privilege Mode [ 141.948394] dmar15: Invalid page request: 2000026a100101 ffffb167 Dedicated workqueues ignore this field and are unaffected. Signed-off-by: Tom Zanussi Reviewed-by: Dave Jiang Reviewed-by: Fenghua Yu --- drivers/crypto/intel/iaa/iaa_crypto_main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/crypto/intel/iaa/iaa_crypto_main.c b/drivers/crypto/intel/iaa/iaa_crypto_main.c index eafa2dd7a5bb..5093361b0107 100644 --- a/drivers/crypto/intel/iaa/iaa_crypto_main.c +++ b/drivers/crypto/intel/iaa/iaa_crypto_main.c @@ -484,7 +484,7 @@ static int decompress_header(struct iaa_device_compression_mode *device_mode, desc->decompr_flags = mode->gen_decomp_table_flags; - desc->priv = 1; + desc->priv = 0; desc->completion_addr = idxd_desc->compl_dma; @@ -1255,7 +1255,7 @@ static int iaa_compress(struct crypto_tfm *tfm, struct acomp_req *req, IDXD_OP_FLAG_RD_SRC2_AECS | IDXD_OP_FLAG_CC; desc->opcode = IAX_OPCODE_COMPRESS; desc->compr_flags = IAA_COMP_FLAGS; - desc->priv = 1; + desc->priv = 0; desc->src1_addr = (u64)src_addr; desc->src1_size = slen; @@ -1409,7 +1409,7 @@ static int iaa_compress_verify(struct crypto_tfm *tfm, struct acomp_req *req, desc->flags = IDXD_OP_FLAG_CRAV | IDXD_OP_FLAG_RCR | IDXD_OP_FLAG_CC; desc->opcode = IAX_OPCODE_DECOMPRESS; desc->decompr_flags = IAA_DECOMP_FLAGS | IAA_DECOMP_SUPPRESS_OUTPUT; - desc->priv = 1; + desc->priv = 0; desc->src1_addr = (u64)dst_addr; desc->src1_size = *dlen; @@ -1495,7 +1495,7 @@ static int iaa_decompress(struct crypto_tfm *tfm, struct acomp_req *req, desc->opcode = IAX_OPCODE_DECOMPRESS; desc->max_dst_size = PAGE_SIZE; desc->decompr_flags = IAA_DECOMP_FLAGS; - desc->priv = 1; + desc->priv = 0; desc->src1_addr = (u64)src_addr; desc->dst_addr = (u64)dst_addr; From patchwork Mon Dec 18 20:47:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Zanussi X-Patchwork-Id: 180649 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp1522921dyi; Mon, 18 Dec 2023 12:49:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IHsIJMDzQiB9nHmkmKq3m6PT50326OC8lwfcEbfalqNQg6qYMDfLykJ1/mQvgCcQRNPfbwQ X-Received: by 2002:a05:6a20:9711:b0:18f:97c:825b with SMTP id hr17-20020a056a20971100b0018f097c825bmr8258758pzc.101.1702932549135; Mon, 18 Dec 2023 12:49:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702932549; cv=none; d=google.com; s=arc-20160816; b=S64EURsEcuwSXdrCH0x7Y5oTcqXWjbObvPRJQylIhr9IFDr3T1OrrxOHxVZHm6OsIv dz9XXB//WM5T6pCTqOg2naN+O0hNK5PV+0hG7vFPJYlwRHxwgfXw7CJTr0WjEq9amIvJ faSeAZIvF+LlH6/HltCf/IpveS8ECN/pqxNqf+0fmTf14s/eT12lvKUK9DCg6RQdmnS/ MZAXtzJmpZcCD2eE1Gq8+zuRUu5fULI1jsboJgUoKjIV28yj/AQd3iWr7yDD6+NuzFsX qAUdgWYTGSuiFn+aXGeIlRHar9KiSxTi86K+ZCjZ+kunlx0sonZ8XIN4T647tNtzpx5v OfTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=ZesbkLiacHumu2bIF2NB1k9LTRfWLjgvxx5Xfakinz8=; fh=uBWmXToShFR3GvhEPY1gX3zJanM/CT+3dK+9GAeCZ6w=; b=h4dWfzduJH2qW5yviNTiVnB+Ts84PgjPU/NWyBKPPIi5ymNFXzZV4v0U1cC6JeMMEb VgMEMUgvzvviQexgM5i1vr1Ud5WbDblwA/A88SFIsRCH0IITV2ytJkTrB5vexCE15NKF 0FCsab6Vd0xOckyAezgB5qFfkylY641UdpVcJ2JJULZwqRdLkmGFSZlOLadTdvBjRAA3 LLLDxhyWZvu/TJSUGLSC48hRHH3MtCPDaQ1Q6/rmLsHNhBP0pTgPv2MJIoT0LCUZ2K9Z qgoy91a9nCANjB26BUtR3dZ281mmvtMXEk7V37966ai+mgakCE8W/8ZFH4X4mZBSynlv mOfw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Q0b0Jcxh; spf=pass (google.com: domain of linux-kernel+bounces-4375-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4375-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id ka34-20020a056a0093a200b006be3c302801si2007851pfb.397.2023.12.18.12.49.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 12:49:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-4375-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Q0b0Jcxh; spf=pass (google.com: domain of linux-kernel+bounces-4375-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4375-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 31BD7B225D2 for ; Mon, 18 Dec 2023 20:49:08 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3F20879940; Mon, 18 Dec 2023 20:47:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="Q0b0Jcxh" X-Original-To: linux-kernel@vger.kernel.org Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 73525760B8; Mon, 18 Dec 2023 20:47:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1702932445; x=1734468445; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=H3CG4H1LUs2Woscc050DD/D/Uqec+fLNo2IJXSopJ5k=; b=Q0b0Jcxh9qdIk2DdiP1G/KKjs1rBKHgwDhPCfEIdN7B/aXRWXXvyg8yW k04XRVIMq5t8iB1jr+lYjqsYwEHPf2rfFzJ4MblnGpvHqZz7EWnLrjLPo zeftC2TFEXHRwpHhuh6/UQ4PBvylXWozsY133IEgYAaC77SqF7AHBLOrV ufURkTm2h3sNe1PPqlWjAKDNpfMvbkbk+y52zYLo70SCMb3JTUpyPxqcr OcyJUGJrWARz4SUtPt+jJPdwHr57yLPZ0AlhYXgud3pHYCLiFIpgCOjQs fSbFyFSu899nXThrfr7UPtO7TNpINDI6NpIORhx8IvBKafJDi4zflYouT Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10928"; a="462015894" X-IronPort-AV: E=Sophos;i="6.04,286,1695711600"; d="scan'208";a="462015894" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Dec 2023 12:47:25 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10928"; a="899101534" X-IronPort-AV: E=Sophos;i="6.04,286,1695711600"; d="scan'208";a="899101534" Received: from ssomasun-mobl1.amr.corp.intel.com (HELO tzanussi-mobl1.hsd1.il.comcast.net) ([10.212.116.107]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Dec 2023 12:47:24 -0800 From: Tom Zanussi To: herbert@gondor.apana.org.au, davem@davemloft.net, fenghua.yu@intel.com Cc: dave.jiang@intel.com, tony.luck@intel.com, jacob.jun.pan@intel.com, christophe.jaillet@wanadoo.fr, linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, dmaengine@vger.kernel.org Subject: [PATCH 2/2] crypto: iaa - Remove unneeded newline in update_max_adecomp_delay_ns() Date: Mon, 18 Dec 2023 14:47:15 -0600 Message-Id: <20231218204715.220299-3-tom.zanussi@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231218204715.220299-1-tom.zanussi@linux.intel.com> References: <20231218204715.220299-1-tom.zanussi@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785654201046519621 X-GMAIL-MSGID: 1785654201046519621 Remove a stray newline in update_max_adecomp_delay_ns(). Reported-by: Christophe JAILLET Signed-off-by: Tom Zanussi Reviewed-by: Dave Jiang Reviewed-by: Fenghua Yu --- drivers/crypto/intel/iaa/iaa_crypto_stats.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/crypto/intel/iaa/iaa_crypto_stats.c b/drivers/crypto/intel/iaa/iaa_crypto_stats.c index 0279edc6194e..2e3b7b73af20 100644 --- a/drivers/crypto/intel/iaa/iaa_crypto_stats.c +++ b/drivers/crypto/intel/iaa/iaa_crypto_stats.c @@ -109,7 +109,6 @@ void update_max_adecomp_delay_ns(u64 start_time_ns) time_diff = ktime_get_ns() - start_time_ns; if (time_diff > max_adecomp_delay_ns) - max_adecomp_delay_ns = time_diff; }