Received: by 2002:a89:d88:0:b0:1fa:5c73:8e2d with SMTP id eb8csp2121383lqb; Mon, 27 May 2024 08:30:13 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVXof98n/rQbBxAmpOI3q0kI+fosSq4rza5yyjPYnjLrUTD6MacT/gafeaa90V71seV9c2H0bSsoMvOZP9CJ7YyWveprKT3/XqnahcXAg== X-Google-Smtp-Source: AGHT+IHR5mnIFauO61N1Pn9zkKoy30xS6ErjZUORELumop4MrnE2tMnbCKhBwpp18FBDd51fH5u9 X-Received: by 2002:a05:622a:4d2:b0:43e:34ea:80d0 with SMTP id d75a77b69052e-43fafaffc31mr156128221cf.10.1716823813595; Mon, 27 May 2024 08:30:13 -0700 (PDT) Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id d75a77b69052e-43fb17b98ddsi83778601cf.106.2024.05.27.08.30.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 May 2024 08:30:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-191067-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@amd.com header.s=selector1 header.b=Z4VjhF2U; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-191067-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-191067-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amd.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 46DB81C2166B for ; Mon, 27 May 2024 15:30:13 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6E8C861FC0; Mon, 27 May 2024 15:27:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="Z4VjhF2U" Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam02on2074.outbound.protection.outlook.com [40.107.212.74]) (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 C066E79E1; Mon, 27 May 2024 15:27:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.212.74 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716823635; cv=fail; b=VX+cg6xn7gOv/0EU5ublcDTUGN5h/AOmhJxLyQpl9CavSz96DbrUTjhUZ+HmPfL/lEn5cAAsefRzCOnBgTMU8isGrBlLhubmnvqvV1nK+81A13w4HnbNSgTlSJlBDZm1bfYspQY2OVgmF5YfnUUK7pEqsMpW7o2UpDsxFyF8MgA= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716823635; c=relaxed/simple; bh=APQOxSHd1wyB2H3amYyZdq+93SYWQAp2oKzHBJFqbl8=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=Vtei00BAp4qJk/cbmupQJYhw+1TVMswK5xj3zRaczWIukj6kERBeY0sOObWeQP+McARPDGc6Z8GqORCawUJ5V8Vp88UCiJi6/PzO+QZeV4z3Q5tvvwi1DZpJDkkNBMVpzFy+GrVrEGQmsbsdbJCgXk3E+EapU+CcuQqzfKOTsKw= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=Z4VjhF2U; arc=fail smtp.client-ip=40.107.212.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=N+mOwGgAiURthEkA//WlotxlVkr/BXGuWWVwtQJTvVg/yYKD/gT3KMPSJsImRcLgWK+y1joEOizuIaIKPBnzVYrpdhyNX5NdgIEEvolAhF8b8SVNGQTlfTGIcOe+8crZYQQ51JlVBNnnIkoJLOhf23SJtMLY7Ai458MYBzF5BMm4JSPU8S1RPDB99r7/K/e2Lo9wLyzCJsla2fA8MoVAD0OAlsrInsHJP3xWZN0JB0SVsO3qk4CZ9dVSHpVGd6zJT9yYLh+tPLKNTfJySkNeshfzJNLVMWbGXBkYkGOe6hVNHAyiC5CbQdFHqBDFACuDhdJVjGeH8GcM9PHZWG472A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=rBPvehI7bTMsWP6XttHcGMd/kMgAZhonQ8m0020X7sU=; b=N9479TVKJ01leQnWIg7FrE/vV/5e6cPLpXKpMvyAICE1ijcDZ425rOBBiQazzYWlkC6FrbLQyTxrk6uFtRMEk2tdwdIPwhmpA2LUgOS9VI3TMrxoH7ss4Hkym+A92IGBRrZBuwQgY+UdAgBupBmbT3AhB2BVRzAUWmtTXxaZ/0i3Yi4zGGhHtDWAgFKUeQuqDW3UmuSCWXsCOVlFuZOCAs+IXq192UPnM0g2glCRp5QiTjfo4LmcNC14dwLAovjTZfQS83IDQj3UhXpF7MwWGiNGTrjzKl47wnupsQFAsqp0dbqtaT6cf+AyL01s2C0qLCp85zDMjss27ATO+CDZWQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=gondor.apana.org.au smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rBPvehI7bTMsWP6XttHcGMd/kMgAZhonQ8m0020X7sU=; b=Z4VjhF2UWF9X5zScBngU8e26XAzQLtWTOcXQA6nwqIiAIrq7rLvUYmCB7naJYhUHj7KKOly9YZm8QgP4FlBsqaFk0Bx9nFpvSF5P288Dh3+suG+IS6zKtkNHWxDNwQ5T/kFM9oOauF+WgQzd9Z49dAx3GRCKSw955zCmI9MXFDY= Received: from CH2PR05CA0028.namprd05.prod.outlook.com (2603:10b6:610::41) by IA1PR12MB6140.namprd12.prod.outlook.com (2603:10b6:208:3e8::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7611.29; Mon, 27 May 2024 15:27:10 +0000 Received: from CH3PEPF0000000F.namprd04.prod.outlook.com (2603:10b6:610:0:cafe::f) by CH2PR05CA0028.outlook.office365.com (2603:10b6:610::41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7633.16 via Frontend Transport; Mon, 27 May 2024 15:27:10 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=SATLEXMB04.amd.com; pr=C Received: from SATLEXMB04.amd.com (165.204.84.17) by CH3PEPF0000000F.mail.protection.outlook.com (10.167.244.40) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.7633.15 via Frontend Transport; Mon, 27 May 2024 15:27:09 +0000 Received: from AUS-P9-MLIMONCI.amd.com (10.180.168.240) by SATLEXMB04.amd.com (10.181.40.145) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Mon, 27 May 2024 10:27:08 -0500 From: Mario Limonciello To: Herbert Xu CC: Mario Limonciello , Tom Lendacky , "open list:AMD CRYPTOGRAPHIC COPROCESSOR (CCP) DRIVER - DB..." , Richard Hughes , open list Subject: [PATCH 0/5] Enable PSP security attributes on more SoCs Date: Mon, 27 May 2024 10:26:44 -0500 Message-ID: <20240527152649.3722-1-mario.limonciello@amd.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SATLEXMB04.amd.com (10.181.40.145) To SATLEXMB04.amd.com (10.181.40.145) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH3PEPF0000000F:EE_|IA1PR12MB6140:EE_ X-MS-Office365-Filtering-Correlation-Id: 516c5155-100a-4532-3d27-08dc7e61797c X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230031|82310400017|36860700004|376005|1800799015; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?lZyLu1Ft8e03jZiihhmMHdDvmTdrYeDIdBAVJwbuOVk4zQ6q2i+7zD+nyrAf?= =?us-ascii?Q?yCSWok+UpInp1KI/chdf8OAJkau9M52CchGtlshzhzCHGrjZqJxsmdSHBoMs?= =?us-ascii?Q?QIk3QGZ+cSd0MErDdap+23S/P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?us-ascii?Q?t6/c+8YTujH3MKDTsjcXUhwx4tJIS2ROnRldXCQO6LNMLZ27qRrLeZq22A8k?= =?us-ascii?Q?ldRCdLfzVoT/hENgcHDGgVw2m6re/JLcRfMg2DWAMNZU5rzjLfMGEic0oUC5?= =?us-ascii?Q?zaNldR97Z/sYVxJmF8ejn7lr9Y+qbST1Ycu9yg9IOQ2oec44lpt3UVuisF0k?= =?us-ascii?Q?iw5rFQpIf/1DkBLMbSRxfVGHL1pWj//BprK03NLtdAx3v5j86VCKdPKLJbIg?= =?us-ascii?Q?uJMCreNb0W1U+HlPafsM1Wk5Mp8GL18X5g4urCY6ZkbMRwBH4zHu+8B6+XCR?= =?us-ascii?Q?xmGiP92O3L20RceRfNoDxAEySW/Ag+FZLMnWRXAodnxuUBZeesxrDfUuttaD?= =?us-ascii?Q?huCaIA/hn/n80gDirecLHLPL2dY4?= X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:SATLEXMB04.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(82310400017)(36860700004)(376005)(1800799015);DIR:OUT;SFP:1101; X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 May 2024 15:27:09.4255 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 516c5155-100a-4532-3d27-08dc7e61797c X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[SATLEXMB04.amd.com] X-MS-Exchange-CrossTenant-AuthSource: CH3PEPF0000000F.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB6140 On some older SoCs the PSP doesn't export security attributes in the capabilities register. On these SoCs it is however possible to get the information by a platform access command. Restructure the driver to move all security attribute handling to a central location and then add support for calling the platform access command on those processors. Mario Limonciello (5): crypto: ccp: Represent capabilities register as a union crypto: ccp: Move security attributes to their own file crypto: ccp: align psp_platform_access_msg crypto: ccp: Add support for getting security attributes on some older systems crypto: ccp: Move message about TSME being enabled later in init MAINTAINERS | 6 ++ drivers/crypto/ccp/Makefile | 3 +- drivers/crypto/ccp/dbc.c | 2 +- drivers/crypto/ccp/hsti.c | 138 ++++++++++++++++++++++++++++ drivers/crypto/ccp/hsti.h | 17 ++++ drivers/crypto/ccp/psp-dev.c | 23 ++--- drivers/crypto/ccp/psp-dev.h | 46 +++++----- drivers/crypto/ccp/sp-dev.h | 2 +- drivers/crypto/ccp/sp-pci.c | 65 ++----------- include/linux/psp-platform-access.h | 5 +- 10 files changed, 208 insertions(+), 99 deletions(-) create mode 100644 drivers/crypto/ccp/hsti.c create mode 100644 drivers/crypto/ccp/hsti.h -- 2.43.0