From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0074.outbound.protection.outlook.com [104.47.32.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 47A502095DB87 for ; Thu, 3 Aug 2017 07:08:50 -0700 (PDT) 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=upg8H2rJkab7QTniyQwTIgVTCv1YxPt+jK+B7DVtFcU=; b=tjhyBTKNEn5cc/gBf0CVHEQaWhuv/55bDLxmwbPFXCTOHgg3n05L5FZ1EzB7cz4E3macEUFknUyySNSV9VBX+3F+JotX0hMdZZbAdSQkvHwx+5pcHpO7jIMJNyHlo2eSWaEEPHffoKaSdbxzU2F8buWBsJqL2jRscLDIq5I2G58= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=brijesh.singh@amd.com; Received: from [10.236.136.62] (165.204.77.1) by BY2PR12MB0147.namprd12.prod.outlook.com (10.162.82.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1304.22; Thu, 3 Aug 2017 14:10:58 +0000 Cc: brijesh.singh@amd.com, Ard Biesheuvel , Jordan Justen , Tom Lendacky To: Laszlo Ersek , edk2-devel-01 References: <20170802212453.19221-1-lersek@redhat.com> From: Brijesh Singh Message-ID: Date: Thu, 3 Aug 2017 09:10:53 -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: <20170802212453.19221-1-lersek@redhat.com> X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: MWHPR14CA0024.namprd14.prod.outlook.com (10.173.227.34) To BY2PR12MB0147.namprd12.prod.outlook.com (10.162.82.20) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 9ff3db59-d206-4305-b47d-08d4da797773 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(48565401081)(300000503095)(300135400095)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:BY2PR12MB0147; X-Microsoft-Exchange-Diagnostics: 1; BY2PR12MB0147; 3:xQINmpydsLBoOR3yYvW7PpYN+9Iq3ZrVqTWrfXgCXU3kuYWp0Pj98W1/y3pXQ6tbF/OwTb0PEkdP9/MZRGntDaMFrSE7QMXBqc/izuUMPSpEaB5+25JBl21gJtbXyuWMTatODWfglEeiRlGE6VOgCFdNoSISq/RdjFaMYbCfJA0lIVH2SFYZMHWZ/U7Qy7Geb869PI9UgCxqiCRBEWQ+zUtssVU7f4R+VHPCP5xyJQW8qI0IymwmNtbbLk52DgNh; 25:IS4DtQmVEZCJrwrrFSVjJopTB673wIqvkNdPxuSxUCAWFGgZsOAiGXrK8/vYDSPn59E9dWW7+wwWnyKSG54KfbPwmrwlw1jBytbqXlu00+CAzh3vECwp8YR2a3pSYGKtNKmfyZaJKqlvZprlwXBAqJgu1DMvmKbxy0YpnYRtCYpiDeq186NZ6/dSUivXmQ4fV5sjeTEN2pjeWr1gCKAIz74eHdz5s2ZlQ2BHAPGq8ontxcyAcfdPCDPHzEaXEaXtOUM2xF1w8Y+B8/beFeokf9IAX9/tOu9YvdS5s4RUVF6hm4gPQ5lqWTjIjzdcpYVcwNV3E8bjk9PjzdEiLhBCdQ==; 31:M/r403TsOPS9RPerIWQ2nWVkAh41p9N8dYq+I35kmO9GCW6mWpz3p9L4mAGO2XN4p9LguoaZgYjsgulD9d2c2uRp+UQ/vHZfMPctZje1ZXRl6hzS9AsWK5rzQfgLbqM8kD9Xhk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riScan:(166708455590820)(767451399110)(228905959029699); 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)(93006095)(93001095)(100000703101)(100105400095)(3002001)(10201501046)(6055026)(6041248)(20161123558100)(20161123564025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123555025)(20161123560025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BY2PR12MB0147; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BY2PR12MB0147; X-Forefront-PRVS: 03883BD916 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(7370300001)(4630300001)(6049001)(6029001)(6009001)(39400400002)(39850400002)(39410400002)(39840400002)(39450400003)(39860400002)(189002)(24454002)(377454003)(199003)(4326008)(189998001)(25786009)(83506001)(68736007)(31696002)(5660300001)(65826007)(50986999)(53936002)(54906002)(76176999)(54356999)(6306002)(65956001)(66066001)(101416001)(2906002)(4001350100001)(64126003)(50466002)(31686004)(6246003)(38730400002)(86362001)(3846002)(7350300001)(65806001)(6116002)(105586002)(106356001)(47776003)(230700001)(90366009)(97736004)(77096006)(7736002)(305945005)(23676002)(81156014)(81166006)(8676002)(42186005)(966005)(6666003)(6486002)(36756003)(33646002)(229853002)(53546010)(2950100002)(478600001); DIR:OUT; SFP:1101; SCL:1; SRVR:BY2PR12MB0147; H:[10.236.136.62]; 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: =?utf-8?B?MTtCWTJQUjEyTUIwMTQ3OzIzOllsZHJrWENhYUpaNGpZVDVyeWRkMXlsUkhx?= =?utf-8?B?VGk3NG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TtLGix58=; 7:guQrc7QNWpRoANKktn7+ye5vbHxVBQdx/ZZ1OHvs5CASdfUCOYk13W6BDvZzMA2Ov8PqOBlascwEzRCoLFMIsIZ5Zev2QoAwLAQz8lPtoFu9EGyb1jtzr+6Dv39yc4nXqXOUN3GGaeQf8OfCO2j6iKVTXAKgHgqn1rWFmG5HfE4RqJRn2tCrBmgpm1M4ziqNfY/bkwOCG6Ckwd7i71tLMl8vcEhfEeCt7ioyVIG1qz4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BY2PR12MB0147; 20:J++H1ZvqTeCy1xl4vTqnf9j1mgOJp7TMbT51npaCeEAknIM1JQCHm9EBjknHJEzHUn8dN/fbxHKl4HZRxvPSK9D6FKfaCgoB0OG79BAJ+My8CH8TtxdMy/5DvZ3n5fvCb7iT546lBzMF2YfzFSwK3e39npfvA8sAt2oA8yBXj9Ee54h0w69sAgLxmo+DiJfrgdmaBCQgL24tLWdY/tF1z7WWgANz0siGDT2l5UWCNKktGgFVXD7g1bv3xUhg5l5x X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Aug 2017 14:10:58.7145 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY2PR12MB0147 Subject: Re: [PATCH 00/12] OvmfPkg/IoMmuDxe: cleanups and fixes X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Aug 2017 14:08:50 -0000 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Hi Laszlo, On 08/02/2017 04:24 PM, Laszlo Ersek wrote: > This series is proposed as a replacement (or a replacement "basis") for > patches #1 through #3 of Brijesh's series > > [PATCH v1 0/4] OvmfPkg : IoMmuDxe: BusMasterCommonBuffer support when > SEV is active > http://mid.mail-archive.com/1501529474-20550-1-git-send-email-brijesh.singh@amd.com > > Patch #4 of the same series ("OvmfPkg : QemuFwCfgLib: Map DMA buffer > with CommonBuffer when SEV is enable") is required on top of this > series; otherwise QemuFwCfgLib will break on SEV. > > > In the present series, patches #1 through #7 are lightweight > improvements for OvmfPkg/IoMmuDxe, concerning line width, MAP_INFO field > names, conversion specifiers for DEBUG(), coding style, error > propagation, and library class listings. > > Patch #8 ("zero out pages before releasing them") fixes the "information > leak" issue pointed out in: > > http://mid.mail-archive.com/e1137140-f5d5-7eb8-0162-952694b24f96@redhat.com > > Patch #9 ('rework setup of "MapInfo->PlainTextAddress" in Map()') fixes > as-yet undiscussed issues, and lays the groundwork for patch #10, by > reworking the calculation of the plaintext buffer address. > > Patch #10 ("implement in-place decryption/encryption for Map/Unmap") > fixes the issues around BusMasterCommonBuffer[64] operations that were > discussed in the following messages: > > http://mid.mail-archive.com/4071596d-32c9-e6d9-8c93-0d43d28e9b5a@redhat.com > http://mid.mail-archive.com/e1137140-f5d5-7eb8-0162-952694b24f96@redhat.com > http://mid.mail-archive.com/84c3c5db-623e-181b-c472-7fd7ae1c1670@amd.com > http://mid.mail-archive.com/89e1553a-1630-87a5-cffd-99174a380d41@redhat.com > > Patch #11 ("abort harder on memory encryption mask failures") settles > the error handling for MemEncryptSevClearPageEncMask() and > MemEncryptSevSetPageEncMask(), discussed in: > > http://mid.mail-archive.com/89e1553a-1630-87a5-cffd-99174a380d41@redhat.com > > Patch #12 ("Unmap(): recycle MAP_INFO after BusMasterCommonBuffer[64]") > implements the "free list" proposed in: > > http://mid.mail-archive.com/e1137140-f5d5-7eb8-0162-952694b24f96@redhat.com > > The series has been formatted with "--function-context", for easier > review. > > Repo: https://github.com/lersek/edk2.git > Branch: amdsev_iommu_cleanups_fixes > > Cc: Ard Biesheuvel > Cc: Brijesh Singh > Cc: Jordan Justen > Cc: Tom Lendacky > Appreciate your help, the series looks good. I have ran some overnight tests and so far things are looking positive. As you pointed out in blurb that we still need Patch #4 from my series. I will soon send updated version. Tested-By: Brijesh Singh Reviewed-by: Brijesh Singh