Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753133AbdIFUy0 (ORCPT ); Wed, 6 Sep 2017 16:54:26 -0400 Received: from mail-cys01nam02on0051.outbound.protection.outlook.com ([104.47.37.51]:33328 "EHLO NAM02-CY1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752395AbdIFUyY (ORCPT ); Wed, 6 Sep 2017 16:54:24 -0400 Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; Cc: brijesh.singh@amd.com, linux-kernel@vger.kernel.org, x86@kernel.org, kvm@vger.kernel.org, Thomas Gleixner , Joerg Roedel , "Michael S . Tsirkin" , Paolo Bonzini , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Tom Lendacky Subject: Re: [RFC Part2 PATCH v3 01/26] Documentation/virtual/kvm: Add AMD Secure Encrypted Virtualization (SEV) To: Borislav Petkov References: <20170724200303.12197-1-brijesh.singh@amd.com> <20170724200303.12197-2-brijesh.singh@amd.com> <20170905172130.24fgl6xsrfovsbsp@pd.tnic> <20170906164159.2ysrftypnx2ameqp@pd.tnic> From: Brijesh Singh Message-ID: <90a6bb6b-cef5-f01c-0d5b-56eaf8fc709d@amd.com> Date: Wed, 6 Sep 2017 15:54:16 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 In-Reply-To: <20170906164159.2ysrftypnx2ameqp@pd.tnic> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: BN6PR17CA0006.namprd17.prod.outlook.com (2603:10b6:404:65::16) To DM2PR12MB0153.namprd12.prod.outlook.com (2a01:111:e400:50ce::16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e79e326a-b17f-446c-9214-08d4f5697300 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(300000502095)(300135100095)(22001)(2017030254152)(48565401081)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:DM2PR12MB0153; X-Microsoft-Exchange-Diagnostics: 1;DM2PR12MB0153;3:AnZqKXBrNjgppaKK3b26FwMtMPdtkx1LSVfyaHg6ZsBjJ4eA8eIUhNHSu/LKYQTH1QCPh983smCZLo8KtTGySwhOn1JOMptM8iqeIAErs1+eUXrBByAHQV7Wyv22DK3jz/xx/QS2MLr+RzOuE6WIzKZuCVnauHwXFimtZ/liFbppZR5Kh9oqjn1yH/eO06Ni4BYddqeojWNil33TkoU2uuilav+v6dVLFtdsYzqfTqGWQHyNiBfJ7ywh4QHMCma3;25:QHHmsExK1BCQU+4agExIhayg8frMrBIf+sYfPZ+lntaeCExZHysYyI1hyYXGQM1DiCpLR4NdzZMuLoe5OR++fLF7DoFO5fP5uWmM24REwXLoCIiXoq+gPz/ejN0YZTJ/u2E9VsIy8LvkSkAfycQcxiQW0S4PhCryYKe7mNTvy+BiHJANesA3wU7YUs/ejKTxHeJewkzVhb9YgnhMW27OY+NEUG/pt+D/zSggUVyCsK2OJ/F9OxeVo7Af7VW2vPeN7NUyf4zjb7KKMlIztn0A7MLAy0+8pOoZuwQB+K2DLlATgOFrZnixY13JzyOVrS+gG90Ln3DslpQwULDlyKYOqg==;31:uDdWgyo/4dEfW6cuhWxHLYp+GR4qx+j01GwOfnCzR0AvzvonghDTpD8YudajndKwbxKs4J1NqZYa1KT6AsBkBSHA6aYPTgprWxiEG+kZyb5G1Vg4cq/F26Y9+qHMaM7ltmrq+HA+YmQ5H2cG4P8R0jdAn3mRj5hdaRbItsAnr4SIYgOrcVwPMbyMcY4qsJsX54xlsTRkvSOAj8DG4BhCYB8bGg+L+/l2Wxf/4+KYltw= X-MS-TrafficTypeDiagnostic: DM2PR12MB0153: X-Microsoft-Exchange-Diagnostics: 1;DM2PR12MB0153;20:epXm15vJscgm8s8g9nUCTEFGwKRXAwsD+L3WCmSvPcDcmLq/5tXsG5dyfhVR0oRIHkLgOFwIb6CPzMm9Y3BtQkvdwTHS0L8BDeKMycp13Hg9Xp/Qq12VSfetTpU3NZESCFtAdt1tLQ7ozAKMZRWNVhevi2FW5aZpzFitns+545VB/grMquDu3dE4XoPp8WaqycuUSePbHtxbEMYVfS3KWAIUtWuDA5nV0UOhZ/8vEiY9ay/sg/zp5n8YXVCihunt9zXx26EduiThf8Hwu//Jpzy+BiS6K6Lslf24sJDjRC43namteRtYZdZt8ksPY6keKTBsb625G4Rq8FR6Fp27nvhr6dYerFvCaRArNXiD52bUvCWNh2iE6fQPvzE3C5JvVJOXSQLVY75P7EasqJ6J+ypO8pr+Sltswq0dPcE7mHUII1MpX9c095TWV9bb1Nwus4hWKu/rw/JehVV2HAWfZdWeIYz8kuvmh1FujkwQi89xqZJIwq34jSHqYOZ21IRu;4:IOJ1LHovkzjPhl0mcvtlE6Vpb6npS2JuR1XiKVaW3Ey9Klrv4ZKKV4cXIyIt+xFetxR+bUdpo19QuoxugFfRy+H0x2kufo6IgaX4a5pKtRexsga3tkuN57qaZ1Uprfuvb4IqSap3jkwQYI5y7+6+MGQ2zV6TvLlu0iNeH/wPCmKsU/IW07fN93SoQxftP5zW7KwvacTAbvQdNYSUe9Xg67UEWnhuntu9Tcy8BPjKSc8/Mfsa0DB9XNStzRPoWxiC X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(93006095)(93001095)(3002001)(10201501046)(6055026)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123555025)(20161123558100)(20161123564025)(20161123560025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:DM2PR12MB0153;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:DM2PR12MB0153; X-Forefront-PRVS: 0422860ED4 X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(6049001)(6009001)(39860400002)(24454002)(199003)(377454003)(189002)(110136004)(230700001)(64126003)(54906002)(4326008)(4001350100001)(86362001)(33646002)(23676002)(66066001)(478600001)(93886005)(65956001)(65806001)(5660300001)(6246003)(25786009)(36756003)(68736007)(47776003)(97736004)(31696002)(83506001)(53936002)(229853002)(101416001)(77096006)(6486002)(50466002)(31686004)(189998001)(76176999)(54356999)(7736002)(6666003)(2950100002)(81156014)(42186005)(3846002)(8676002)(105586002)(53546010)(6916009)(6116002)(106356001)(81166006)(50986999)(8936002)(65826007)(2906002)(305945005);DIR:OUT;SFP:1101;SCL:1;SRVR:DM2PR12MB0153;H:[10.236.136.62];FPR:;SPF:None;PTR:InfoNoRecords;A:1;MX:1;LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtETTJQUjEyTUIwMTUzOzIzOjNnZkM3MGZXUGpVMUg4VjRCYnc2TE56ZGls?= =?utf-8?B?NVUzN2lVbWM3NXhzZmxWdmpXcG9hUmIxNTIwZTNMTEp4T283a0V3M1JkKzJM?= =?utf-8?B?aWlOV2M1R01HcDVseHBJQXRHWGxqbFEyMy9UWExabStmQWhULzRwbmdvWVoy?= =?utf-8?B?dy9ESjZBUkFvWG5HWm03ZEpFK3Vwd1hteW5CQWJ2YVNmc2lvQk1USmpQRU44?= =?utf-8?B?UWlWOHQrbmsvcHZYdGU4UFBYR2NVS0ZiNm9TRzFzcXUyM2poUjhtMCs4M1Ux?= =?utf-8?B?RGVPY3JueCtaT1JpRncyZkwrd29yVFhaOU9ZYkRXMUtlMTM0Kzk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OJEmGlSUHg6mN4H/Wi6NVzgeGQdSq6aK4f/zzvW8TdzKkkW8RPV6U/MtN7BtjDurpoKpNHeHFkqiZbHVeMmQBaO5f8pJNTU1eDkXPFm+IHfSnRAGwA==;5:ZdV4rrreok/YPTgSKWQ/dETlUw+G5fG7m6mYex3kj7MWdI0LI3qjCazWihPiRGtzig/7fkTj6zO7Z9PNmZ5AaNs3ZrxzZ2gE/2ahMRiSR0LqS9hElmRqRn54avY75+OYbPQrt4Wxd942f4anTlYGnQ==;24:80/gjH+++BMRPAHiBFJv03yhpd+VO/SKCWZ8NOHqcpuP7N3H0dKJaIdnLF4q2bH38NQgspxWpfJfiTag03FxDJNnNPfItAkSN9JDq4LCHXI=;7:I3Q2IfbTdMDusGaYNOKgZXzzjk9mkQoENeE3Zbvhptsr0sq6rRvogA1ViSLDKKwV+yFhS6+oeD8knPp6tQhA+g/YpLpv1A8gME/DxAPRRpj8LOdu5J9x0yCCC5EtkoVnDsNRhEG8vpeCsnLVxaUGvQXuSPLQMCMzPYwWWGcdOS1Hz0XZgP6Aw64WTI8GZI1MiOJpC2/J9lOBJ3NCnWlh9DY92eNbBfsFbLWBBfxp6Yk= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;DM2PR12MB0153;20:lXnB+iHfu/wgywPR6GypMpPA7mgAAungEmACB2ECh+1dR92MTeaS/0eMEw1MS37Wozk/snlzpkiaEBtoxhz7YgmXxt7lFQJyPIL5WUmts9ov15nPUmjn2uyrXfKgIPaQ9Pu/qJYn7Jzn+QRadNKfA7KcovAlka3jtSfYaZqYbWKJrBvnOK5N70WN2Q3aA9ovFTJe7r896f4Wc/y8Ao9tiVkNrH6NB/yLNsYZSQb7OSkwcDsA8dVQ4NQ56GFWdLTW X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Sep 2017 20:54:20.1652 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR12MB0153 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1479 Lines: 41 On 09/06/2017 11:41 AM, Borislav Petkov wrote: > On Tue, Sep 05, 2017 at 04:39:14PM -0500, Brijesh Singh wrote: >> Not sure if we need to document the complete measurement flow in the >> driver doc. > > No, not the whole thing - only summarized in a couple of sentences with > the link to the doc. > Will do. >> I was trying to keep everything to 80 column limit but if that is >> not an issue for documentation then I like your recommendation. > > That rule is not a hard one - rather, it is to human discretion what > is better - readability or fitting on some small screen, no one uses > anymore. > I will follow your recommendation >> The command does not require explicit parameter to differentiate between >> live migration vs snapshot. All it needs is a destination platform >> PDH key. If its live migration case then VM management stack will probably >> communicate with remote platform and get its PDH keys before calling us. >> The KVM driver simply acts upon the request from the userspace. SEV firmware >> spec Appendix A [1] provides complete flow diagram which need to be implemented >> in userspace. The driver simply act upon when it asked to create SEND_START >> context. > > Ok, so that only creates the context after sending the PDH cert into the > firmware. So please state that first and then what the command can be > used for. The way it is written now, it reads like it does the sending > of the guest. > Will clarify it in documentation.