From patchwork Thu Sep 29 21:42:32 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Kiper X-Patchwork-Id: 9357157 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 1DB286077B for ; Thu, 29 Sep 2016 21:46:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1203729C78 for ; Thu, 29 Sep 2016 21:46:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 06B6329C7A; Thu, 29 Sep 2016 21:46: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.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 A241B29C78 for ; Thu, 29 Sep 2016 21:45: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 1bpj6w-0003NH-Pc; Thu, 29 Sep 2016 21:43:22 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bpj6u-0003MF-Uq for xen-devel@lists.xenproject.org; Thu, 29 Sep 2016 21:43:21 +0000 Received: from [85.158.139.211] by server-13.bemta-5.messagelabs.com id 5E/26-24266-7FA8DE75; Thu, 29 Sep 2016 21:43:19 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupgkeJIrShJLcpLzFFi42LpnVTnqvu9622 4wdu/4hbft0xmcmD0OPzhCksAYxRrZl5SfkUCa8ar52dYC2ayV3zsesfcwPiGtYuRi0NIoINJ 4sbjLywQzhdGiac7e4AynEDORkaJk2dDIOyJjBIXViSC2GwCOhIXvzxkB7FFBJQk7q2azATSz Cywi0ni1OWNjCAJYYEgifaO7WBFLAKqEn1TusDivALuEp/PrAJbICGgKNH9bAIbiM0p4CExo+ EFI8Qyd4m+Y7/YIWqMJfpm9bFMYORbwMiwilGjOLWoLLVI19BCL6koMz2jJDcxM0fX0MBULze 1uDgxPTUnMalYLzk/dxMjMFQYgGAHY9N2z0OMkhxMSqK8pwPfhgvxJeWnVGYkFmfEF5XmpBYf YpTh4FCS4J3bCZQTLEpNT61Iy8wBBi1MWoKDR0mEdxZImre4IDG3ODMdInWKUZdjwY/ba5mEW PLy81KlxHmnghQJgBRllObBjYBF0CVGWSlhXkago4R4ClKLcjNLUOVfMYpzMCoJ8yaATOHJzC uB2/QK6AgmoCPyj74BOaIkESEl1cBoF7uPSe+JxNnUooutElK/S8/nHO/3TA5cWmTc9HD9OYb MT9tPGa/wNvzbL27ayhVQ8PAIu/p8r9+KLjNnGUg76u1rP/DY6c43m+J7CVE77+948ubSj8e3 9/zefv335K3POZ8a+yQnJSU3FkSyqXk7H8h++vNaVoVV6LHVwo/nhPZPi7AsSQ1XYinOSDTUY i4qTgQACwCiWJsCAAA= X-Env-Sender: daniel.kiper@oracle.com X-Msg-Ref: server-5.tower-206.messagelabs.com!1475185397!60693876!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.84; banners=-,-,- X-VirusChecked: Checked Received: (qmail 49523 invoked from network); 29 Sep 2016 21:43:19 -0000 Received: from aserp1040.oracle.com (HELO aserp1040.oracle.com) (141.146.126.69) by server-5.tower-206.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 29 Sep 2016 21:43:19 -0000 Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u8TLh7VV024330 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 29 Sep 2016 21:43:08 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id u8TLh7OD010735 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 29 Sep 2016 21:43:07 GMT Received: from abhmp0009.oracle.com (abhmp0009.oracle.com [141.146.116.15]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id u8TLh6JZ015800; Thu, 29 Sep 2016 21:43:06 GMT Received: from olila.local.net-space.pl (/10.175.208.109) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 29 Sep 2016 14:43:06 -0700 From: Daniel Kiper To: xen-devel@lists.xenproject.org Date: Thu, 29 Sep 2016 23:42:32 +0200 Message-Id: <1475185362-14198-4-git-send-email-daniel.kiper@oracle.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1475185362-14198-1-git-send-email-daniel.kiper@oracle.com> References: <1475185362-14198-1-git-send-email-daniel.kiper@oracle.com> X-Source-IP: aserv0021.oracle.com [141.146.126.233] Cc: jgross@suse.com, sstabellini@kernel.org, andrew.cooper3@citrix.com, cardoe@cardoe.com, pgnet.dev@gmail.com, ning.sun@intel.com, julien.grall@arm.com, david.vrabel@citrix.com, jbeulich@suse.com, qiaowei.ren@intel.com, gang.wei@intel.com, fu.wei@linaro.org Subject: [Xen-devel] [PATCH v9 03/13] x86: allow EFI reboot method neither on EFI platforms... 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 ..nor EFI platforms with runtime services enabled. Suggested-by: Jan Beulich Signed-off-by: Daniel Kiper Acked-by: Jan Beulich --- v6 - suggestions/fixes: - move this commit behind "efi: create efi_enabled()" commit (suggested by Jan Beulich). v5 - suggestions/fixes: - fix build error (suggested by Jan Beulich), - improve commit message. --- xen/arch/x86/shutdown.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/xen/arch/x86/shutdown.c b/xen/arch/x86/shutdown.c index 54c2c79..b429fd0 100644 --- a/xen/arch/x86/shutdown.c +++ b/xen/arch/x86/shutdown.c @@ -80,6 +80,9 @@ static void __init set_reboot_type(char *str) break; str++; } + + if ( reboot_type == BOOT_EFI && !efi_enabled(EFI_RS) ) + reboot_type = BOOT_INVALID; } custom_param("reboot", set_reboot_type);