Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp4178055ybc; Tue, 26 Nov 2019 05:10:21 -0800 (PST) X-Google-Smtp-Source: APXvYqyhc1gXOEpRjATaAgt/NzOE94zPi2Dyvl9hFWxP8FlE2u3215ocMeB0tyCRVHD6+rzvPLHB X-Received: by 2002:a17:907:20b4:: with SMTP id pw20mr42182902ejb.83.1574773821334; Tue, 26 Nov 2019 05:10:21 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1574773821; cv=pass; d=google.com; s=arc-20160816; b=ERUUEz6hw4z4eeVvaejF6lnjHf9+aSufEfhvg9D1p6H4KDBLxGcey4NoUBOfeYnwET 5Dws6H1c03rIZs6xcz2PUqW9T5PNMqYIl/Hz4YhA0xKzpin5rEB0fynaPnsxYiJIet9F H4UkugXwXVP9iOX9bxlOX4uuYowWSO/SXRkqFiKu94GlQ/r4ntaBbqIcP2whel35n3U3 lXOMcbII5VDLEcEn+AJY01AaZLLLCKugiCalZMnVWOCF9oilrib0REBkeKh0X5rHfz/I xHVJP8i53SDFnmv6o3wk4KRaG+KQij82UURON+BnDvwx21KwEgLhD/evHOZbmgfzit/9 O9bA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:in-reply-to:user-agent:date:message-id:from :references:cc:to:subject:dkim-signature; bh=nQRy47rxdH/mPCmYQwqVzDEwtEMm5y7+3NeiDCgmcBA=; b=OK4zxgNKyDxtRuNtt/MjDssDRc29GXtC/JQhU9GOs5T0WDZKf9AKEDfVCSxkMNVDEO 1hr7CEZMr67v/bqJGJv/xB6JSFabyt8cNyG58jS755f7EfWrSG60NCO1zEQto/iKtHyT JcXViQZwf9pDzG6O0C5i2DjtVBn0XPd4S2hoRU03EQUCTIVWlfV7CVzpnpc3I68dCDp4 NkWW37UMFi0nxW3mI6kYTdtwm0ttZNtTawZ3YBCbERxVBfyOKjydNP1wDRiMjxVqRNA6 3cb2AFnYVJl3WAYQXSRX9qeAHp9xO0dCOGbPBT+47y941ivJsRL8hVHInf32jHAf5x6M 16dQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector2-amdcloud-onmicrosoft-com header.b="i/k3fVNh"; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id qh13si6950489ejb.407.2019.11.26.05.09.54; Tue, 26 Nov 2019 05:10:21 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@amdcloud.onmicrosoft.com header.s=selector2-amdcloud-onmicrosoft-com header.b="i/k3fVNh"; arc=pass (i=1 spf=pass spfdomain=amd.com dkim=pass dkdomain=amd.com dmarc=pass fromdomain=amd.com); spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727695AbfKZNBG (ORCPT + 99 others); Tue, 26 Nov 2019 08:01:06 -0500 Received: from mail-eopbgr730054.outbound.protection.outlook.com ([40.107.73.54]:24507 "EHLO NAM05-DM3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726926AbfKZNBG (ORCPT ); Tue, 26 Nov 2019 08:01:06 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=G0ybpQ4jc7dFIfBaimcJPZuvB3gWoZ9uylPR42nP+WwOTVVF5i8rw0D7YC+g6gwNfDlqc7zQhzbh7IELF+6iEv+qgRV/BzZNNiVwO83HBBPjHSWagyNsNs72N8xlenZIFrOEZIc/VkOf5yBbNvM7hctQR//oN8HLZkZXIJboFdQRh1kxQuBz9OAYyHGutQ+OVL/hHWI6UDlLEBt96Vm+2Cr3ab9tv6C17vdveHMBrPwmXQWXMrxnOosEvZDSpaNfTRoTigUgeegSWPHZjO9rcrjR51gxU5oe4ug39t40hVxC3ep0BoXFOTvkgmaMjSWue3rTdtrYf3Eww8pc3SezBQ== 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-SenderADCheck; bh=nQRy47rxdH/mPCmYQwqVzDEwtEMm5y7+3NeiDCgmcBA=; b=E51dIWpyldRv2Z7hM1FegB2I1h0Qk+3PLNAbRHDDbBDkSPo6XCQHR/92aYskZsLF7Y8JKU5nUHR+7HhgW61MBZy9rzPGzXHypUBcqBXIwf4ZCJiP+6TtOGwHh6LRZEGB8+MWa5f79Z+DdAc9Mqz81EtC93/hpNTL2rL8gmkVsmiuIaI44u2seR22VgJfJBstjUTqJ4bzin/nFCFnj7n5WAoBOWtonfGDx/+4heVA6P9pEB12JzRBFzz7FqxHpZx+IigF+XkuLWHsoVB5bv0wOBDOk+TKntnDLCn3Kv5+87kOjZuH5A+YSDQucQCrd0H+5MBtCttJot4oYnnfSDabvg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector2-amdcloud-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=nQRy47rxdH/mPCmYQwqVzDEwtEMm5y7+3NeiDCgmcBA=; b=i/k3fVNhoLxPB7upfh7O6QlPGWkBtfey5nzq+P16+RxepV9vTEo7klvjvMRjKWq903bmClvsRvRTN1Ps6QFcy0K2yqdLURsbl7na0H99aAVO7ewUTaDMk1E+VBRftP5ubwgWfrpQLMBD1wTnOWwtuXuzKtSQ1XsY6wqNnxVzN84= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Rijo-john.Thomas@amd.com; Received: from DM5PR12MB1932.namprd12.prod.outlook.com (10.175.89.23) by DM5PR12MB1675.namprd12.prod.outlook.com (10.172.34.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2495.17; Tue, 26 Nov 2019 13:01:02 +0000 Received: from DM5PR12MB1932.namprd12.prod.outlook.com ([fe80::cce8:3bc3:54c7:26ea]) by DM5PR12MB1932.namprd12.prod.outlook.com ([fe80::cce8:3bc3:54c7:26ea%8]) with mapi id 15.20.2474.023; Tue, 26 Nov 2019 13:01:02 +0000 Subject: Re: [RFC PATCH 0/2] TEE driver for AMD APUs To: Jens Wiklander Cc: "tee-dev@lists.linaro.org" , "linux-kernel@vger.kernel.org" , "Easow, Nimesh" , "Rangasamy, Devaraj" References: <20191105151731.GA22448@jax> From: "Thomas, Rijo-john" Message-ID: <5a6f17c6-c74c-0b03-c94e-6234ee7d305f@amd.com> Date: Tue, 26 Nov 2019 18:30:41 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 In-Reply-To: <20191105151731.GA22448@jax> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-ClientProxiedBy: MAXPR01CA0118.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:5d::36) To DM5PR12MB1932.namprd12.prod.outlook.com (2603:10b6:3:10e::23) MIME-Version: 1.0 X-Originating-IP: [165.204.156.251] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: dc05f12a-d895-448e-501f-08d77270b093 X-MS-TrafficTypeDiagnostic: DM5PR12MB1675:|DM5PR12MB1675: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-Forefront-PRVS: 0233768B38 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4636009)(396003)(346002)(39860400002)(136003)(376002)(366004)(199004)(189003)(305945005)(6486002)(2906002)(31696002)(54906003)(6306002)(186003)(8676002)(6512007)(58126008)(26005)(81166006)(81156014)(14454004)(25786009)(86362001)(6916009)(6436002)(4326008)(316002)(478600001)(31686004)(6246003)(7736002)(66476007)(53546011)(6506007)(386003)(2486003)(52116002)(6666004)(229853002)(99286004)(66556008)(230700001)(8936002)(23676004)(66946007)(76176011)(36756003)(47776003)(11346002)(2616005)(3846002)(50466002)(5660300002)(966005)(14444005)(446003)(65806001)(65956001)(66066001)(6116002);DIR:OUT;SFP:1101;SCL:1;SRVR:DM5PR12MB1675;H:DM5PR12MB1932.namprd12.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: P55JxutYqbw+D77YC2hU1dmaf8PqRmnPpE6eOEfqbpGziFH+B6+NvcxHnkHvVurb0d0BWXpVOjq2qL4vHyXXPq98lqlZ6wabZrvijv0ixybd2zhusOBX3g57s6WyK5+JbCHHRdp0EDoEt5XANN954n5uea17RxwGDESv1w2x1VanV/R4F2VfTGoqcYb7ZmPhrCpZyyG7ty5BuFvQmQccjpUla2yIZEl706Fz2q2pAEA/+dbpcNBILOU0j0OGJoSEaDYE2VLKt8YXIxq+jQl7lW1KXTcoICVZKgx/7zIs9xOXASy2HnpBCVSCbPvO02kVqkj84c44yT+BywtD63k3K8Hi3Hjnzypr+AANn1aSawY2YyQJ5BDJs22olIL05cFg+HqNiE9VfWV08cM9zDAqwg7e50pybxcpKpoJ4Hsbf1nKeq4NnnEC41u73qgHQXMUivpbgNr00RHUHgqdvkH45bs5Wp/EcE3Mi08lv8ewjes= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: dc05f12a-d895-448e-501f-08d77270b093 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Nov 2019 13:01:02.3211 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: eBs620kg9ZgIHyuxwQ/1YXoWuCOmiMp4e3w4m0S6jjZi4XmP6xu2H6TaHOeIbOr5lqgX5miyDd2RYadAhE8jWA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR12MB1675 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jens, On 05/11/19 8:47 PM, Jens Wiklander wrote: > Hi Rijo, > > On Wed, Oct 23, 2019 at 11:30:56AM +0000, Thomas, Rijo-john wrote: >> This patch series introduces Trusted Execution Environment (TEE) driver >> for AMD APU enabled systems. The TEE is a secure area of a processor which >> ensures that sensitive data is stored, processed and protected in an >> isolated and trusted environment. The AMD Secure Processor is a dedicated >> processor which provides TEE to enable HW platform security. It offers >> protection against software attacks generated in Rich Operating >> System (Rich OS) such as Linux running on x86. The AMD-TEE Trusted OS >> running on AMD Secure Processor allows loading and execution of security >> sensitive applications called Trusted Applications (TAs). An example of >> a TA would be a DRM (Digital Rights Management) TA written to enforce >> content protection. >> >> Linux already provides a tee subsystem, which is described in [1]. The tee >> subsystem provides a generic TEE ioctl interface which can be used by user >> space to talk to a TEE driver. AMD-TEE driver registers with tee subsystem >> and implements tee function callbacks in an AMD platform specific manner. >> >> The following TEE commands are recognized by AMD-TEE Trusted OS: >> 1. TEE_CMD_ID_LOAD_TA : Load Trusted Application (TA) binary into TEE >> environment >> 2. TEE_CMD_ID_UNLOAD_TA : Unload TA binary from TEE environment >> 3. TEE_CMD_ID_OPEN_SESSION : Open session with loaded TA >> 4. TEE_CMD_ID_CLOSE_SESSION : Close session with loaded TA >> 5. TEE_CMD_ID_INVOKE_CMD : Invoke a command with loaded TA >> 6. TEE_CMD_ID_MAP_SHARED_MEM : Map shared memory >> 7. TEE_CMD_ID_UNMAP_SHARED_MEM : Unmap shared memory >> >> Each command has its own payload format. The AMD-TEE driver creates a >> command buffer payload for submission to AMD-TEE Trusted OS. >> >> This patch series has a dependency on another patch set titled - Add TEE >> interface support to AMD Secure Processor driver. >> >> [1] https://www.kernel.org/doc/Documentation/tee.txt > > Please add a section in Documentation/tee.txt describing the AMD-TEE driver. > Sure, I will update Documentation/tee.txt describing the AMD-TEE driver. Thanks, Rijo > Cheers, > Jens > >> >> Rijo Thomas (2): >> tee: allow compilation of tee subsystem for AMD CPUs >> tee: add AMD-TEE driver >> >> drivers/tee/Kconfig | 4 +- >> drivers/tee/Makefile | 1 + >> drivers/tee/amdtee/Kconfig | 8 + >> drivers/tee/amdtee/Makefile | 5 + >> drivers/tee/amdtee/amdtee_if.h | 183 +++++++++++++ >> drivers/tee/amdtee/amdtee_private.h | 159 +++++++++++ >> drivers/tee/amdtee/call.c | 370 ++++++++++++++++++++++++++ >> drivers/tee/amdtee/core.c | 510 ++++++++++++++++++++++++++++++++++++ >> drivers/tee/amdtee/shm_pool.c | 130 +++++++++ >> include/uapi/linux/tee.h | 1 + >> 10 files changed, 1369 insertions(+), 2 deletions(-) >> create mode 100644 drivers/tee/amdtee/Kconfig >> create mode 100644 drivers/tee/amdtee/Makefile >> create mode 100644 drivers/tee/amdtee/amdtee_if.h >> create mode 100644 drivers/tee/amdtee/amdtee_private.h >> create mode 100644 drivers/tee/amdtee/call.c >> create mode 100644 drivers/tee/amdtee/core.c >> create mode 100644 drivers/tee/amdtee/shm_pool.c >> >> -- >> 1.9.1 >>