From patchwork Tue Jun 27 15:10:28 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Lendacky X-Patchwork-Id: 9812425 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 61D7E60351 for ; Tue, 27 Jun 2017 15:13:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 48E30286EC for ; Tue, 27 Jun 2017 15:13:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3AFEE286D1; Tue, 27 Jun 2017 15:13:00 +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=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 99565286D5 for ; Tue, 27 Jun 2017 15:12:59 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dPs8S-000105-Sp; Tue, 27 Jun 2017 15:10:36 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dPs8R-0000zC-KY for xen-devel@lists.xen.org; Tue, 27 Jun 2017 15:10:35 +0000 Received: from [85.158.143.35] by server-11.bemta-6.messagelabs.com id EA/EB-03587-B6572595; Tue, 27 Jun 2017 15:10:35 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA1VSa0gUYRT1m5kdx3DrazfztmTZVpSWj4KWoD8 WBGWkpVFoaY45OUP7sJm17Ecgsi0RveihtlSuW1b21AjtQVKGVKZiFpooGaZFWxtqkVkJzeys ad+vc+853zn3wmVInZM2MFyBnROtrNlIT6L4uKiFMUJ+Slr8nZ745RcHL1AJaE3Dg9/EBpSuE azZtoIsDe+quk/kDeoLRg4MaQrRED6EJjEUdpDQ3dFCKQXCJxHc6DhBKoUOOwmodHfLRQhD48 XQ7vtOKFiPM6D6xi9/fxp2E9Bb7LcisY+GupYmWiEIPBPcngq/iMLzYaD8UbCCtXgNlJedphQ cgtdC2el2v6lO7jeNPPRrwvAsqHzl0Kj6qfD8TJ+sZ+SAKLh1P05pk3g21PrO+u0BR0Lt8DCt zAD4IILizoMBz3ng+tYarIoioKH5LKXi9dA/UEoqnoDnQqMjSW1XEDB4YaXqc4SGNt9w4G80e C6PBAJ6g6H/kwupxVEa3j0sItSihgJPxeNAhBm8rwsD822Fww8OBayaNDA6alexD0Pfrb3HUY xrwqau8U1dEzZ1I/IqWihx4h5OjFm6LDZbFHJ5u4UVzDFL4k2xFk6S2FzOzGZLsTtslttIPoo g+d1FV90b69EMhjCGaa9BSppucrYtZx/PSvx2Md/MSfVoAcNgT0NRqoGy2qycEbROuyybKnK5 XMFOwSwf2ZgSmFDjNG17nkxrpTzWIgm5KtWI5hjCtSblH1YIPt/679vYebahCINei+SZdKF5n GgR7P/zXhTOIKNeWy7JLqGC1f7P3SsHE3IwdX6DEmxnxylDIdpUd5QmflRNz9kcGd7p/dkzJW x1dUnS5BpvBvzpcjgTihelJu+6ErKXNL0tCfk9ZV1EZun+bV2R+lWWF/WZm2ZUp+SveGNK57t u7va1fiyR0p8E9VReSkZbMNNhiHt5znbssycrMdrRVH4v3qA7n/qs+cOPtFOXrj99n/DF8zXx RY2Rknh2STQpSuxfS55tmpkDAAA= X-Env-Sender: Thomas.Lendacky@amd.com X-Msg-Ref: server-16.tower-21.messagelabs.com!1498576232!63938885!1 X-Originating-IP: [104.47.41.40] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 9.4.19; banners=-,-,- X-VirusChecked: Checked Received: (qmail 5434 invoked from network); 27 Jun 2017 15:10:33 -0000 Received: from mail-dm3nam03on0040.outbound.protection.outlook.com (HELO NAM03-DM3-obe.outbound.protection.outlook.com) (104.47.41.40) by server-16.tower-21.messagelabs.com with AES256-SHA256 encrypted SMTP; 27 Jun 2017 15:10:33 -0000 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=FuqZSD1tZozvlsEg6pgT9IkGdjVd5ixygOkeIAXM5Hs=; b=b5GkSPlWrRE2vr48VMEt4w2SOvIbWZNEjoGpbbB06pgLTGvI296S8iwyWyljQ2GOq9FB+DwkziI0KH1UvC01ilTJ9I+hY0agNUoynV7bSmKB20noj9o1qcbgMw37Pd6Ys8/7uxzKtpzP/+cvt4zqi1RAkRyJCDzF32QRdwZPuZ8= Received: from tlendack-t1.amdoffice.net (165.204.77.1) by CY4PR12MB1141.namprd12.prod.outlook.com (10.168.163.149) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1199.15; Tue, 27 Jun 2017 15:10:29 +0000 From: Tom Lendacky To: linux-arch@vger.kernel.org, linux-efi@vger.kernel.org, kvm@vger.kernel.org, linux-doc@vger.kernel.org, x86@kernel.org, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, kasan-dev@googlegroups.com, xen-devel@lists.xen.org, linux-mm@kvack.org, iommu@lists.linux-foundation.org Date: Tue, 27 Jun 2017 10:10:28 -0500 Message-ID: <20170627151028.17428.65111.stgit@tlendack-t1.amdoffice.net> In-Reply-To: <20170627150718.17428.81813.stgit@tlendack-t1.amdoffice.net> References: <20170627150718.17428.81813.stgit@tlendack-t1.amdoffice.net> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: DM5PR17CA0048.namprd17.prod.outlook.com (10.173.128.162) To CY4PR12MB1141.namprd12.prod.outlook.com (10.168.163.149) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 51d349e7-0e4b-454d-8ca4-08d4bd6ea709 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); SRVR:CY4PR12MB1141; X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1141; 3:T5P4LbBhuc+vc17SKdRotnrGedUseJjXKX0+WoizkYldPN/EDx0BnjoJbs+H+gpXW5qs1P0nNLaW2kvAyAlzsefFTRGwjEYxoGXAz1aLFI4/fWN4LZH9YYFVe8bepgMA6BXeJghevOSN0mgFGvTlEFb1shdZGs3Y8BL2UUScooCIROw4NnXAZooWKBj1026/o8ZY68EUZaG6Pr5LuIOFloso/xOpWgXqDOeOR75+jryN/iBAmEa6my8RZ11wQXFpKzlysxUrI7oX8Tn6ei9JHfh6NpVILggCC0rNvQ+GP+aUb8GQfRhSOwBjebBCLu/IUncs6O0KZx7x9SWvHhVb0UjeoOYiTwgYUjid47thyX25YHEE0iwsOFryIgqMLtjfBJS7t3Pv/gKeByjLLBYibbbUCcfO8VrauveB4DUTyeNzX7rCJtsTVJtM3E0eCZRPfh/x5ZrGErdb0T2IoJmpHKeTmt7ulbnj8GyUAB272azAIRt5p/OFA8+dnoBs6jCCALMZQhwa1ZZ7VdNUfIbOcdZBQHcezoXG6ot/xc/Gag5TsRiGo38wQO0EgagORWrP2bxoEClJ3ii4UG3ZTDpPPn9044vXQ80YWJbVQdBfw923HivicMPicRagOdAmvpTAmdvTyrA9T01iev5NqxDF4Mzwm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T2mbfx9+rk2XUGSKGrwU0VtXj3vG+FVQQ4GVbQAjbagjYx3qDkMY72tISDQf7EDj1/UHWOtDKVzEzQ2A8m2CWLzHl33ooy2czVOf3oLjyav/s8EKDUKhN81pbN4xJE7e/ThE/Ks3HyZVW7VVxKWD6sOSA9NOpLocaiOZtWalZhhAMwPn710Rks2plgS6VBQzD+2VsQfRDGMP8soCuE0u883Hr30DTOePXJ7ScQTR3Uuz X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(236129657087228)(767451399110)(167848164394848); 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)(10201501046)(100000703101)(100105400095)(6055026)(6041248)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123562025)(20161123555025)(20161123560025)(6072148)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY4PR12MB1141; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY4PR12MB1141; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtDWTRQUjEyTUIxMTQxOzQ6UWJGMnp1bHJ5L040aVI2OXhwMmt3MlYyaTgr?= =?utf-8?B?YTA4VHVpUzlUTG12R2Y1SDB1cXZlUkhxOFk1bnlEV3FzSHAwaDh4MXd2TzRt?= =?utf-8?B?TFNVTml0Wmx6UEtOMkNkdXd2OWlFNXVDanhUeGpJeGMxdWhaOVVubUxQRmJn?= =?utf-8?B?YVc4ZUU1T05OY05vNWwzbWlPV1FPbWovYktGd0l5L3R1UFFpUHVicThqOVBp?= =?utf-8?B?cVhiRFNxL3dQWmF2RGFxbGlUOXoyOFcvTk5HNlQ3UFZGUUZTeWxqN1p6aUhL?= =?utf-8?B?cXAz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khN?= =?utf-8?B?UitCUXFoSlp4MTAxUXFXcTdJVUU1UEtzclliQTd2OHJZNmdra2VybGJMbjB0?= =?utf-8?B?QmlKV1lqYVFnWkN6Q24xNE9pVjR0WnVyNVlGTHVTSUJ4MC9QTVpQS2JxRHFs?= =?utf-8?B?eHBCaHZjaEF2ZW02WXJVZU12YkNpbitXM1NyY1B4ZVMyRU5CeXd5VUpoNmN0?= =?utf-8?B?SmpRMHlWSktSSjVZN29wSkdjOTRCY3crRkxwZUcxSU1KanFpREdRM2FlQlor?= =?utf-8?B?R2ZpeFVQYzFiR1I1dUlrd2VBYTFmUms5NHpUbVZHcytwL2FRWlNKazBMeVBk?= =?utf-8?B?OGtCWEJ4UzNXdmtINnR3UHJCN0VPdW9SNHZVYmRaY3FHMFgrNkoxblhUS1JR?= =?utf-8?B?emRHaisvZ0UzL3RRUXdua3F6cHhaNGhyNlIvR2RYTDd0NTMxLzJGR3FCMFdK?= =?utf-8?B?ZytXVS9tYW9GQkxwYTVJK3VqYk10QStsZFcycmJzVUVyREFvU0JlZkJSbVhM?= =?utf-8?Q?kMEHtvcQQ9ipSQfXA4YkI0QmtuyIKYW0TryHXe?= X-Forefront-PRVS: 0351D213B3 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(4630300001)(6009001)(39840400002)(39400400002)(39450400003)(39410400002)(39850400002)(39860400002)(103116003)(53416004)(97746001)(47776003)(42186005)(66066001)(50466002)(72206003)(81166006)(33646002)(7736002)(86362001)(7416002)(7406005)(6506006)(5660300001)(305945005)(23676002)(8676002)(53936002)(9686003)(55016002)(2950100002)(6116002)(54906002)(110136004)(38730400002)(76176999)(2906002)(54356999)(83506001)(3846002)(50986999)(4326008)(1076002)(25786009)(189998001)(230700001)(4001350100001)(478600001)(921003)(1121003); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR12MB1141; H:tlendack-t1.amdoffice.net; FPR:; SPF:None; MLV:sfv; LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?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1rL1MYFit4BPpRjZmIHK8grJFqgO8YLlGwa; 24:d3vUr6XVFr58+GY2kkGBhl+to0WdR7bVOGz2dtvSZOEHUYXV+QJ3AUpz1XzNeJ6jap5aU3bga4mpupoI52Dxnlwx272zkHC8c5nxW2utzLQ= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1141; 7:JeF99upT7j3kw+3fpssuRX4vI3VTfW9WLryyZs35dLPZRooMx5YsWB1w28PkRYDB0vPV9d6E9EWWYpGZwKVM/5KvtDG2NBOWJR8wKUDpCYqBOeOiUuUpxbCXwUowjgKMm5x8XpCEaeFuP98afjGbVsMkLqaK+s2vdHI58QZnr24MFj1bJclfXBHJMJMNbcYQ5jYuaCpN/oMHmnGLBHKXZUMmZ9XCgJ1TvQyxnscv2AMHhU3ORg5tupVStHIoPdrZkBuVMhBVMCJAJFtWWG8mrFXc/rhe4pUZOJEqF8ZACFmy8iKM4kb9R+KvjYNe5HdUlHtPz4SD6r0FDTxQ3gCAhtHWyKi6SLykS4H3nU/6yn7HZjr6JorBd9Tdh0em9Rw+EQcXoOS+RSBGLNDeaaRMSna5ZNlup9iSotWY4J3HXEWnmWso93ZWnck8HHSez6+SARqZftAvdpaWOvkccheChVIS+aIBNiQPwb+vbHHSxuFk1zW7TsIR4Fz0zyBUuFYKycOSE7FI4RQNN9EIEEpLy+2XHlPKH5p06hyZxqg8IMImh6tdGv0MjDr2+UgklpfMW+8ZwgyGLq8+sJXe/a29X1tr8aNLbDyUUqKmkziOC6splUR+Mrgxd5VItAqO7Z2J4stl1RujLmTp3l5yHfEzA8op15IBt5aCn+AG4VQnWpWvK2Ds0SCPgpGd/WrefLC1hkUtLfS43ubMEqBfX6g3NcSVXz88I1W5b61/ijIE+dxxM3NlatWP0QUzyS3Z67qmn/3lluBiQOB6YLiLLfAeDnIYrZafVh+b/OQAE+As/S0= X-Microsoft-Exchange-Diagnostics: 1; CY4PR12MB1141; 20:90s8m3tqnyFjNM/LURwDh9D85jfsuAJrrIg+Zz2F7DU5TxbZxq6HJds5x2yA7UQ0VNz/IUpHIAexfN9kpxRZZjdP/UCSqLEa3tgGy7d9KWuNfFyP3nuk9jjnCtjHtdd9US5IYPIteE39BEFVQdb7VucreFqbgduptkyQ6rL5C36UX298YohXwmV3wBhtiOf5W54rCtChKUvWl+abi5Ofc/CIsmVwTLTiasnukKcqFB+2ZogXaktbTgWnd+9aIjW1 X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Jun 2017 15:10:29.9274 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR12MB1141 Cc: Brijesh Singh , Toshimitsu Kani , "Michael S. Tsirkin" , Matt Fleming , Alexander Potapenko , "H. Peter Anvin" , Boris Ostrovsky , Jonathan Corbet , Joerg Roedel , Radim =?utf-8?b?S3LEjW3DocWZ?= , Larry Woodman , Ingo Molnar , Andrey Ryabinin , Dave Young , Rik van Riel , Arnd Bergmann , Borislav Petkov , Andy Lutomirski , Thomas Gleixner , Dmitry Vyukov , Juergen Gross , Paolo Bonzini Subject: [Xen-devel] [PATCH v8 RESEND 17/38] efi: Update efi_mem_type() to return an error rather than 0 X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP The efi_mem_type() function currently returns a 0, which maps to EFI_RESERVED_TYPE, if the function is unable to find a memmap entry for the supplied physical address. Returning EFI_RESERVED_TYPE implies that a memmap entry exists, when it doesn't. Instead of returning 0, change the function to return a negative error value when no memmap entry is found. Reviewed-by: Matt Fleming Reviewed-by: Borislav Petkov Signed-off-by: Tom Lendacky --- arch/ia64/kernel/efi.c | 4 ++-- arch/x86/platform/efi/efi.c | 6 +++--- include/linux/efi.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/ia64/kernel/efi.c b/arch/ia64/kernel/efi.c index 1212956..8141600 100644 --- a/arch/ia64/kernel/efi.c +++ b/arch/ia64/kernel/efi.c @@ -757,14 +757,14 @@ static void __init handle_palo(unsigned long phys_addr) return 0; } -u32 +int efi_mem_type (unsigned long phys_addr) { efi_memory_desc_t *md = efi_memory_descriptor(phys_addr); if (md) return md->type; - return 0; + return -EINVAL; } u64 diff --git a/arch/x86/platform/efi/efi.c b/arch/x86/platform/efi/efi.c index f084d87..6217b23 100644 --- a/arch/x86/platform/efi/efi.c +++ b/arch/x86/platform/efi/efi.c @@ -1035,12 +1035,12 @@ void __init efi_enter_virtual_mode(void) /* * Convenience functions to obtain memory types and attributes */ -u32 efi_mem_type(unsigned long phys_addr) +int efi_mem_type(unsigned long phys_addr) { efi_memory_desc_t *md; if (!efi_enabled(EFI_MEMMAP)) - return 0; + return -ENOTSUPP; for_each_efi_memory_desc(md) { if ((md->phys_addr <= phys_addr) && @@ -1048,7 +1048,7 @@ u32 efi_mem_type(unsigned long phys_addr) (md->num_pages << EFI_PAGE_SHIFT)))) return md->type; } - return 0; + return -EINVAL; } static int __init arch_parse_efi_cmdline(char *str) diff --git a/include/linux/efi.h b/include/linux/efi.h index 8e24f09..4e47f78 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h @@ -985,7 +985,7 @@ static inline void efi_esrt_init(void) { } extern int efi_config_parse_tables(void *config_tables, int count, int sz, efi_config_table_type_t *arch_tables); extern u64 efi_get_iobase (void); -extern u32 efi_mem_type (unsigned long phys_addr); +extern int efi_mem_type(unsigned long phys_addr); extern u64 efi_mem_attributes (unsigned long phys_addr); extern u64 efi_mem_attribute (unsigned long phys_addr, unsigned long size); extern int __init efi_uart_console_only (void);