From patchwork Mon Feb 12 15:37: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: 10213461 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 6E35260467 for ; Mon, 12 Feb 2018 16:13:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5F14B28A0B for ; Mon, 12 Feb 2018 16:13:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5301D28A3D; Mon, 12 Feb 2018 16:13:11 +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 24A4528A0B for ; Mon, 12 Feb 2018 16:13:10 +0000 (UTC) Received: from localhost ([::1]:47007 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1elGj7-0007nb-9X for patchwork-qemu-devel@patchwork.kernel.org; Mon, 12 Feb 2018 11:13:09 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:56352) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1elGBt-0003nh-KQ for qemu-devel@nongnu.org; Mon, 12 Feb 2018 10:38:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1elGBq-0004bH-3T for qemu-devel@nongnu.org; Mon, 12 Feb 2018 10:38:49 -0500 Received: from mail-by2nam01on0069.outbound.protection.outlook.com ([104.47.34.69]:1440 helo=NAM01-BY2-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 1elGBp-0004Yx-Pk for qemu-devel@nongnu.org; Mon, 12 Feb 2018 10:38:46 -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=VK1TSAfMuQLsX31PVpCH7rPgxkeW8FO7qCCchZGwKE2QuCyDf6YFAeqCLc0EbdL1Lo3fngq/ZywDg/KYkkDfn49UsfDvldNDR3lNhI5W8NNaCioNfpG4IO4M6lQC1ONUOf7lfJlyKFp/apKE8FZNQTIP+7ekUEONHd/jivZ66CY= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; Received: from wsp141597wss.amd.com (165.204.78.1) by BY2PR12MB0146.namprd12.prod.outlook.com (10.162.82.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.485.10; Mon, 12 Feb 2018 15:38:40 +0000 From: Brijesh Singh To: qemu-devel@nongnu.org Date: Mon, 12 Feb 2018 09:37:10 -0600 Message-Id: <20180212153715.87555-24-brijesh.singh@amd.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180212153715.87555-1-brijesh.singh@amd.com> References: <20180212153715.87555-1-brijesh.singh@amd.com> MIME-Version: 1.0 X-Originating-IP: [165.204.78.1] X-ClientProxiedBy: SN4PR0801CA0004.namprd08.prod.outlook.com (10.161.215.142) To BY2PR12MB0146.namprd12.prod.outlook.com (10.162.82.19) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 21c8c818-fd26-4640-5700-08d5722eb1c9 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:BY2PR12MB0146; X-Microsoft-Exchange-Diagnostics: 1; BY2PR12MB0146; 3:QRLB8pu4MqIpLNpW9DU3bzMBD/pNN7MA8gXS9Lup2ImNKO4mDBSY6jrV147PGYZPtvxAhO/Fdi2sTgXGunMvctRQ2I3u6kNjb2QXAvORo06fb+0mEYabxHsabJpFa0OG+EI6XZyNItbncgTZJwyfH+uIeyVx3f+z7msbqweaERzz3EV7Vu6y31CpQid1euO+rDZBQ5x5NhHbUERTvkmO3iio2JK03h+WmNM60DNYDjBqQqrOCkRlUx7M78Ahhuf/; 25:D/OZLCN2NtPJf9OdVKvFmxXKgFq5zJeL1Dg7ximzhLvU7SpOtd1Q5krzdqG2T26sG/MCWCVx1rSIKQunoHY3oKPttHONjVejyRLiAbTKmuAZKMKejscIcVmTVRZNizPnsb7iC70ETWP9Lp2lRmjriIFhg//35172Fr/JU2MdRV+XfPSkJzHas30uBBAcTLQAv+koRcQ7fNqNa737W1iBDiitcktgQBhPKXtuiYL+PyCZ5YNuY5Gk950wCfPx0scmEVTed0WLgJsbodpxIBc91hHM6qIujuAZsgcnikc5fJr31xD7lGZu20HnFabk92Vd9L77C8uLR9oLLht283aHgg==; 31:uNyu+Je7VuXB/hKHPfOkOn4hyJr9l6vc9S0gyR2WzzpKzYDF3/g6hVvEtDxE3c3VmWDnQvhhY4RYi4NSESg9GgR2/x81y7pD0+HC2XDJiSX+98mSAW8WPaDyQOH+KFzQwXtEaL5Kt18FA4JO0ottOYgPyR5WuTgSN1YcmcHZVvw9XzmA9OSLwmNIh6S5LiwdvtygdohheiCURMza3xJjmIEYT0kS6iH0HreIfhUPtWQ= X-MS-TrafficTypeDiagnostic: BY2PR12MB0146: X-Microsoft-Exchange-Diagnostics: 1; BY2PR12MB0146; 20:P0x4qh5jG0ry0kNJqj13yPYrs4a2g2oVgqBR3rD6QGq2pNaBoYRR1F804yk0Z/ewNywMf245Qemes7RSJJ/f/laMPoD0EV42L+lv1RmksqhLVGtLhvB7X1qoT1FXDs0UX7q/dvIaSn1EhRM+X6WAMKu/Ie3+G+kyVPO10xa7MTbzi+vzeCU9PODIRCR+pelQAFgtgbW5t5+dXIhmUTOTCdNCBHAejMzEi4lK+8e7eYtSKdHIGyWRqhOuuTiOLxi07YD4kipaIJByLVHNuufUL8CQ2LPRnoUDL6NdWlxZr9CvjvoGZocy+wKU7hgr2MLFOLiknbcWRtdb9s/0KQzkJg+bIARbwHUgPKP42Xs/LmsNItFiLsa8Z5jkJ/fbM+Z/Z+EoEKGnWyDkq8Dh//4g4d+FW9JX5AqCm+A7h8vDkHvi+C06MyhAF1TJUIMV2NnpbulDkzfzZ2n7ZMHGVV3Qjc+vRNkvc1qGHxVRA6RO2gMz9zhaQDZn6lP74Cs2UFfz; 4:ESPZHtc5wnn5ECdcEX637+znjThh5Drvb+UlwrMxEenVCLFJOmGoqQlJgugPMwdrV3paAYBYr+Kh/gyWhfxmGstkFx4yKadKq6vFkX7Lazo2lUyi3fxzTOIxOE96WwX5dMYopMKwceJ5uk1B80nVMUGoFoIw93ggtREvOK1oIlL0GhJ7F4EZjxLah0UTdpp2bWHvjfolrv+aPuZhUY8opVmKuETds3vaqvD6NoSBfrvi2TLeuZDRSWotQDP/tkG9KGtq9AbDvrAq1qucFiW4sXNQLDIl4tMw+FH9mvMirPc8cHXqV3jOKcvOsvoeTk4Y X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(8121501046)(5005006)(93006095)(93001095)(10201501046)(3002001)(3231101)(2400082)(944501161)(6055026)(6041288)(20161123564045)(20161123558120)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(6072148)(201708071742011); SRVR:BY2PR12MB0146; BCL:0; PCL:0; RULEID:; SRVR:BY2PR12MB0146; X-Forefront-PRVS: 0581B5AB35 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(1496009)(39380400002)(39860400002)(346002)(396003)(366004)(376002)(199004)(189003)(25786009)(53416004)(66066001)(8676002)(7416002)(105586002)(59450400001)(81156014)(76176011)(81166006)(5660300001)(97736004)(186003)(16526019)(8936002)(106356001)(50226002)(2361001)(6116002)(3846002)(47776003)(305945005)(1076002)(86362001)(26005)(2351001)(7736002)(478600001)(51416003)(36756003)(4326008)(2906002)(6306002)(53936002)(6666003)(2950100002)(8656006)(52116002)(6486002)(48376002)(966005)(39060400002)(68736007)(54906003)(16586007)(7696005)(386003)(316002)(6916009)(50466002)(8666007)(2004002); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR12MB0146; H:wsp141597wss.amd.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX: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; BY2PR12MB0146; 23:kisq72c7wsg/9GFTl8ZEg/bMTg6NRzCfthw90WLQV?= =?us-ascii?Q?1OH5fukJtRtv/82lqRyXfbwflUu/SBBwjFngSKHR+DkVS9k4fYnQ/JyPVFZ7?= =?us-ascii?Q?fAIOcAdESau3kziRE3JuigQEkq6xcp875MH28WKFKr4JVED5QU3ad2K/sni5?= =?us-ascii?Q?3WiVPo9oKjKrIxXLXR90li476g9nSLOX88960rsKmDxLK52kG9gIrorn95bG?= =?us-ascii?Q?F6W7Bt13KzcUQOOffL+JNgMV3d3g2LiI8nsXjjnMxknvzBhWh9lSoLEP0JwU?= =?us-ascii?Q?QdyCxTF1iFWnsMBI9CY7WCFft2TN0Vlx6eCjgVH1n8549Ho58PoYPQtGOQOQ?= =?us-ascii?Q?YA3ujj3xsAPR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tGqNipfwkshL2I0ILnFHHbhH4cty4XGGMvTBSBdKuFi2j SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY2PR12MB0146; 20:oIi1aM/BnRXKLvlCChFRZa11elD1qykqEEc70go/O/x7PkG0kmHIk9BSwW0QzxIbh2+uK6kY0du4FDud7a6HPnzKHeB9XOzTVb0Pg7COev3Q3m/Xukh8dMxkJ7tAyvpyNFZmcUj2VsZuJmol2CDbWWktxnLrfHY0r1xyJGX1z05VB7mKWdFoLeZXVYYiQZnL15RlXRTP+Sn2k8pVVOssDJ3urIWypzQ4kTETMzG8vUsGQhyBG6JSnbz8WKxWvBZB X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Feb 2018 15:38:40.5400 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 21c8c818-fd26-4640-5700-08d5722eb1c9 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR12MB0146 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.34.69 Subject: [Qemu-devel] [PATCH v8 23/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 */