From patchwork Fri Aug 5 23:04:36 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Kiper X-Patchwork-Id: 9265799 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 824D16089F for ; Fri, 5 Aug 2016 23:08:38 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 715A42841F for ; Fri, 5 Aug 2016 23:08:38 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 65CA728462; Fri, 5 Aug 2016 23:08:38 +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.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY 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 D610B284A0 for ; Fri, 5 Aug 2016 23:08:28 +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 1bVoBk-0003TB-Hw; Fri, 05 Aug 2016 23:06:00 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bVoBk-0003SU-18 for xen-devel@lists.xenproject.org; Fri, 05 Aug 2016 23:06:00 +0000 Received: from [85.158.139.211] by server-2.bemta-5.messagelabs.com id F9/2B-03032-7DB15A75; Fri, 05 Aug 2016 23:05:59 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFvrNLMWRWlGSWpSXmKPExsXSO6nOVfea9NJ wg7knjCy+b5nM5MDocfjDFZYAxijWzLyk/IoE1owVuzILOngqzn0rb2B8zNHFyMUhJNDKJPF7 +i/2LkZOIOcro0T7Qh6IxAZGiftvzrNAOBMZJeb2nmUCqWIT0JG4+OUhWIeIgJLEvVWTmUCKm AWOMkn8n/yYFSQhLJAn8WTnS7AiFgFViYe3XzGD2LwC7hLblz5jA7ElBBQlup9NALM5geLzNj 5ngzjDTeJj93xWiBpDidMPtzFOYORbwMiwilGjOLWoLLVI19BCL6koMz2jJDcxM0fX0MBULze 1uDgxPTUnMalYLzk/dxMjMFAYgGAHY9N2z0OMkhxMSqK85y8vCRfiS8pPqcxILM6ILyrNSS0+ xCjDwaEkwTtVamm4kGBRanpqRVpmDjBkYdISHDxKIrxXQNK8xQWJucWZ6RCpU4yKUuK850ASA iCJjNI8uDZYnFxilJUS5mUEOkSIpyC1KDezBFX+FaM4B6OSMO8lkCk8mXklcNNfAS1mAlr80W oJyOKSRISUVAOj4kHDaY37hC1DL/4/a3f78bz4u9NVJlT3370YdmiX8Yx8Gd0IzxIRpuVGe79 Osp/R+nu97PNZ/9iCd/2bG7++cOoN0W/xJe9/7gubWKo03aXWqXRpaKvY82blRJF9G50ZNZdm temKK/9fsIgj3PZ38FozqaVu9UIPp7DpLel1dlkh+vbH7fh/SizFGYmGWsxFxYkAGbOClI4CA AA= X-Env-Sender: daniel.kiper@oracle.com X-Msg-Ref: server-12.tower-206.messagelabs.com!1470438357!16841077!1 X-Originating-IP: [141.146.126.69] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogMTQxLjE0Ni4xMjYuNjkgPT4gMjc3MjE4\n X-StarScan-Received: X-StarScan-Version: 8.77; banners=-,-,- X-VirusChecked: Checked Received: (qmail 45042 invoked from network); 5 Aug 2016 23:05:58 -0000 Received: from aserp1040.oracle.com (HELO aserp1040.oracle.com) (141.146.126.69) by server-12.tower-206.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 5 Aug 2016 23:05:58 -0000 Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u75N5ojp005513 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 5 Aug 2016 23:05:51 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0021.oracle.com (8.13.8/8.13.8) with ESMTP id u75N5obV017003 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 5 Aug 2016 23:05:50 GMT Received: from abhmp0006.oracle.com (abhmp0006.oracle.com [141.146.116.12]) by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id u75N5nhE003516; Fri, 5 Aug 2016 23:05:49 GMT Received: from olila.local.net-space.pl (/10.175.255.156) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 05 Aug 2016 16:05:49 -0700 From: Daniel Kiper To: xen-devel@lists.xenproject.org Date: Sat, 6 Aug 2016 01:04:36 +0200 Message-Id: <1470438282-4226-14-git-send-email-daniel.kiper@oracle.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1470438282-4226-1-git-send-email-daniel.kiper@oracle.com> References: <1470438282-4226-1-git-send-email-daniel.kiper@oracle.com> X-Source-IP: userv0021.oracle.com [156.151.31.71] Cc: jgross@suse.com, sstabellini@kernel.org, andrew.cooper3@citrix.com, cardoe@cardoe.com, pgnet.dev@gmail.com, ning.sun@intel.com, david.vrabel@citrix.com, jbeulich@suse.com, qiaowei.ren@intel.com, richard.l.maliszewski@intel.com, gang.wei@intel.com, fu.wei@linaro.org Subject: [Xen-devel] [PATCH v4 13/19] efi: EFI_RS bit in efi.flags must be controlled by efi=[no-]rs command line argument 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: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Otherwise efi_enabled(EFI_RS) check is unreliable. Signed-off-by: Daniel Kiper --- xen/common/efi/boot.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/xen/common/efi/boot.c b/xen/common/efi/boot.c index dd6b0a8..95cb25f 100644 --- a/xen/common/efi/boot.c +++ b/xen/common/efi/boot.c @@ -1159,7 +1159,6 @@ efi_start(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable) #ifndef CONFIG_ARM /* TODO - runtime service support */ -static bool_t __initdata efi_rs_enable = 1; static bool_t __initdata efi_map_uc; static void __init parse_efi_param(char *s) @@ -1177,7 +1176,10 @@ static void __init parse_efi_param(char *s) *ss = '\0'; if ( !strcmp(s, "rs") ) - efi_rs_enable = val; + { + if ( !val ) + __clear_bit(EFI_RS, &efi.flags); + } else if ( !strcmp(s, "attr=uc") ) efi_map_uc = val; @@ -1260,7 +1262,7 @@ void __init efi_init_memory(void) desc->PhysicalStart, desc->PhysicalStart + len - 1, desc->Type, desc->Attribute); - if ( !efi_rs_enable || + if ( !efi_enabled(EFI_RS) || (!(desc->Attribute & EFI_MEMORY_RUNTIME) && (!map_bs || (desc->Type != EfiBootServicesCode && @@ -1334,7 +1336,7 @@ void __init efi_init_memory(void) } } - if ( !efi_rs_enable ) + if ( !efi_enabled(EFI_RS) ) { efi_fw_vendor = NULL; return;