From patchwork Wed Feb 28 21:10:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brijesh Singh X-Patchwork-Id: 10249827 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C5C8160211 for ; Wed, 28 Feb 2018 21:18:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B15A7289EA for ; Wed, 28 Feb 2018 21:18:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A5B1D28A46; Wed, 28 Feb 2018 21:18:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, DKIM_SIGNED,RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 08B43289EA for ; Wed, 28 Feb 2018 21:18:28 +0000 (UTC) Received: from localhost ([::1]:46988 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1er97L-0007eq-5u for patchwork-qemu-devel@patchwork.kernel.org; Wed, 28 Feb 2018 16:18:27 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:53142) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1er90G-0001GV-1P for qemu-devel@nongnu.org; Wed, 28 Feb 2018 16:11:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1er90B-0005hC-LO for qemu-devel@nongnu.org; Wed, 28 Feb 2018 16:11:07 -0500 Received: from mail-dm3nam03on0040.outbound.protection.outlook.com ([104.47.41.40]:59821 helo=NAM03-DM3-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1er90B-0005fB-Bc for qemu-devel@nongnu.org; Wed, 28 Feb 2018 16:11:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amdcloud.onmicrosoft.com; s=selector1-amd-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=cOnc1P1wctgY1YibWGFUBBzMdBnXweNpGN6vslTLgiU=; b=l06sWdIiercKFzTqmIhnTrbsUiVBMrrqQ6a5PbWC9lQU+ic/8cbThUglITVRcjtUgRID6pqF0fdXlzkKh+AD1VzBSAnGAhYfyJcciSO6Q4RnnR+3E+Tf2C7MPm0fjliRD/sdGzWXGy+3fQKEb8wNEMAYJgU+Pne5xeQ0qdDhIv4= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; Received: from wsp141597wss.amd.com (165.204.78.1) by DM2PR12MB0155.namprd12.prod.outlook.com (2a01:111:e400:50ce::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.527.15; Wed, 28 Feb 2018 21:11:00 +0000 From: Brijesh Singh To: qemu-devel@nongnu.org Date: Wed, 28 Feb 2018 15:10:10 -0600 Message-Id: <20180228211028.83970-11-brijesh.singh@amd.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180228211028.83970-1-brijesh.singh@amd.com> References: <20180228211028.83970-1-brijesh.singh@amd.com> MIME-Version: 1.0 X-Originating-IP: [165.204.78.1] X-ClientProxiedBy: DM5PR10CA0008.namprd10.prod.outlook.com (2603:10b6:4:2::18) To DM2PR12MB0155.namprd12.prod.outlook.com (2a01:111:e400:50ce::18) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 8cb9dee5-7879-41c9-d37c-08d57eefc565 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:DM2PR12MB0155; X-Microsoft-Exchange-Diagnostics: 1; DM2PR12MB0155; 3:B7W2gj8SYc+roTRjSQ7CkL/uzLpBCtsE5kwHnsfK2ee+ExMf20/ve8Hj9DxVudKUrDMMVZ9dWXCHIT4G5t7UHivR4W/pb+rYVEHkB343XRNSt1NFyYL7MC2sQt0eOFaGgAbseD4gXTs4xdUmKlnh6BdAz5QLKyDI5XUkbNeljpWGR+QjJQ2CT2q9jTjYLsO5vvuWm3qb3ZJP+oHhFg5XB5kQ0n4saMx42W/cZG0zWIb256gdiBWmivugCf5UCS5H; 25:SjiVobwK/dABQ3QvvKIHnUM0zJOLFsRhy2IgUoKJlIEmHMWc8jCdECfiXwAg2IILX/Bo/Y9H1j9fjnEUjcjSSGnC5hbQp3o3mir6uvosEgUfpoaD+ZdCeMqJ91ue5+upNMGO51jZLYqX5RU/ooalPf1B5IMyKmRA2erGmXn9hxSpqH0zgf0lh83gvSjMVywzBTcBA+3D1pnIQTh5zy1aLyS7XnJICqqzohRCB4m3sidy738ePNB28jlNFoh1mzF00FWauSj3p3ZBn8yUCo6lPHw6sni4Yxm6snjmEPcomYCJ6I9lwtTVLEJpcULLY5jGA9d1VokMK4oM95bvq4WeMA==; 31:FtTMa9Gt+Xymm+DjslIQngDx5ChODNgtIYa3p1lPFuilhpWvJ+M4ZoQoYu+YiHSJD+/7VrXXCySoeO1ij5lYczrL5Fzi4gutMLhPqfH/Na0TM2omDn06PjVjZTzEHVmOkMt7aaSi3qCt4r4QEewyOOctO2dXaGrc0HX3susbxuZXntxo52BSeeH8LweI0Jv8XV/QCiqElSS2o1PJrl2ukgCeove9FSw0nWLJw+LDgdQ= X-MS-TrafficTypeDiagnostic: DM2PR12MB0155: X-Microsoft-Exchange-Diagnostics: 1; DM2PR12MB0155; 20:8aNUuPpQ4vNNoAa3hlNFQnKqfOYBy+zEMW/e4IAPxRGxVqcSElxAATZ5DEGyZ+YbGJIcuhnfxXhn+vvPjKVIl36PqtYqxsBYIx0ZNtgKd+z5siujTmKiY8qyZSZBfNEqwg/B71DWxOJlCxIAn3yOQ2RSQnToZGDhvRqT3HUS/FpgyqVvRPFe8N4iGbGSfqACnzqllkRUZeo+T2mV4mHQFMCUcu8RCNmi1GiGjMTSoz14tEiYUMW9docFCIVeBUDSvGSTncCdXM16HAw4Lnh0vlqwc34cU2XSFQ3e6vg82xxdr3hzalcBW7B8ephV5ww4i+mokY0/Z6gFaXlMouD1FBYtw/Wq/gBqnIdICxjD0MFx1+AGOdoRPT5DlM875c85mHgc7OQXVA/z3uQVMv3Rk8MCjHtl5Ef93GUMTexzDYoBoSp5RmPGlzuv9wXAGW8n3GY7DbaQNU8zX9XMdCLpu4QTRv1fd1VW16/+iDxIbbDkyY9wSFyxdqTJBlNHxrzf; 4:Vk3hblJdr/Pb0rTfjkzK0EmQj6AYa++RnRXZ00+T2owoYDjDtUZOtPVXDigQQSA1jYvzhfnLxWu3flODXbYSrNNWjItA6oN2MrBaMk19yT+ZmavWvQwJJOjjMoqNjyYnLh/q8ZldDvf5Jc3n6BIsWKseGA7UoI/IEwf3/43feYZUBRlW74OKKkwoSUwANQMh1IbENexUWZyW6O+vdKAjbsc5MTRITI+KIdZV4DYB/ItY7zQmVXYp1gFYLXnUb72bmAR1BrpUxmgO0Y5TJx3no58F2ebfiPTtLvO5YkCRfqZujvmrp7ThIOzcyYbSqMYD X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040501)(2401047)(8121501046)(5005006)(3231220)(944501219)(52105095)(3002001)(93006095)(93001095)(10201501046)(6055026)(6041288)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(6072148)(201708071742011); SRVR:DM2PR12MB0155; BCL:0; PCL:0; RULEID:; SRVR:DM2PR12MB0155; X-Forefront-PRVS: 0597911EE1 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(1496009)(39860400002)(39380400002)(396003)(346002)(366004)(376002)(189003)(199004)(6486002)(6116002)(1076002)(2351001)(36756003)(16526019)(16586007)(54906003)(53416004)(26005)(53936002)(66066001)(186003)(47776003)(6306002)(59450400001)(2361001)(966005)(478600001)(8666007)(316002)(81166006)(50226002)(8676002)(8936002)(386003)(106356001)(97736004)(5660300001)(2950100002)(6666003)(305945005)(4326008)(76176011)(7736002)(39060400002)(8656006)(105586002)(68736007)(50466002)(7696005)(51416003)(25786009)(48376002)(52116002)(3846002)(2906002)(86362001)(81156014)(7416002)(6916009)(2004002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM2PR12MB0155; H:wsp141597wss.amd.com; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: amd.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM2PR12MB0155; 23:VITnJPspp/Iw1qJ3jiofP0aSWnE50xUPHkV7SN6Ot?= =?us-ascii?Q?vO93l40iQbvx4YXkYcPAYhoQxYfCcwMnSQLJ8ByUT9Me+X32KXYGoFVtMqzX?= =?us-ascii?Q?Fxgq+mKzzMy+5FY3Ndj7cOkCi9/34Dz+CoxxpN/BuFUl1k3K82dx68zueb5R?= =?us-ascii?Q?jUEiFddqitjvnurbwf9CJ6hdAjfmuEYzGu7Os0bQOL6PYD7zJT4yUkVJuIg5?= =?us-ascii?Q?afnLwNMTyBbEV+uaUv1yGJcMbKalOydF03cJh6BoqSFi8uO2o1oNyPLrzsKc?= =?us-ascii?Q?6dIJqI2Rr3KoNS85iOI4HC4Wdc21E9e4w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KgsJWd9rJAizB2LPwoPOaLYnJNqn93B/3q8JjTDaeP0av0PjjAQCWVsg3EGYLScEkAHQZRbg6HiTH SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; DM2PR12MB0155; 20:wiSEqTF3hwrLwl+wcob2BWWgQ/5VYX6g4TEIDKLVZjduE0M+61UcIAxoxU1G+BZZchiV6Mr6+vh/cDKZty5iWH482Y+9H4cjCtzgfGtSvDvPOcEWxjrMeA7l8JbhxDn5LhqC+IZtE9DW7pNo1n8fMwqx/psLoZ4TtfmVKcTzEobAVrWmuWs018OPxa8lp5/OyHHm8zuIlGQSnPWWd2ei6Q2RdYtsaZNWVWqNKPczkyAprH/S+mMlpxcMNKKq+OZv X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Feb 2018 21:11:00.9674 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 8cb9dee5-7879-41c9-d37c-08d57eefc565 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR12MB0155 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.41.40 Subject: [Qemu-devel] [PATCH v10 10/28] include: add psp-sev.h header file X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Brijesh Singh , kvm@vger.kernel.org, "Michael S. Tsirkin" , Stefan Hajnoczi , Alexander Graf , "Edgar E. Iglesias" , Markus Armbruster , Bruce Rogers , Christian Borntraeger , Marcel Apfelbaum , Borislav Petkov , Thomas Lendacky , Eduardo Habkost , Richard Henderson , "Dr. David Alan Gilbert" , Alistair Francis , Cornelia Huck , Richard Henderson , Peter Crosthwaite , Paolo Bonzini Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP The header file provide the ioctl command and structure to communicate with /dev/sev device. Cc: Paolo Bonzini Cc: Richard Henderson Cc: Eduardo Habkost Signed-off-by: Brijesh Singh --- linux-headers/linux/psp-sev.h | 142 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 142 insertions(+) create mode 100644 linux-headers/linux/psp-sev.h diff --git a/linux-headers/linux/psp-sev.h b/linux-headers/linux/psp-sev.h new file mode 100644 index 000000000000..33e247471ae0 --- /dev/null +++ b/linux-headers/linux/psp-sev.h @@ -0,0 +1,142 @@ +/* + * Userspace interface for AMD Secure Encrypted Virtualization (SEV) + * platform management commands. + * + * Copyright (C) 2016-2017 Advanced Micro Devices, Inc. + * + * Author: Brijesh Singh + * + * SEV spec 0.14 is available at: + * http://support.amd.com/TechDocs/55766_SEV-KM%20API_Specification.pdf + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#ifndef __PSP_SEV_USER_H__ +#define __PSP_SEV_USER_H__ + +#include + +/** + * SEV platform commands + */ +enum { + SEV_FACTORY_RESET = 0, + SEV_PLATFORM_STATUS, + SEV_PEK_GEN, + SEV_PEK_CSR, + SEV_PDH_GEN, + SEV_PDH_CERT_EXPORT, + SEV_PEK_CERT_IMPORT, + + SEV_MAX, +}; + +/** + * SEV Firmware status code + */ +typedef enum { + SEV_RET_SUCCESS = 0, + SEV_RET_INVALID_PLATFORM_STATE, + SEV_RET_INVALID_GUEST_STATE, + SEV_RET_INAVLID_CONFIG, + SEV_RET_INVALID_LEN, + SEV_RET_ALREADY_OWNED, + SEV_RET_INVALID_CERTIFICATE, + SEV_RET_POLICY_FAILURE, + SEV_RET_INACTIVE, + SEV_RET_INVALID_ADDRESS, + SEV_RET_BAD_SIGNATURE, + SEV_RET_BAD_MEASUREMENT, + SEV_RET_ASID_OWNED, + SEV_RET_INVALID_ASID, + SEV_RET_WBINVD_REQUIRED, + SEV_RET_DFFLUSH_REQUIRED, + SEV_RET_INVALID_GUEST, + SEV_RET_INVALID_COMMAND, + SEV_RET_ACTIVE, + SEV_RET_HWSEV_RET_PLATFORM, + SEV_RET_HWSEV_RET_UNSAFE, + SEV_RET_UNSUPPORTED, + SEV_RET_MAX, +} sev_ret_code; + +/** + * struct sev_user_data_status - PLATFORM_STATUS command parameters + * + * @major: major API version + * @minor: minor API version + * @state: platform state + * @flags: platform config flags + * @build: firmware build id for API version + * @guest_count: number of active guests + */ +struct sev_user_data_status { + __u8 api_major; /* Out */ + __u8 api_minor; /* Out */ + __u8 state; /* Out */ + __u32 flags; /* Out */ + __u8 build; /* Out */ + __u32 guest_count; /* Out */ +} __attribute__((packed)); + +/** + * struct sev_user_data_pek_csr - PEK_CSR command parameters + * + * @address: PEK certificate chain + * @length: length of certificate + */ +struct sev_user_data_pek_csr { + __u64 address; /* In */ + __u32 length; /* In/Out */ +} __attribute__((packed)); + +/** + * struct sev_user_data_cert_import - PEK_CERT_IMPORT command parameters + * + * @pek_address: PEK certificate chain + * @pek_len: length of PEK certificate + * @oca_address: OCA certificate chain + * @oca_len: length of OCA certificate + */ +struct sev_user_data_pek_cert_import { + __u64 pek_cert_address; /* In */ + __u32 pek_cert_len; /* In */ + __u64 oca_cert_address; /* In */ + __u32 oca_cert_len; /* In */ +} __attribute__((packed)); + +/** + * struct sev_user_data_pdh_cert_export - PDH_CERT_EXPORT command parameters + * + * @pdh_address: PDH certificate address + * @pdh_len: length of PDH certificate + * @cert_chain_address: PDH certificate chain + * @cert_chain_len: length of PDH certificate chain + */ +struct sev_user_data_pdh_cert_export { + __u64 pdh_cert_address; /* In */ + __u32 pdh_cert_len; /* In/Out */ + __u64 cert_chain_address; /* In */ + __u32 cert_chain_len; /* In/Out */ +} __attribute__((packed)); + +/** + * struct sev_issue_cmd - SEV ioctl parameters + * + * @cmd: SEV commands to execute + * @opaque: pointer to the command structure + * @error: SEV FW return code on failure + */ +struct sev_issue_cmd { + __u32 cmd; /* In */ + __u64 data; /* In */ + __u32 error; /* Out */ +} __attribute__((packed)); + +#define SEV_IOC_TYPE 'S' +#define SEV_ISSUE_CMD _IOWR(SEV_IOC_TYPE, 0x0, struct sev_issue_cmd) + +#endif /* __PSP_USER_SEV_H */