From: "Jan Beulich" Subject: Re: [PATCH v2] x86/EFI: allow reboot= overrides when running under EFI Date: Fri, 13 Mar 2015 10:37:08 +0000 Message-ID: <5502CBE40200007800069AF2@mail.emea.novell.com> References: <5501CD9302000078000694AB@mail.emea.novell.com> <5501C247.8030801@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YWMxp-0001fG-4O for xen-devel@lists.xenproject.org; Fri, 13 Mar 2015 10:37:09 +0000 In-Reply-To: <5501C247.8030801@citrix.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper , Ross Lagerwall , xen-devel Cc: Keir Fraser List-Id: xen-devel@lists.xenproject.org >>> On 12.03.15 at 17:43, wrote: > On 12/03/15 16:32, Jan Beulich wrote: >> By default we will always use EFI reboot mechanism when >> running under EFI platforms. However some EFI platforms >> are buggy and need to use the ACPI mechanism to >> reboot (such as Lenovo ThinkCentre M57). As such >> respect the 'reboot=' override and DMI overrides >> for EFI platforms. >> >> Signed-off-by: Konrad Rzeszutek Wilk >> >> - BOOT_INVALID is just zero >> - also consider acpi_disabled in BOOT_INVALID resolution >> - duplicate BOOT_INVALID resolution in machine_restart() >> - don't fall back from BOOT_ACPI to BOOT_EFI (if it was overridden, it >> surely was for a reason) >> - adjust doc change formatting >> >> Signed-off-by: Jan Beulich >> Reviewed-by: Konrad Rzeszutek Wilk > > Reviewed-by: Andrew Cooper > > Are you happy merging this with Ross's v2 patch (my review still > withstanding), with which this conflicts? And which allows this to become even less of a change: x86: don't apply reboot quirks if reboot set by user If reboot= is specified on the command-line, don't apply reboot quirks to allow the command-line option to take precedence. This is a port of Linux commit 5955633e91bf ("x86/reboot: Skip DMI checks if reboot set by user"). Signed-off-by: Ross Lagerwall Leverage (and make apply on top of) c643fb110a ("x86/EFI: allow reboot= overrides when running under EFI"). Signed-off-by: Jan Beulich --- a/xen/arch/x86/shutdown.c +++ b/xen/arch/x86/shutdown.c @@ -464,6 +464,13 @@ static struct dmi_system_id __initdata r static int __init reboot_init(void) { + /* + * Only do the DMI check if reboot_type hasn't been overridden + * on the command line + */ + if ( reboot_type != BOOT_INVALID ) + return 0; + default_reboot_type(); dmi_check_system(reboot_dmi_table); return 0;