From patchwork Mon Sep 12 20:18:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Kiper X-Patchwork-Id: 9327983 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 208A26077F for ; Mon, 12 Sep 2016 20:23:43 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 126C928EAE for ; Mon, 12 Sep 2016 20:23:43 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0746928EAC; Mon, 12 Sep 2016 20:23:43 +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 112F228EAE for ; Mon, 12 Sep 2016 20:23:40 +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 1bjXjb-0006Gp-Op; Mon, 12 Sep 2016 20:21:43 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bjXjb-0006GF-9q for xen-devel@lists.xenproject.org; Mon, 12 Sep 2016 20:21:43 +0000 Received: from [85.158.139.211] by server-9.bemta-5.messagelabs.com id 9B/B7-13924-65E07D75; Mon, 12 Sep 2016 20:21:42 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupgkeJIrShJLcpLzFFi42LpnVTnqhvKdz3 c4Ecfn8X3LZOZHBg9Dn+4whLAGMWamZeUX5HAmvG8T7XgPVvFk/nbmRoYj7F2MXJxCAm0MUl8 XbaGvYuRE8j5wihxcpYsRGIjo0Rj51dGCGcCo8SCvmY2kCo2AR2Ji18egnWICChJ3Fs1mQmki FlgDpPE1d5dTCAJYYEgic9Pf7GA2CwCqhJzFrxiBrF5Bdwl5i24DxaXEFCU6H42AWwop4CHxP OuCcwQZ7hLHFl9mAmixlDi9MNtjBMY+RYwMqxi1ChOLSpLLdI1MtVLKspMzyjJTczM0TU0MNX LTS0uTkxPzUlMKtZLzs/dxAgMlXoGBsYdjLva/Q4xSnIwKYnyJgleCxfiS8pPqcxILM6ILyrN SS0+xCjDwaEkwcvHez1cSLAoNT21Ii0zBxi0MGkJDh4lEd6TPEBp3uKCxNzizHSI1ClGXY4FP 26vZRJiycvPS5US5xUBmSEAUpRRmgc3AhZBlxhlpYR5GRkYGIR4ClKLcjNLUOVfMYpzMCoJ8z KDTOHJzCuB2/QK6AgmoCOebr0MckRJIkJKqoFxhYlB6MSg88GOWxhcDbxmc3u22VpfzxFgTPq RrFf+bIvH/VnxSzMWnX9zimd14srqtWlHll6aVSwssr7YxPfK6ccH7Z6/vPNrqprXrXthKb/s WY8s+qhyt2HCnvTbyU6+Bexhh1K7J7Hyn0k/4xM1R7dm2wWheRknts61KGrP31/rZ5YWEn9Hi aU4I9FQi7moOBEAHzZg8ZsCAAA= X-Env-Sender: daniel.kiper@oracle.com X-Msg-Ref: server-10.tower-206.messagelabs.com!1473711699!41956000!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 24090 invoked from network); 12 Sep 2016 20:21:40 -0000 Received: from aserp1040.oracle.com (HELO aserp1040.oracle.com) (141.146.126.69) by server-10.tower-206.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 12 Sep 2016 20:21:40 -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 u8CKLTf7019798 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 12 Sep 2016 20:21:30 GMT Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by userv0021.oracle.com (8.13.8/8.13.8) with ESMTP id u8CKLTbB008337 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 12 Sep 2016 20:21:29 GMT Received: from abhmp0008.oracle.com (abhmp0008.oracle.com [141.146.116.14]) by userv0121.oracle.com (8.13.8/8.13.8) with ESMTP id u8CKLIFa021250; Mon, 12 Sep 2016 20:21:23 GMT Received: from olila.local.net-space.pl (/10.175.172.57) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 12 Sep 2016 13:21:17 -0700 From: Daniel Kiper To: xen-devel@lists.xenproject.org Date: Mon, 12 Sep 2016 22:18:21 +0200 Message-Id: <1473711511-11931-7-git-send-email-daniel.kiper@oracle.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1473711511-11931-1-git-send-email-daniel.kiper@oracle.com> References: <1473711511-11931-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, gang.wei@intel.com, fu.wei@linaro.org Subject: [Xen-devel] [PATCH v6 06/15] 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);