From patchwork Thu Feb 15 15:39:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Brijesh Singh X-Patchwork-Id: 10222205 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 E2A80602CB for ; Thu, 15 Feb 2018 16:06:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D211529453 for ; Thu, 15 Feb 2018 16:06:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C648C29457; Thu, 15 Feb 2018 16:06:55 +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=ham 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 10BA629453 for ; Thu, 15 Feb 2018 16:06:54 +0000 (UTC) Received: from localhost ([::1]:33595 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1emM3i-0005ZS-02 for patchwork-qemu-devel@patchwork.kernel.org; Thu, 15 Feb 2018 11:06:54 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35885) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1emLes-0004ki-SO for qemu-devel@nongnu.org; Thu, 15 Feb 2018 10:41:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1emLeo-0003eB-Kh for qemu-devel@nongnu.org; Thu, 15 Feb 2018 10:41:14 -0500 Received: from mail-bn3nam01on0087.outbound.protection.outlook.com ([104.47.33.87]:32275 helo=NAM01-BN3-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 1emLeo-0003dx-FZ for qemu-devel@nongnu.org; Thu, 15 Feb 2018 10:41:10 -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=xj7gc7go/M8GjhxFW/iD/qBDfme6N10hfc+M3Gi7gdzjX+VPtXfyZ2ZF7CME9pMFc2Uo8YltICjQ8O19UGG2gRN8iXylER0tD7CmRGsUsr0X2iTv1GygNb1HotuUY9hyUFLG6hpMdt1bfWt111UGDU2vgS5RT9pfdbQnzWe3jiU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; Received: from wsp141597wss.amd.com (165.204.78.1) by SN1PR12MB0157.namprd12.prod.outlook.com (10.162.3.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.506.18; Thu, 15 Feb 2018 15:41:05 +0000 From: Brijesh Singh To: qemu-devel@nongnu.org Date: Thu, 15 Feb 2018 09:39:49 -0600 Message-Id: <20180215153955.3253-24-brijesh.singh@amd.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180215153955.3253-1-brijesh.singh@amd.com> References: <20180215153955.3253-1-brijesh.singh@amd.com> MIME-Version: 1.0 X-Originating-IP: [165.204.78.1] X-ClientProxiedBy: CY4PR04CA0044.namprd04.prod.outlook.com (10.172.133.30) To SN1PR12MB0157.namprd12.prod.outlook.com (10.162.3.144) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: fd8ee511-02c0-4f44-5203-08d5748a8763 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(48565401081)(4534165)(4627221)(201703031133081)(201702281549075)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:SN1PR12MB0157; X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0157; 3:RI0MYmXr5XoHqsem1DmtaVoK8U93u04pZx7XtXmyUTtTXJS45uQR3PLspDBZ2hdJD4iQM25A9ritBUUSDwPWvRTmilZPjROOl0NtBzRlxtgfr8Xp57Q1z2psZRGKQOOLICeWf/2RKDb5/leFsFYp6JYsHPhkWGpaGSNVdmbgaaVYIhsDKr1EkMO0Xqfsmp32s6vPdYZhrqYnkdPmpBiHycaVzZMA++eHFopq6SL8XRGAy3+IUNhQ6zbSfaASvqqH; 25:27SaugaeXHKRvLYvesAd/drr+OqgnarwKLAzz4f0qS7W/eM8I3UQh6hwyzCrU0nJ+7Ounb1L2yv7yWNE+un7ENdggqi1pgqqjOdRneAXd/3ilanO/wtulz3nOdO2i1zP85YLWCC6ai6CxlcMu6D6oeAVObHYYE1LmFjg8T2GfNQmlxuO5PfxCaRrLZvae4+TqXhlc17H8XkKecj7eYWQ08jtvOVUrvZeFbrZD+/34Ecub74LXw7+aPCbESiNw4sj1mLKnf2EvmCAg/FiPZC/ZC4mPvC9KnpEyaKWzuk50651g4H0dfYivvekPOlF1fnIDsAynmw64SZbkcdEih7EGQ==; 31:a1s2UKO+BRe7AKdXXCIq/lw3ZTLPzcFT5KdsEPTvxy4pSkVPbgdlzuAs6zEGhBRnU3hID1VVyf2+0qjP8CMBi04dCeQkzf5oZxYXP/oTUd7vrpgmCY3PD2wAALXUhnKrp/sCZvl0prR/6hyvDgkRZ+4M5mwHy/xmXEYxjIw6x8uhMnt+8ZPHGl8RdqZsjR4H5vLsqeICC7Eh+OZpS3FEY0wP7OICzoz1HnGe+N2wCCQ= X-MS-TrafficTypeDiagnostic: SN1PR12MB0157: X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0157; 20:2AUXrPq3vCL7tsPgRODSF9LJGE7saHtmUXHENyz9oeBvcG+Wi7AQAIECcf4m/4P3nhyU3xXjXc1wR09MlXvSNdG83x7znnnKRndjdPrgE3HAwuetwhBWW33dO+ZRq418iQZRsPp3FMISyIbIXa8b0zA6eY3BjNyCGChhU8evUc7SlaJlTG1rJJ4+EIiCIe3AO2JYji4DCHdwvT1B6/r3RhIj2RMhU4K97jvvMyUdd09DkNrf7cwK8gr00Iw4Nmo+k8AQ3Wsd97yBzdb9gRrGMTEPyOmqKZ8KhUGCN2JZqaLCvP/v6PU2mhbc04fdQZwXJbyS6RVwi1CTQwXxTMVbLdQxuMs/WlSfzJtZhM0CqXlI/lssqpM/PLtl21CCFdKSTWEptnbY3dZeoH1YinNgYb+UbOI3VtFsWhd8pFs419HB1g3K3BJPsIwxxtzqBJMDLaphx03aimPWqpdW4gh+tA1YDxgjnv0SOZ5QBGxBu0ODTkTIblWe5N5MLqcnwKdj; 4:5Q2M2XDi27aDtd2MhR8ZdqStPx3MUZ4hQbtUNUZRURMpUSQsK9JtSceDO1TN35bOR4079SCI/JwbetaFOIfalG+MF+9jZOJX0OReOYoN+YmlCQ0HU29IBIkn41mFjQbgtqeaFGwhqFnKb2lxcjWR9w+Apnb/WkZJnUv+RLDG2wwqpOGPKK85lmFBYyaH3yV5k/RiH17H95iDs3YdaFEm4KnVm41dMbBLWZDxHgf3HPquzxzkHZDmXcssgbSrvpTJV2BOmN0rFz8JW38ZCTOlejWJxjuWyrN06Fo86Ioh8ZduflBDlx/p/lp5b0IYoKPJ X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(5005006)(8121501046)(3002001)(10201501046)(93006095)(93001095)(3231101)(944501161)(6055026)(6041288)(20161123562045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123558120)(6072148)(201708071742011); SRVR:SN1PR12MB0157; BCL:0; PCL:0; RULEID:; SRVR:SN1PR12MB0157; X-Forefront-PRVS: 058441C12A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(1496009)(376002)(39380400002)(346002)(396003)(39860400002)(366004)(189003)(199004)(26005)(3846002)(386003)(8936002)(5660300001)(186003)(16526019)(316002)(6666003)(6306002)(8666007)(1076002)(54906003)(6116002)(48376002)(50466002)(7416002)(478600001)(59450400001)(8676002)(68736007)(86362001)(16586007)(2906002)(50226002)(39060400002)(2351001)(6916009)(7736002)(106356001)(51416003)(8656006)(52116002)(25786009)(4326008)(97736004)(2950100002)(6486002)(2361001)(36756003)(76176011)(81166006)(53416004)(66066001)(53936002)(81156014)(47776003)(966005)(305945005)(105586002)(7696005)(2004002); DIR:OUT; SFP:1101; SCL:1; SRVR:SN1PR12MB0157; 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; SN1PR12MB0157; 23:HF2+3UGvJFrb7wgx0Gx4NJBEUJBclEDBVs9Hj6Dg/?= =?us-ascii?Q?SUx6f9TOJfgxvtCzXloc/edIfZUd1dmiZXLKpsfQuY8ah0FW6Dvum1HrYNue?= =?us-ascii?Q?QrMGvbMq1+/BBj0wLbyPZJ3SGmHGnKFj+07cQx0umXCR8A4DAnlFvf0nLqCS?= =?us-ascii?Q?3DOTJTfaXdgxmvuBcKtdNB3QzM8v03b8FWY2T5n5YhaDU9rAQ91SGcbrWzhH?= =?us-ascii?Q?WvHCsbAYq4cpNhBCDFLeW903c5dY1oXch59dgJQ2EdFHOoTTe5bZbCRlN643?= =?us-ascii?Q?ZZ86058uSUi3MQSl0F9MQjneMEZDpEd6ROo+jZYydLalWq4Iu4Jb2Hbuw2Vc?= =?us-ascii?Q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HTMNXskLOEil5qj0fcDgyXJogSH9cew/um+Du3hNUQPK5KlFfGluDLI/OIrBEavN0v9YjzpuevMhT9 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; SN1PR12MB0157; 20:PBCTEnGqpDfd3FdKpe4a4QfDmRxJ7BJyWmZt7EYjtIk/6/9mgiv9G7qx89PpVvUDvlukE0VveAXk8VOQhePoZqpffQRtcR+bSxxr2nKngUIoArB5bbhitnXTVpRsopx6df+d/wNTwLJV2lfMGDAIY/PeJgXu/HqobueHxn0tqD/39Tyl8UFB5v3b9aReuGZFfLCxae3YVyOwH/uSQUV3IEACt4FBUFUQgAWAMr5l76kOuXezFFzICT9jmrIAsvpz X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Feb 2018 15:41:05.1972 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fd8ee511-02c0-4f44-5203-08d5748a8763 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN1PR12MB0157 X-detected-operating-system: by eggs.gnu.org: Windows 7 or 8 [fuzzy] X-Received-From: 104.47.33.87 Subject: [Qemu-devel] [PATCH v9 23/29] 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 */