All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86/shutdown: Use ACPI reboot method for Dell PowerEdge R740
@ 2018-01-19 16:57 Ross Lagerwall
  2018-01-22 12:29 ` Jan Beulich
  2018-01-24 12:56 ` Jan Beulich
  0 siblings, 2 replies; 5+ messages in thread
From: Ross Lagerwall @ 2018-01-19 16:57 UTC (permalink / raw)
  To: xen-devel; +Cc: Ross Lagerwall, Jan Beulich, Andrew Cooper

When EFI booting the Dell PowerEdge R740, it consistently wanders into the
weeds and gets an invalid opcode in the EFI ResetSystem call.
Quirk this hardware to use the ACPI reboot method instead.

Example stack trace:

----[ Xen-4.11-unstable  x86_64  debug=n   Not tainted ]----
CPU:    0
RIP:    e008:[<0000000000000017>] 0000000000000017
RFLAGS: 0000000000010202   CONTEXT: hypervisor
rax: 0000000066eb2ff0   rbx: ffff83005f627c20   rcx: 000000006c54e100
rdx: 0000000000000000   rsi: 0000000000000065   rdi: 000000107355f000
rbp: ffff83005f627c70   rsp: ffff83005f627b48   r8:  ffff83005f627b90
r9:  0000000000000000   r10: ffff83005f627c88   r11: 0000000000000000
r12: 0000000000000000   r13: 0000000000000cf9   r14: 0000000000000065
r15: ffff830000000000   cr0: 0000000080050033   cr4: 00000000003526e0
cr3: 000000107355f000   cr2: ffffc90000cff000
fsb: 0000000000000000   gsb: ffff88019f600000   gss: 0000000000000000
ds: 0000   es: 0000   fs: 0000   gs: 0000   ss: e010   cs: e008
Xen code around <0000000000000017> (0000000000000017):
 f0 d8 dd 00 f0 54 ff 00 <f0> 50 dd 00 f0 d8 dd 00 f0 a5 fe 00 f0 87 e9 00
Xen stack trace from rsp=ffff83005f627b48:
   ffff83005f627b50 ffffffffffffffda 000000006c547aaa ffff82d000000001
   ffff83005f627bec 000000107355f000 000000006c546fb8 ffff83107ffe3240
   0000000000000000 0000000000000000 8000000000000002 0000000000000000
   000000006c546b95 000000006c54c700 ffff83005f627bdc ffff83005f627be8
   000000005f616000 ffff83005f627c20 0000000000000000 0000000000000cf9
   ffff820080350001 000000000000000b ffff82d080351eda 0000000000000000
   0000000000000000 0000000000000000 0000000000000000 000000005f616000
   0000000000000000 ffff82d08095ff60 ffff82d08095ff60 000000f100000000
   ffff82d080296097 000000000000e008 0000000000000000 ffff83005f627c88
   0000000000000000 00000000fffffffe ffff82d0802959d2 ffff82d0802959d2
   000000008095f300 000000005f627c9c 00000000000000f8 0000000000000000
   00000000000000f8 ffff82d080932c00 0000000000000000 ffff82d08095f7c8
   ffff82d080932c00 0000000000000000 0000000000000000 ffff82d080295a9b
   ffff83005f627d98 ffff82d0802361f3 ffff82d080932c00 0000000080000000
   ffff83005f627d98 ffff82d080279a19 ffff82d08095f02c ffff82d080000000
   0000000000000000 00000000000000fb 0000000000000000 00000071484e54f6
   ffff831073542098 ffff82d08093ac78 ffff831072befd30 0000000000000000
   0000000000000000 0000000000000000 0000000000000000 0000000000000000
   0000000000000000 ffff82d08034f185 ffff82d080949460 0000000000000000
   ffff82d08095f270 0000000000000008 ffff83107357ae20 0000007146ce4bd3
Xen call trace:
   [<0000000000000017>] 0000000000000017
   [<ffff82d080351eda>] efi_reset_system+0x5a/0x90
   [<ffff82d080296097>] smp_send_stop+0x97/0xa0
   [<ffff82d0802959d2>] machine_restart+0x212/0x2d0
   [<ffff82d0802959d2>] machine_restart+0x212/0x2d0
   [<ffff82d080295a9b>] shutdown.c#__machine_restart+0xb/0x10
   [<ffff82d0802361f3>] smp_call_function_interrupt+0x53/0x80
   [<ffff82d080279a19>] do_IRQ+0x259/0x660
   [<ffff82d08034f185>] common_interrupt+0x85/0x90
   [<ffff82d0802c6152>] mwait-idle.c#mwait_idle+0x242/0x390
   [<ffff82d08026b446>] domain.c#idle_loop+0x86/0xc0

****************************************
Panic on CPU 0:
FATAL TRAP: vector = 6 (invalid opcode)
****************************************

dmidecode info:

BIOS Information:
    Vendor: Dell Inc.
    Version: 1.2.11
    Release Date: 10/19/2017
    BIOS Revision: 1.2
System Information:
    Manufacturer: Dell Inc.
    Product Name: PowerEdge R740

Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>
---
 xen/arch/x86/shutdown.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/xen/arch/x86/shutdown.c b/xen/arch/x86/shutdown.c
index a350714..c709e13 100644
--- a/xen/arch/x86/shutdown.c
+++ b/xen/arch/x86/shutdown.c
@@ -511,6 +511,15 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = {
             DMI_MATCH(DMI_PRODUCT_NAME, "Latitude E6520"),
         },
     },
+    {    /* Handle problems with rebooting on Dell PowerEdge R740. */
+        .callback = override_reboot,
+        .driver_data = (void *)(long)BOOT_ACPI,
+        .ident = "Dell PowerEdge R740",
+        .matches = {
+            DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+            DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge R740"),
+        },
+    },
     { }
 };
 
-- 
2.9.5


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] x86/shutdown: Use ACPI reboot method for Dell PowerEdge R740
  2018-01-19 16:57 [PATCH] x86/shutdown: Use ACPI reboot method for Dell PowerEdge R740 Ross Lagerwall
@ 2018-01-22 12:29 ` Jan Beulich
  2018-01-23 16:05   ` Ross Lagerwall
  2018-01-24 12:56 ` Jan Beulich
  1 sibling, 1 reply; 5+ messages in thread
From: Jan Beulich @ 2018-01-22 12:29 UTC (permalink / raw)
  To: Ross Lagerwall; +Cc: Andrew Cooper, xen-devel

>>> On 19.01.18 at 17:57, <ross.lagerwall@citrix.com> wrote:
> --- a/xen/arch/x86/shutdown.c
> +++ b/xen/arch/x86/shutdown.c
> @@ -511,6 +511,15 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = {
>              DMI_MATCH(DMI_PRODUCT_NAME, "Latitude E6520"),
>          },
>      },
> +    {    /* Handle problems with rebooting on Dell PowerEdge R740. */
> +        .callback = override_reboot,
> +        .driver_data = (void *)(long)BOOT_ACPI,
> +        .ident = "Dell PowerEdge R740",
> +        .matches = {
> +            DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
> +            DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge R740"),
> +        },
> +    },

Judging from the description you don't really want or need to
override the reboot method if not running under EFI, or if there
was an override on the command line already. override_reboot(),
however, overrides everything and under all circumstances. I
therefore think you may want to introduce a new callback
function.

As an aside - how come the page at address zero is actually
mapped at the time of the reboot attempt?

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] x86/shutdown: Use ACPI reboot method for Dell PowerEdge R740
  2018-01-22 12:29 ` Jan Beulich
@ 2018-01-23 16:05   ` Ross Lagerwall
  2018-01-24 12:22     ` Ross Lagerwall
  0 siblings, 1 reply; 5+ messages in thread
From: Ross Lagerwall @ 2018-01-23 16:05 UTC (permalink / raw)
  To: Jan Beulich; +Cc: Andrew Cooper, xen-devel

On 01/22/2018 12:29 PM, Jan Beulich wrote:
>>>> On 19.01.18 at 17:57, <ross.lagerwall@citrix.com> wrote:
>> --- a/xen/arch/x86/shutdown.c
>> +++ b/xen/arch/x86/shutdown.c
>> @@ -511,6 +511,15 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = {
>>               DMI_MATCH(DMI_PRODUCT_NAME, "Latitude E6520"),
>>           },
>>       },
>> +    {    /* Handle problems with rebooting on Dell PowerEdge R740. */
>> +        .callback = override_reboot,
>> +        .driver_data = (void *)(long)BOOT_ACPI,
>> +        .ident = "Dell PowerEdge R740",
>> +        .matches = {
>> +            DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
>> +            DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge R740"),
>> +        },
>> +    },
> 
> Judging from the description you don't really want or need to
> override the reboot method if not running under EFI, or if there
> was an override on the command line already. override_reboot(),
> however, overrides everything and under all circumstances. I
> therefore think you may want to introduce a new callback
> function.

Agreed, it should only apply when running under EFI. Note that the 
command-line takes priority over override_reboot() -- see the note at 
the start of reboot_init().

> 
> As an aside - how come the page at address zero is actually
> mapped at the time of the reboot attempt?
> 

No idea...

-- 
Ross Lagerwall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] x86/shutdown: Use ACPI reboot method for Dell PowerEdge R740
  2018-01-23 16:05   ` Ross Lagerwall
@ 2018-01-24 12:22     ` Ross Lagerwall
  0 siblings, 0 replies; 5+ messages in thread
From: Ross Lagerwall @ 2018-01-24 12:22 UTC (permalink / raw)
  To: Jan Beulich; +Cc: Andrew Cooper, xen-devel

On 01/23/2018 04:05 PM, Ross Lagerwall wrote:
> On 01/22/2018 12:29 PM, Jan Beulich wrote:
>>>>> On 19.01.18 at 17:57, <ross.lagerwall@citrix.com> wrote:
>>> --- a/xen/arch/x86/shutdown.c
>>> +++ b/xen/arch/x86/shutdown.c
>>> @@ -511,6 +511,15 @@ static struct dmi_system_id __initdata 
>>> reboot_dmi_table[] = {
>>>               DMI_MATCH(DMI_PRODUCT_NAME, "Latitude E6520"),
>>>           },
>>>       },
>>> +    {    /* Handle problems with rebooting on Dell PowerEdge R740. */
>>> +        .callback = override_reboot,
>>> +        .driver_data = (void *)(long)BOOT_ACPI,
>>> +        .ident = "Dell PowerEdge R740",
>>> +        .matches = {
>>> +            DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
>>> +            DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge R740"),
>>> +        },
>>> +    },
>>
>> Judging from the description you don't really want or need to
>> override the reboot method if not running under EFI, or if there
>> was an override on the command line already. override_reboot(),
>> however, overrides everything and under all circumstances. I
>> therefore think you may want to introduce a new callback
>> function.
> 
> Agreed, it should only apply when running under EFI. Note that the 
> command-line takes priority over override_reboot() -- see the note at 
> the start of reboot_init().
> 

Actually, now that I think about it, this quirk would have no effect 
when not running under EFI since in either case, the quirk uses 
BOOT_ACPI unless acpi_disabled is set in which case it uses BOOT_KBD. 
This matches what default_reboot_type() does. So I think this patch is 
fine and no further changes are needed unless I'm missing something?

Thanks,
-- 
Ross Lagerwall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] x86/shutdown: Use ACPI reboot method for Dell PowerEdge R740
  2018-01-19 16:57 [PATCH] x86/shutdown: Use ACPI reboot method for Dell PowerEdge R740 Ross Lagerwall
  2018-01-22 12:29 ` Jan Beulich
@ 2018-01-24 12:56 ` Jan Beulich
  1 sibling, 0 replies; 5+ messages in thread
From: Jan Beulich @ 2018-01-24 12:56 UTC (permalink / raw)
  To: Ross Lagerwall; +Cc: Andrew Cooper, xen-devel

>>> On 19.01.18 at 17:57, <ross.lagerwall@citrix.com> wrote:
> When EFI booting the Dell PowerEdge R740, it consistently wanders into the
> weeds and gets an invalid opcode in the EFI ResetSystem call.
> Quirk this hardware to use the ACPI reboot method instead.
> 
> Example stack trace:
> 
> ----[ Xen-4.11-unstable  x86_64  debug=n   Not tainted ]----
> CPU:    0
> RIP:    e008:[<0000000000000017>] 0000000000000017
> RFLAGS: 0000000000010202   CONTEXT: hypervisor
> rax: 0000000066eb2ff0   rbx: ffff83005f627c20   rcx: 000000006c54e100
> rdx: 0000000000000000   rsi: 0000000000000065   rdi: 000000107355f000
> rbp: ffff83005f627c70   rsp: ffff83005f627b48   r8:  ffff83005f627b90
> r9:  0000000000000000   r10: ffff83005f627c88   r11: 0000000000000000
> r12: 0000000000000000   r13: 0000000000000cf9   r14: 0000000000000065
> r15: ffff830000000000   cr0: 0000000080050033   cr4: 00000000003526e0
> cr3: 000000107355f000   cr2: ffffc90000cff000
> fsb: 0000000000000000   gsb: ffff88019f600000   gss: 0000000000000000
> ds: 0000   es: 0000   fs: 0000   gs: 0000   ss: e010   cs: e008
> Xen code around <0000000000000017> (0000000000000017):
>  f0 d8 dd 00 f0 54 ff 00 <f0> 50 dd 00 f0 d8 dd 00 f0 a5 fe 00 f0 87 e9 00
> Xen stack trace from rsp=ffff83005f627b48:
>    ffff83005f627b50 ffffffffffffffda 000000006c547aaa ffff82d000000001
>    ffff83005f627bec 000000107355f000 000000006c546fb8 ffff83107ffe3240
>    0000000000000000 0000000000000000 8000000000000002 0000000000000000
>    000000006c546b95 000000006c54c700 ffff83005f627bdc ffff83005f627be8
>    000000005f616000 ffff83005f627c20 0000000000000000 0000000000000cf9
>    ffff820080350001 000000000000000b ffff82d080351eda 0000000000000000
>    0000000000000000 0000000000000000 0000000000000000 000000005f616000
>    0000000000000000 ffff82d08095ff60 ffff82d08095ff60 000000f100000000
>    ffff82d080296097 000000000000e008 0000000000000000 ffff83005f627c88
>    0000000000000000 00000000fffffffe ffff82d0802959d2 ffff82d0802959d2
>    000000008095f300 000000005f627c9c 00000000000000f8 0000000000000000
>    00000000000000f8 ffff82d080932c00 0000000000000000 ffff82d08095f7c8
>    ffff82d080932c00 0000000000000000 0000000000000000 ffff82d080295a9b
>    ffff83005f627d98 ffff82d0802361f3 ffff82d080932c00 0000000080000000
>    ffff83005f627d98 ffff82d080279a19 ffff82d08095f02c ffff82d080000000
>    0000000000000000 00000000000000fb 0000000000000000 00000071484e54f6
>    ffff831073542098 ffff82d08093ac78 ffff831072befd30 0000000000000000
>    0000000000000000 0000000000000000 0000000000000000 0000000000000000
>    0000000000000000 ffff82d08034f185 ffff82d080949460 0000000000000000
>    ffff82d08095f270 0000000000000008 ffff83107357ae20 0000007146ce4bd3
> Xen call trace:
>    [<0000000000000017>] 0000000000000017
>    [<ffff82d080351eda>] efi_reset_system+0x5a/0x90
>    [<ffff82d080296097>] smp_send_stop+0x97/0xa0
>    [<ffff82d0802959d2>] machine_restart+0x212/0x2d0
>    [<ffff82d0802959d2>] machine_restart+0x212/0x2d0
>    [<ffff82d080295a9b>] shutdown.c#__machine_restart+0xb/0x10
>    [<ffff82d0802361f3>] smp_call_function_interrupt+0x53/0x80
>    [<ffff82d080279a19>] do_IRQ+0x259/0x660
>    [<ffff82d08034f185>] common_interrupt+0x85/0x90
>    [<ffff82d0802c6152>] mwait-idle.c#mwait_idle+0x242/0x390
>    [<ffff82d08026b446>] domain.c#idle_loop+0x86/0xc0
> 
> ****************************************
> Panic on CPU 0:
> FATAL TRAP: vector = 6 (invalid opcode)
> ****************************************
> 
> dmidecode info:
> 
> BIOS Information:
>     Vendor: Dell Inc.
>     Version: 1.2.11
>     Release Date: 10/19/2017
>     BIOS Revision: 1.2
> System Information:
>     Manufacturer: Dell Inc.
>     Product Name: PowerEdge R740
> 
> Signed-off-by: Ross Lagerwall <ross.lagerwall@citrix.com>

Taking into account your subsequent argumentation
Acked-by: Jan Beulich <jbeulich@suse.com>

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2018-01-24 12:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-19 16:57 [PATCH] x86/shutdown: Use ACPI reboot method for Dell PowerEdge R740 Ross Lagerwall
2018-01-22 12:29 ` Jan Beulich
2018-01-23 16:05   ` Ross Lagerwall
2018-01-24 12:22     ` Ross Lagerwall
2018-01-24 12:56 ` Jan Beulich

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.