Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752547AbdFGTQ1 (ORCPT ); Wed, 7 Jun 2017 15:16:27 -0400 Received: from mail-bl2nam02on0046.outbound.protection.outlook.com ([104.47.38.46]:42653 "EHLO NAM02-BL2-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752158AbdFGTQV (ORCPT ); Wed, 7 Jun 2017 15:16:21 -0400 Authentication-Results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=amd.com; From: Tom Lendacky Subject: [PATCH v6 16/34] efi: Add an EFI table address match function 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, linux-mm@kvack.org, iommu@lists.linux-foundation.org Cc: Rik van Riel , Radim =?utf-8?b?S3LEjW3DocWZ?= , Toshimitsu Kani , Arnd Bergmann , Jonathan Corbet , Matt Fleming , "Michael S. Tsirkin" , Joerg Roedel , Konrad Rzeszutek Wilk , Paolo Bonzini , Larry Woodman , Brijesh Singh , Ingo Molnar , Borislav Petkov , Andy Lutomirski , "H. Peter Anvin" , Andrey Ryabinin , Alexander Potapenko , Dave Young , Thomas Gleixner , Dmitry Vyukov Date: Wed, 07 Jun 2017 14:16:03 -0500 Message-ID: <20170607191603.28645.2332.stgit@tlendack-t1.amdoffice.net> In-Reply-To: <20170607191309.28645.15241.stgit@tlendack-t1.amdoffice.net> References: <20170607191309.28645.15241.stgit@tlendack-t1.amdoffice.net> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Originating-IP: [165.204.77.1] X-ClientProxiedBy: CY4PR16CA0007.namprd16.prod.outlook.com (10.172.173.17) To MWHPR12MB1150.namprd12.prod.outlook.com (10.169.204.14) X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWHPR12MB1150: X-MS-Office365-Filtering-Correlation-Id: 84b5a0fb-11b3-4595-4b87-08d4add9a8d1 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001)(48565401081)(201703131423075)(201703031133081);SRVR:MWHPR12MB1150; X-Microsoft-Exchange-Diagnostics: 1;MWHPR12MB1150;3:AmFhl6toQHmaSqsncbMmMzRz/zmUQsdU5I94xQNBQf9tmUBXYQv5A7xjOvHB3uGTyq3H4f1BkwgFKkLoJPgmg/GxgFQQcnp/Hw7BCWwm97RvAXCXQrvBfGnOg1nAi0Qq1j1F6YJyFkubyJ6+fPmq02UaiflimMUsjowxCyP4jy2VFXPbqwasJ5GxLZC4zXzK3CwWu1SK9iDk2EjDPvBcjGhTAb+ZcTlV0moPRJeneh5erfKGrlg2pKUhNlR7g9C3zVHxOEev5FS5K05XEQRuPxgxQpe66VgDjRjkG4hW8YnPGOaZ70MMoqp5XO/GJtJu6QHZGPzVo2kUpillzWRf9sNunqVyl0GPqiFtK9iOm8c=;25:Uc8ZO2hu4rsUESvXjVWTCV3v5B5WdJi85IMOd75Pjnnn8KUY9EZvxIO9AZvbxlSyRadiygoKchXCRBIw97GV0DLOLCNTopLDXGhAvsFsKTpqOXqifY4hMLVMrxonkvd2QdCMy5b91wPza/EDAB/XQNNmahFXKrgAObzBkr/qfjOT4GT3ri0WAeNKac4CWiMdFPzHcnQRd0Azcg+qhUnXlAd7KLNUjupaWMM8T1G77n4ASJ6n4sjSIHFcrGPoIG+muTpU5Ua67CxthFHdV2AOnsB9jlQtsdmeDC0jh5cE5v8ac5V26GP9v0cuyuMjdSnPF4/cNydoOelOYYZx0DKuSkmCvcmvI4VFE7OprBScdhZ9SWRo8e4IMZCAPB+7fQa+waPZb0vM8eabncVx8NGhYJbupLaOX1TV33r7VEkGxXxGvOiuX/Qifj8Gb4K0NJtEsWw75bu4HOoLRiWpPk2LC4kb2fQ9sNwxJiZEey5ZE2w= X-Microsoft-Exchange-Diagnostics: 1;MWHPR12MB1150;31:LNrvS2B2aZ8WfwknrLg+TDiZIazN2TwjkyNUxmvn5Hj2PY8E4ctStqvmaKZoPes8gBOu8+QiRTGIZkh/LclxgRU8xzlAaEqxpWcMRVq1nV8IhxFHbtkTjtFFo3Bzb+jHF5AZDQSDkT2JXcnddPZb0rxzhytjQBPPW2WuCV7aOxzGDdkSUlPSARAjyxNoFX5qDOXUQA3o3QVpYHLduyjPNG0/uBvdolY/3sinrICXB6y+MCNXmdaWzu/K/N74ovEQAzllJAL3NJkq1tRjKOFuTA==;20:Rwsp5uksoTG/VubCliLiiIWOtXVoKpqqMN9qFBLWpsAWpjLG48K8KK8/i9TXpXBqnL52ammTLmKl3YoGjulZlFJs8pJu2S1eyYZimCepwe0rysC+Odl/7Bu8qFS459wYaChbqHmAPNzZSx7u6dy0vKIMu7KB8yKuRNzFOCkikj7Buh/Onh4T5mt2YUXwdoN0DUyke4FgvO1itrAp8rwULm2HJgcViKeXwGWzoFO3Yxx/1hxSCp20wzdquPAG9t+ELwdh9wx4K6HpPvbJOfitu4ESJodXbs/Cnj/uVeFDv2x+H0AbncLDIachnVUBGSnY6752k5vmmn16+t9hgvn5qAL8DUmukVUKrk3GM/43Evyt5/vU7O77IKVUG3n/zWNwoC7ARzJme5qfS50wvqKiTzvNK9rWvrkrxoRtBTIeWmW6QvyZVkRAAkEuWfIbSsimGeuEUOyZnbUem+R2+casbJSm/KmhwNAa3C9ArJ4WCYckZ7g7KbfXszVejsujEtI3 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(767451399110); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(100000703101)(100105400095)(93006095)(93001095)(6055026)(6041248)(20161123564025)(20161123560025)(20161123562025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123558100)(6072148)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:MWHPR12MB1150;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:MWHPR12MB1150; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtNV0hQUjEyTUIxMTUwOzQ6WHNGMmtycUFscC9VUVViY2JpWCtkanE3NzBI?= =?utf-8?B?aFlkT2FBdmg3akx4NTQrWEVCTzRMRWtuVFY4Yk1rSWhhaUtmSnY3T2hqYWxs?= =?utf-8?B?cnVTS25sVnBqRktLT0tSaUVQWHg3RHBvNzVwNUg4VmFBVVNEaTR5UUgwcWM2?= =?utf-8?B?Q3dBR0VYQUhncUs4Mkx4K1FMbm5YM3llQjd6RkFkUGtmWUpBK3c0c0JDdXVW?= =?utf-8?B?UkNYa3h6SE1KOTc2cE1tU2dORnN6bERaMmdOeDJpbDFKbmZ5am94NjZWQnVs?= =?utf-8?B?Q2MwRC85TDMzT3hoQklEaXNDaHpMUGU2QWlBQW81TkdlaFRlcFpheEhJZU11?= =?utf-8?B?Y3BlL2pOV3VUM2dUZ2xsNkhGYWNkcXQzMHhDbkF0YUozSjdJK0dleHdIQWJK?= =?utf-8?B?SStBeUF2S3IzL3M3NnBNSndKNko2MnBKUDJVVG5CNGlpZjZzaGJ1NHlEMi9a?= =?utf-8?B?L1R6S29Zem42VDM2RlRPV0l1UVh6SHRGM3hwZk1xd0dNSEN4b3pKUWFEaG5U?= =?utf-8?B?c3JPRG16cDk0UktBeEVuSjNrYmNOZmhCQ0oyOTkzZmIxdmkzR1V0M2NRd2xl?= =?utf-8?B?VFZtcEl5RE1uZFlSQko1YW5EWERIOFR4V2lad0t5bnIxOXZvTThYdHdIdEx6?= =?utf-8?B?ODYyYmFocmg3U1ZHUTFvNXNQUkRFallURGdXTUQ0MW9idzNMVHZTb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FNtVVpDQ2sraWZWdEFRNVZzSndZ?= =?utf-8?Q?mNukK5eMjJW6qqJKVp9?= X-Forefront-PRVS: 03319F6FEF X-Forefront-Antispam-Report: SFV:NSPM;SFS:(10009020)(4630300001)(6009001)(39400400002)(39410400002)(39450400003)(39840400002)(39860400002)(39850400002)(33646002)(81166006)(9686003)(54906002)(53936002)(6506006)(38730400002)(110136004)(189998001)(83506001)(55016002)(42186005)(2950100002)(25786009)(66066001)(4001350100001)(47776003)(6666003)(4326008)(76176999)(54356999)(72206003)(305945005)(478600001)(7406005)(7416002)(7736002)(23676002)(5660300001)(50986999)(97746001)(86362001)(50466002)(8676002)(6116002)(2906002)(3846002)(53416004)(230700001)(1076002)(103116003)(921003)(1121003);DIR:OUT;SFP:1101;SCL:1;SRVR:MWHPR12MB1150;H:tlendack-t1.amdoffice.net;FPR:;SPF:None;MLV:sfv;LANG:en; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtNV0hQUjEyTUIxMTUwOzIzOmhxaDhIWGQ1bFpyZjRka1F1ZitXV3VaZ3d4?= =?utf-8?B?QjlYZXJJM1VEcFZsNWdFRGpjV3d4cGFtd0tEeWdsckpKOUVYcjBJOWF3MkRD?= =?utf-8?B?NWl0RGZCMVZqYk13Y0pHNmdoU2I4V08wRzFqQnRWQWJybEFBUzdHV2JKUHc0?= =?utf-8?B?RE1BcUp0KzFqZ0pFcE40RjkzbzlYS0NNdnZ4U2JNc25wUmdlandIOUx4TXp2?= =?utf-8?B?S3Rwc2JVY0pMSVhuc2JmQ2htR1dCRW1wRjRiMEw2ZjQwdFRYNVUvN0FwMjZo?= =?utf-8?B?bnhiNHNTQVI1c1FTSi9QSVdXalErQmlKZjdvMDhyY1dqSm1pdzdWZyttOVRz?= =?utf-8?B?K051R2JmdVBZUnZnWHBzcXB0eVMzdzViWXRnM2k0UVNzUWpGNURta3gyeXln?= =?utf-8?B?NDlaNnNhZFgzelFYbUZmZlNPTE5sNHFRSWJYdmpOKzYyWTVNaWV1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BzR7t9hg4NXx9DhsPUwWJKcDtzvmd9RQ9K3wqbQnjTY38zd9Txj7CYoAoRmYbSqkyFTImFZHJI5dIW4Ihdw3vLJkn6rKfyxnDEiTwKcmgzcgRQYfoJqdoSFYGfOsnSsA6P166vcqicer1CJcj7//mzrFmF0lAf5kJtTegFKiBA79sm6RL4+iSTHvCS7veJghbKcs55CfmnR/IHccxCVFtClO+N+OpZm/ X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Jun 2017 19:16:10.0525 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR12MB1150 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2097 Lines: 85 Add a function that will determine if a supplied physical address matches the address of an EFI table. Signed-off-by: Tom Lendacky --- drivers/firmware/efi/efi.c | 33 +++++++++++++++++++++++++++++++++ include/linux/efi.h | 7 +++++++ 2 files changed, 40 insertions(+) diff --git a/drivers/firmware/efi/efi.c b/drivers/firmware/efi/efi.c index b372aad..983675d 100644 --- a/drivers/firmware/efi/efi.c +++ b/drivers/firmware/efi/efi.c @@ -55,6 +55,25 @@ struct efi __read_mostly efi = { }; EXPORT_SYMBOL(efi); +static unsigned long *efi_tables[] = { + &efi.mps, + &efi.acpi, + &efi.acpi20, + &efi.smbios, + &efi.smbios3, + &efi.sal_systab, + &efi.boot_info, + &efi.hcdp, + &efi.uga, + &efi.uv_systab, + &efi.fw_vendor, + &efi.runtime, + &efi.config_table, + &efi.esrt, + &efi.properties_table, + &efi.mem_attr_table, +}; + static bool disable_runtime; static int __init setup_noefi(char *arg) { @@ -854,6 +873,20 @@ int efi_status_to_err(efi_status_t status) return err; } +bool efi_is_table_address(unsigned long phys_addr) +{ + unsigned int i; + + if (phys_addr == EFI_INVALID_TABLE_ADDR) + return false; + + for (i = 0; i < ARRAY_SIZE(efi_tables); i++) + if (*(efi_tables[i]) == phys_addr) + return true; + + return false; +} + #ifdef CONFIG_KEXEC static int update_efi_random_seed(struct notifier_block *nb, unsigned long code, void *unused) diff --git a/include/linux/efi.h b/include/linux/efi.h index ec36f42..504fa85 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h @@ -1079,6 +1079,8 @@ static inline bool efi_enabled(int feature) return test_bit(feature, &efi.flags) != 0; } extern void efi_reboot(enum reboot_mode reboot_mode, const char *__unused); + +extern bool efi_is_table_address(unsigned long phys_addr); #else static inline bool efi_enabled(int feature) { @@ -1092,6 +1094,11 @@ static inline bool efi_enabled(int feature) { return false; } + +static inline bool efi_is_table_address(unsigned long phys_addr) +{ + return false; +} #endif extern int efi_status_to_err(efi_status_t status);