From patchwork Fri Sep 23 21:47:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Kiper X-Patchwork-Id: 9348917 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 E68316077A for ; Fri, 23 Sep 2016 21:51:16 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D831C2AE48 for ; Fri, 23 Sep 2016 21:51:16 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CD0A12AE49; Fri, 23 Sep 2016 21:51:16 +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 934132AE50 for ; Fri, 23 Sep 2016 21:51:14 +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 1bnYKi-0003pc-Hj; Fri, 23 Sep 2016 21:48: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 1bnYKh-0003or-50 for xen-devel@lists.xenproject.org; Fri, 23 Sep 2016 21:48:35 +0000 Received: from [193.109.254.147] by server-6.bemta-6.messagelabs.com id EE/61-11175-233A5E75; Fri, 23 Sep 2016 21:48:34 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFupkkeJIrShJLcpLzFFi42LpnVTnqmu0+Gm 4wb9+ZovvWyYzOTB6HP5whSWAMYo1My8pvyKBNePV8zOsBTPZKz52vWNuYHzD2sXIxSEk0MEk 8WDrH3YI5wujxLHZLxghnA2MEu2/m6CciYwSR9feYepi5ORgE9CRuPjlITuILSKgJHFv1WQmk CJmgV1MEqcub2QESQgLBEn8+/UTzGYRUJVYuGYiUBEHB6+Au8TlTaEgYQkBRYnuZxPYQGxOAQ +J60/Ws4DYQkAlW5uXMULUGEv0zepjmcDIt4CRYRWjRnFqUVlqka6xoV5SUWZ6RkluYmaOrqG BmV5uanFxYnpqTmJSsV5yfu4mRmCwMADBDsamRYGHGCU5mJREefnrnoYL8SXlp1RmJBZnxBeV 5qQWH2KU4eBQkuA1XQSUEyxKTU+tSMvMAYYtTFqCg0dJhLcQJM1bXJCYW5yZDpE6xajLseDH7 bVMQix5+XmpUuK8pxYCFQmAFGWU5sGNgMXQJUZZKWFeRqCjhHgKUotyM0tQ5V8xinMwKgnz+s wFmsKTmVcCt+kV0BFMQEd8u/ME5IiSRISUVAOjSnmEwfeG5qWTfQOZ4lesOFyyQZ310RN56dn Hzm5SjZj1KLVr54UEz56KkutL61Q/McVKNWh1am/+uMZv17K13uuv33875UGpkp+DnlL9TqZ2 rzWXvyllPn7Os2CnesY9v6MpKxxlOHI2L3jUGui9+K+ww4drRrvOJ2+5+zrLaOED6W1CluHrl ViKMxINtZiLihMB8/pnWZwCAAA= X-Env-Sender: daniel.kiper@oracle.com X-Msg-Ref: server-14.tower-27.messagelabs.com!1474667311!48541414!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 47390 invoked from network); 23 Sep 2016 21:48:33 -0000 Received: from aserp1040.oracle.com (HELO aserp1040.oracle.com) (141.146.126.69) by server-14.tower-27.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 23 Sep 2016 21:48:33 -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 u8NLmMH9019734 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 23 Sep 2016 21:48:23 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 u8NLmMax032410 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 23 Sep 2016 21:48:22 GMT Received: from abhmp0003.oracle.com (abhmp0003.oracle.com [141.146.116.9]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id u8NLmLYB015825; Fri, 23 Sep 2016 21:48:21 GMT Received: from olila.local.net-space.pl (/10.175.174.211) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Fri, 23 Sep 2016 14:48:21 -0700 From: Daniel Kiper To: xen-devel@lists.xenproject.org Date: Fri, 23 Sep 2016 23:47:30 +0200 Message-Id: <1474667259-27290-6-git-send-email-daniel.kiper@oracle.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1474667259-27290-1-git-send-email-daniel.kiper@oracle.com> References: <1474667259-27290-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 v7 05/14] 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);