Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754030AbdGXUHc (ORCPT ); Mon, 24 Jul 2017 16:07:32 -0400 Received: from mail-by2nam01on0070.outbound.protection.outlook.com ([104.47.34.70]:17488 "EHLO NAM01-BY2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752281AbdGXUFP (ORCPT ); Mon, 24 Jul 2017 16:05:15 -0400 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; From: Brijesh Singh To: linux-kernel@vger.kernel.org, x86@kernel.org, kvm@vger.kernel.org Cc: Thomas Gleixner , Borislav Petkov , Joerg Roedel , "Michael S . Tsirkin" , Paolo Bonzini , =?UTF-8?q?=5C=22Radim=20Kr=C4=8Dm=C3=A1=C5=99=5C=22?= , Tom Lendacky , Brijesh Singh Subject: [RFC Part2 PATCH v3 12/26] KVM: Define SEV key management command id Date: Mon, 24 Jul 2017 15:02:49 -0500 Message-Id: <20170724200303.12197-13-brijesh.singh@amd.com> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170724200303.12197-1-brijesh.singh@amd.com> References: <20170724200303.12197-1-brijesh.singh@amd.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [165.204.78.1] X-ClientProxiedBy: DM3PR12CA0049.namprd12.prod.outlook.com (10.161.151.17) To BY2PR12MB0145.namprd12.prod.outlook.com (10.162.82.18) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f86b81ce-8f60-4980-63f0-08d4d2cf11b7 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(48565401081)(300000503095)(300135400095)(201703131423075)(201703031133081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:BY2PR12MB0145; X-Microsoft-Exchange-Diagnostics: 1;BY2PR12MB0145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+SYLu+zKckMuDUH8LpUfpEeKRp+c6MjrlZcWiNbbtKh9Fz6v8hBwMV7t/k9Sr44xXsmMUzInCyJ1M8/ROHT8SHiGvusfsu/pzLPzE/Bxt0nBOjNm+yUUnhUvyfOIlK8l2lUa6YTZF4sn2qKRLkVzeOD4g1M4r1VAqhvnzKAkIYs0zL7lq2w9HKFrr96cIigGootaO6VeYUHifcVKhkdqm5HO62QSwohp+e3fHMd9FFKB+6oNCu0UXD7u59EPv4ZqeBLRTFWZBqn9nucplGN/R1Cvj2b8vfCfDTyKTQAkg6v0dhV1Kt7BnOxPuTAQ92jTMSQsmXSPUCOZZTBWcOUGQcSPDMFPEFp0BaEZEtf7FGHKvw= X-Microsoft-Exchange-Diagnostics: 1;BY2PR12MB0145;20:LcNgPTY/PqtmxUocONlas4kGQZVIaiTKl6/v/BGeV3PUIAd7pVQQJLJ6SJ0spsLaXhtUJsISQJ+2d+HbEfUYp6FbTwgi4P5pD7hKkdao4r9SX/BBZlnrzgz2XAuIUgUYZr8NmPLWVw7VL5rv9CwJqQ6j/0AwCgk8u2sBN5Lipj1+I9akKB5DQuA3XcSLvNEColCxK7Bv+v0U2Q8bxmfBi/729cLGX9b6FotNIb3qgIEiCRrTH7eqGCK33aVrsCPVg9EJNTpSOS090eas8wRpKHWtuGK4Ti+JLIqAG8/kizJR0MPmos0USpBRYUNxZ2hl6/iH0evh5XS9Gv2RSGh3Okk/E1+U3pAXJMvprrzin3gM1wmDLEyzaqUqYGHY2vveRDnX89bgM7uKKOdfzYJkKCgB+87sDtczPC89floFoXWTzlg+M2u72DGkjZBhamlKT3UmVYJGR/Hn2Ifk3PAn2tuSzsLMsL6qHDP6Qb+byzFnrKkTBCYfNEeZzg6W0cik X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(3002001)(93006095)(93001095)(100000703101)(100105400095)(10201501046)(6055026)(6041248)(20161123562025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123564025)(20161123555025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:BY2PR12MB0145;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:BY2PR12MB0145; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BY2PR12MB0145;4:rQ+ZhOlWUhqIWkcloQWsFC38RvTvUQwzld4ChPPFDS?= =?us-ascii?Q?fFaMDI2YaCL+ECmI5lCpNgPMIjd7tVH5wpwDoeUE6Woy79ybjRkHjF64Y6Uy?= =?us-ascii?Q?28woE5ZTUyB7kq9KipnGeiYOvtRcTg2oVON27kTuA4wNxi7zWhce0y+FW89y?= =?us-ascii?Q?o1wKa/P7sZvUluqDrVE1rr56UQoUyhetQSEAH8Y1HXXDd7w4OiCIRAlA5WVp?= =?us-ascii?Q?MLezdPKWl6z4IEwHViklkzesB8q9J3KhBJMQ8Qt99n5Ur684f1zjZ4H2kqH5?= =?us-ascii?Q?JDm1QGDUdLyQcHAc463UeVTQ1DasMufxLu9tTGF0jl5gcrt51LGl3kLDI9h/?= =?us-ascii?Q?1StUIJR0MJMNayUMSuhhnrxPZ011rQkg71wO6SZNumGXOb/a9B6CqecvV/BU?= =?us-ascii?Q?eqAbbP6G7Yc1k6UTzNnfSGthQU3sYmTfsu+aK6xw2pjU+d/f985At2ldRHks?= =?us-ascii?Q?VkOQPgYzeVT1mD7w2k2SM6PmgNQEzdi+vNJ2ikmzzecgtFUZoMK9LYm14LrI?= =?us-ascii?Q?nMd/ocmc4+5FN/63ihQ6c1UUTxJsipJed6wM2cI50usPQIGpF/8ROZof8XWZ?= =?us-ascii?Q?AIPghcZVIrARdXdBmS2rQ8hVunGhUqcOxhO6ZGNwUOTXGfACTpPkYXjuAsgv?= =?us-ascii?Q?P0wXHMTLtAu1srZ8UCHmJaQthJ1ksHchqhIIWBPMnOztUMBWDyWy1DF2rX2D?= =?us-ascii?Q?cL2noQDRG0gXoBncz6y4bE5Tx9kM1BIVuDlrHPkXn+uVmQp2b2+29mJQFxhA?= =?us-ascii?Q?IX/raJDQR5RXE3A39zBM5BWcXpSTTgxzKkPQSHxtWtln62Tiv6TJooW9+bPD?= =?us-ascii?Q?NN5qKonExYctFLJVIWYEnDZOoEJMxHUnN8CeXRvvRucay42p4GQqbGVzJmSJ?= =?us-ascii?Q?IHILD4S8i8zsqlxvJwZ8ScGOh5+i89NonTVrFSo8LylLBF6i+TxE8liSoq1l?= =?us-ascii?Q?qwbvTzektj5FbR6b+FcjyBe3L0YsKqTOgnnjKNwu+Gol7D/ROg3L5L32dEQT?= =?us-ascii?Q?K5YQoQkzd+K3DOuG4Z2b4NLmgis6VIUxKtsHB5YoRm4ReCqbbxne+AivnYpA?= =?us-ascii?Q?X1BbG0lyMiMdYHYWSgUW9sT+mU9IrImTsUWrPNfqxLUZXxvNfPNB1HQkpz8S?= =?us-ascii?Q?0dL52fVbUlnY5qVwuiJzmaWaOhW8X0H9sUNIfvKXm9fzE+RBDC+TiJWeJv1m?= =?us-ascii?Q?sQfiowfdkpf8bmkkijwZOIPpKuPvmAztpp?= X-Forefront-PRVS: 0378F1E47A X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(7370300001)(6009001)(39450400003)(39410400002)(39400400002)(39850400002)(39860400002)(39840400002)(189002)(199003)(7350300001)(68736007)(53416004)(105586002)(6306002)(54906002)(97736004)(50466002)(6486002)(48376002)(2906002)(106356001)(33646002)(6116002)(1076002)(53936002)(3846002)(189998001)(101416001)(6666003)(2950100002)(478600001)(50986999)(76176999)(81156014)(50226002)(38730400002)(47776003)(5003940100001)(86362001)(25786009)(4326008)(966005)(36756003)(42186005)(8676002)(81166006)(110136004)(5660300001)(66066001)(7736002)(1720100001)(305945005);DIR:OUT;SFP:1101;SCL:1;SRVR:BY2PR12MB0145;H:ubuntu-010236106000.amd.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BY2PR12MB0145;23:KQSuZlXkHQ89hdg9eB2hhi3jX5q+74Q0Xt53YMGH4?= =?us-ascii?Q?ZNYz8leaTnQA9MeGBH+MTIg3/Qrn4Pn9hoaqnUKZPgf4zKP3S9SCuCKLG8B/?= =?us-ascii?Q?wpyGmUTW2JRkqTcISFq9ERxME3YYTH7dzcTOROTeotPr13rcMLOetLxvrQGg?= =?us-ascii?Q?LFRftEkXv8hmY9xpmg2Vn/8XmAIb6kuUb7CL0B0IRYVhBE/32inGSD7iewy/?= =?us-ascii?Q?UEAXHpvlz85I/Ijrr+vr82jkcIcRj2FXSLtJvsjtbwB/Ve1BN39aFT2VRRJa?= =?us-ascii?Q?3mvui7h+/FSzDMrpn/b+Yc96ox6QOKSRKbRk1HvtxAO2yaIykQg0Y+lVFS3C?= =?us-ascii?Q?raU1JLKXxaMOlcIlQ6V/BlsS2SpD6LvGN6iLYhMlMoQmwWWsBa6naFCVOxVK?= =?us-ascii?Q?2aBqAm6YDk+44GmGuwcTGos5b4spNzvMgGdXTkiCmEO0FUYQRGjYYngbYyI7?= =?us-ascii?Q?Mc2u6BsxrgFVr7gktoLH6DYxyGfLYfk7MTtuCi4Z0BzVeTzsqD+EMyfmklLm?= =?us-ascii?Q?6ESeNkr5YW+6fIL71HYVvBEDa9Zi40E69gJJeEUgYNN4pY85zaL63sOekPtk?= =?us-ascii?Q?8smrKE47R9iEGAIFQEVl0nAAeDruxMzC5VtOjMNzZtWNq1Pyay95Bv3Iobch?= =?us-ascii?Q?lqQa5+fK+707H+xl0LmoqE96ApU7XXmAH4w55yyAdfxd0R3GAnLWSPvIlsJO?= =?us-ascii?Q?K5MjpS5RY2U5A/+gShEhQiA487Bh275Gz0VWhslIsPwtGk8btg5/K86ri46W?= =?us-ascii?Q?b5JpXc8ttl1nv6+Pc/aLwa5g/fRJ7zifI8v/qSXt9ngd3SU23aLF5kCc8HyJ?= =?us-ascii?Q?+rd2Owgeiq3OeZKUp/ENXINdlivRlcJnjIIqM7715g2rtKccfHO/qFEt6q/G?= =?us-ascii?Q?1sD7zG/orlLEUD7GyZ+dkEUMEaR6pK9U8oghWmhXXWOIq7KfKyALthS18S//?= =?us-ascii?Q?naHSjG/TeksbFIGKLCfznYCnKiOcoc5mq8lGFgMZS4zKBe/0/i7PgVMS7sIu?= =?us-ascii?Q?wo1ZAoPzYPm4x3KrUxOeeR5k7oZlm6/jMFMBq82MyEMUU2x2AWmJXMLRTuqh?= =?us-ascii?Q?4D3yWNNy0cLOj6D9NHq5iuuLqEWvvx/2spdAQvFgo+Owsb3IDMoNVfBB6jTr?= =?us-ascii?Q?O2WyBKE0OCdM6T8T3a5MjUX1TX+bVFvDp+S3hlZpnv6iedURHG3563ojunqu?= =?us-ascii?Q?NHgrjo1iIOL4mVySbBU92fjqEQsMhaE6/+QBsXDGS6BPW32qt86RAWMqofTW?= =?us-ascii?Q?JLO4zAH64wivWlYodeIxVwySm1XbgBHhGaERpnf4Uvimu/H4n+hLv+l595Fg?= =?us-ascii?Q?VP8+Km+MspB/Oxmt56iM/KDeknnMclCOi7VdTGWk4ol?= X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1;BY2PR12MB0145;6:GFEKsvHTrvJ0Cp/UajOdfXKHfC0t7qXvpqGJWr8hhW?= =?us-ascii?Q?NlbiMz3mrAuvQMVinZE5ClNNJvkVlwh0WURDsnpFdRLcxSOdUb3tFKDEZ7kX?= =?us-ascii?Q?20Qkv36bCqUOdTD4gzGalPcJabuBEWQp9rNJEtDKbLe6vGedUDO6WUoggf+U?= =?us-ascii?Q?M6RlcdEsGDLZHWCvlbCT136Xgfkupame/QuW1ZYiJK4zLGgaXOfQagKOUZv8?= =?us-ascii?Q?Ou4lLv7x48mgpHNhhcYjD0ZDttXgY/9hfduG7Q5OFzlcmIzyDgusJHXVZK6E?= =?us-ascii?Q?gImBjarHKUOBtIVNg18vq4vtFfmod6zGrJWv91yhU8Jprx2gO8CJr1JGI/hp?= =?us-ascii?Q?RrjHyN94iuWdgosKdzJd6cGjJo2v2pzCgC4LJsI7dTEigwmuyZgfljdTW4oG?= =?us-ascii?Q?p7kBvt7qruA8S5/b65i05AyWD2LK2EoBdh4rfkEhxBZp284/lq+MPR/A6eqm?= =?us-ascii?Q?Dh+OiMfcTB74et0ZW3ub7hzLWVYOshUXwUO12KZAiNkhM5GKc1SukIsleVxB?= =?us-ascii?Q?iRcoa3oOgdATJh86gxjgpzIImhloJjR4chTnIKqWd/YJ9wcBQevfGqSG3Uqv?= =?us-ascii?Q?TiiRwftYdI6URG9hk71t380CPOD8966lSZyGt3RmP2j/KIH/sQ7RYPzZIbzK?= =?us-ascii?Q?HYwgaZ58eIgc04T1rWQcDjj6nTbwAR3Tp7SaYHXvtrR/wUeD1QQCe9YZuJQQ?= =?us-ascii?Q?pK8unVNNwtIRBcyYPCFedqaXdWe9X41aPzOE5Ak1dqrN9NSw4etXAPLqLYkq?= =?us-ascii?Q?dsy2hHTZwdTQ0FvjURiZ5Wsl8kyqdi8ErkbDXHflEUnFxhoD7lfeAV2lC8As?= =?us-ascii?Q?OmM+tGyA5uHRikVKIkkvQX8fZGFWkXMAOjYAasyfbSvE03J6Kmn9pZ6MTHGy?= =?us-ascii?Q?r/TLb0NjIEXAlpTMdE1slEaqhQkEPfT4JOMvD70D3GCFHradGPOEXmq3A6eo?= =?us-ascii?Q?htY5lOPkCUqpNYkI4KcF0hImywbC7tiB0uVVbmDUHiKqvcvZnVozq76acXGj?= =?us-ascii?Q?NHWMfOkT3G99P+Spxae9ly?= X-Microsoft-Exchange-Diagnostics: 1;BY2PR12MB0145;5:2JqHB0RZr56y9Ycd386g/PHXTM6shivRPVuyqQar30aMWqpubteBNvuyDPa6yCeCSUd23h8l5/WVo70ZfZ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FvsS81A05h5PmZHVHlsb5ImZ/oleTRx6nN+ATfwj86T1SIT4HigMYzlOmSvMVYlstXtAyhKHW/sNO8oEXh0h/59UlO3VVRSwX63c5XgKEng7Y2DZKeArOesCLsdkzdLspr00U+iTkTSxWJ4w6ga5bj4usuzkj1x4B0ZeuvgMnDFudhvJakGwmmIqIemRg6OsZgGbFxFcrapzfaZUnXhMuiK3oL7iYVAtmUUr8FHgpOIaG4GE4Pmk0W/M00gxWCPc67UXgIv2U9CaUXxuVe5lXzvI7NAxmtcMqIUfGQTLEtfWS5lJbNevmYIvz0sFd1bupdutD73cFarlFuOx2rMVNFdodMg26dd9R8k= X-Microsoft-Exchange-Diagnostics: 1;BY2PR12MB0145;20:iyBH6Zxx+sN41NnC+L7YkcgyGI4HaRVGoLJ9N0h7cYE1om0FFQN/p9GA7dFZKOtM4lBEcKbVmadEUmsDybiRmFlGCsdAhvge9ic9eaP3AXslnSNXUAv0goxfL6lCSHEchN106jIv5NNz9U94xFuivkBHIHbWAJaDvCS4+HiIujpJdfe/JbbYALvlQ7v7/fvZ+umlwv0lw2alCdk317ChH7AUsll6PjMneGG4ImetDMdQy/9Wx1JhaQpAMHAl1iYo X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2017 20:03:35.3689 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR12MB0145 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3722 Lines: 172 Define Secure Encrypted Virtualization (SEV) key management command id and structure. The command definition is available in SEV KM [1] spec 0.14 and Documentation/virtual/kvm/amd-memory-encryption.txt [1] http://support.amd.com/TechDocs/55766_SEV-KM API_Specification.pdf Signed-off-by: Brijesh Singh --- include/uapi/linux/kvm.h | 148 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 148 insertions(+) diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h index 6074065..8decc88 100644 --- a/include/uapi/linux/kvm.h +++ b/include/uapi/linux/kvm.h @@ -1367,6 +1367,154 @@ struct kvm_memory_encrypt_ram { __u64 size; }; +/* Secure Encrypted Virtualization command */ +enum sev_cmd_id { + /* Guest initialization commands */ + KVM_SEV_INIT = 0, + KVM_SEV_ES_INIT, + /* Guest launch commands */ + KVM_SEV_LAUNCH_START, + KVM_SEV_LAUNCH_UPDATE_DATA, + KVM_SEV_LAUNCH_UPDATE_VMSA, + KVM_SEV_LAUNCH_SECRET, + KVM_SEV_LAUNCH_MEASURE, + KVM_SEV_LAUNCH_FINISH, + /* Guest migration commands (outgoing) */ + KVM_SEV_SEND_START, + KVM_SEV_SEND_UPDATE_DATA, + KVM_SEV_SEND_UPDATE_VMSA, + KVM_SEV_SEND_FINISH, + /* Guest migration commands (incoming) */ + KVM_SEV_RECEIVE_START, + KVM_SEV_RECEIVE_UPDATE_DATA, + KVM_SEV_RECEIVE_UPDATE_VMSA, + KVM_SEV_RECEIVE_FINISH, + /* Guest status and debug commands */ + KVM_SEV_GUEST_STATUS, + KVM_SEV_DBG_DECRYPT, + KVM_SEV_DBG_ENCRYPT, + /* Guest certificates commands */ + KVM_SEV_CERT_EXPORT, + + KVM_SEV_NR_MAX, +}; + +struct kvm_sev_cmd { + __u32 id; + __u64 data; + __u32 error; + __u32 sev_fd; +}; + +struct kvm_sev_launch_start { + __u32 handle; + __u32 policy; + __u64 dh_cert_address; + __u32 dh_cert_length; + __u64 session_address; + __u32 session_length; +}; + +struct kvm_sev_launch_update_data { + __u64 address; + __u32 length; +}; + +struct kvm_sev_launch_update_vmsa { + __u64 address; + __u32 length; +}; + +struct kvm_sev_launch_secret { + __u64 hdr_address; + __u32 hdr_length; + __u64 guest_address; + __u32 guest_length; + __u64 trans_address; + __u32 trans_length; +}; + +struct kvm_sev_launch_measure { + __u64 address; + __u32 length; +}; + +struct kvm_sev_send_start { + __u32 policy; + __u64 pdh_cert_address; + __u32 pdh_cert_length; + __u64 plat_cert_address; + __u32 plat_cert_length; + __u64 amd_cert_address; + __u32 amd_cert_length; + __u64 session_address; + __u32 session_length; +}; + +struct kvm_sev_send_update_data { + __u64 hdr_address; + __u32 hdr_length; + __u64 guest_address; + __u32 guest_length; + __u64 trans_address; + __u32 trans_length; +}; + +struct kvm_sev_send_update_vmsa { + __u64 hdr_address; + __u32 hdr_length; + __u64 guest_address; + __u32 guest_length; + __u64 trans_address; + __u32 trans_length; +}; + +struct kvm_sev_receive_start { + __u32 handle; + __u32 policy; + __u64 pdh_cert_address; + __u32 pdh_cert_length; + __u64 session_address; + __u32 session_length; +}; + +struct kvm_sev_receive_update_data { + __u64 hdr_address; + __u32 hdr_length; + __u64 guest_address; + __u32 guest_length; + __u64 trans_address; + __u32 trans_length; +}; + +struct kvm_sev_receive_update_vmsa { + __u64 hdr_address; + __u32 hdr_length; + __u64 guest_address; + __u32 guest_length; + __u64 trans_address; + __u32 trans_length; +}; + +struct kvm_sev_guest_status { + __u32 handle; + __u32 policy; + __u32 state; +}; + +struct kvm_sev_dbg { + __u64 src_addr; + __u64 dst_addr; + __u32 length; +}; + +struct kvm_sev_cert_export { + __u64 pdh_cert_address; + __u32 pdh_cert_length; + __u64 cert_chain_address; + __u32 cert_chain_length; +}; + #define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0) #define KVM_DEV_ASSIGN_PCI_2_3 (1 << 1) #define KVM_DEV_ASSIGN_MASK_INTX (1 << 2) -- 2.9.4