Skip to contentSkip to conversation

x86: Use ACPI reboot method for Dell OptiPlex 9020

PATCH In review Ross Lagerwall 3 participants 6 messages Dec 14, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x86: Use ACPI reboot method for Dell OptiPlex 9020

When EFI booting the Dell OptiPlex 9020, it sometimes GP faults in the EFI runtime instead of rebooting. Quirk this hardware to use the ACPI reboot method instead.

dmidecode info:

BIOS Information
Vendor: Dell Inc.
Version: A15
Release Date: 11/08/2015
System Information
Manufacturer: Dell Inc.
Product Name: OptiPlex 9020
Version: 00

---
 xen/arch/x86/shutdown.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)
xen/arch/x86/shutdown.c +13 -0
index 55f6840..3d669d1 100644
@@ -128,11 +128,15 @@ static int __init override_reboot(struct dmi_system_id *d)
 {
     enum reboot_type type = (long)d->driver_data;
 
+    if ( type == BOOT_ACPI && acpi_disabled )
+        type = BOOT_KBD;
+
     if ( reboot_type != type )
     {
         static const char *__initdata msg[] =
         {
             [BOOT_KBD]  = "keyboard controller",
+            [BOOT_ACPI] = "ACPI",
             [BOOT_CF9]  = "PCI",
         };
 
@@ -438,6 +442,15 @@ static struct dmi_system_id __initdata reboot_dmi_table[] = {
             DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 390"),
         },
     },
+    {    /* Handle problems with rebooting on Dell OptiPlex 9020. */
+        .callback = override_reboot,
+        .driver_data = (void *)(long)BOOT_ACPI,
+        .ident = "Dell OptiPlex 9020",
+        .matches = {
+            DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."),
+            DMI_MATCH(DMI_PRODUCT_NAME, "OptiPlex 9020"),
+        },
+    },
     {    /* Handle problems with rebooting on the Latitude E6320. */
         .callback = override_reboot,
         .driver_data = (void *)(long)BOOT_CF9,
Signature · 7 lines
2.7.4


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Reviewed-by on v1 1/1
#1 lore raw
Quoted 15 lines · Ross Lagerwall

When EFI booting the Dell OptiPlex 9020, it sometimes GP faults in the EFI runtime instead of rebooting. Quirk this hardware to use the ACPI reboot method instead.

dmidecode info:

BIOS Information
Vendor: Dell Inc.
Version: A15
Release Date: 11/08/2015
System Information
Manufacturer: Dell Inc.
Product Name: OptiPlex 9020
Version: 00

Quoted 1 line

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#2 lore raw
In reply to Ross Lagerwall
Quoted 3 lines
Quoted 1 line
Quoted 1 line · On 14.12.16 at 12:12, <[email protected]> wrote:

When EFI booting the Dell OptiPlex 9020, it sometimes GP faults in the EFI runtime instead of rebooting.

Has it been understood what the #GP is due to? I.e. is it namely not because of a mis-aligned SSE instruction memory reference?

Jan

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#3 lore raw
Quoted 5 lines · Jan Beulich
Quoted 3 lines
Quoted 1 line
Quoted 1 line · On 14.12.16 at 12:12, <[email protected]> wrote:

When EFI booting the Dell OptiPlex 9020, it sometimes GP faults in the EFI runtime instead of rebooting.

Has it been understood what the #GP is due to? I.e. is it namely not because of a mis-aligned SSE instruction memory reference?

(XEN) [  349.551011] Hardware Dom0 shutdown: rebooting machine
(XEN) [  349.553668] APIC error on CPU0: 40(00)
(XEN) [  349.553675] ----[ Xen-4.7.0-xs128737-d  x86_64  debug=y  Not tainted ]----
(XEN) [  349.553676] CPU:    0
(XEN) [  349.553677] RIP:    e008:[<00000000db7aa368>] 00000000db7aa368
(XEN) [  349.553678] RFLAGS: 0000000000010246   CONTEXT: hypervisor
(XEN) [  349.553680] rax: 00000000d48595e0   rbx: 0000000000000000   rcx: 000000005a5a5a5a
(XEN) [  349.553681] rdx: 0000000000001830   rsi: 0000000000000000   rdi: ffff8300ded37bb8
(XEN) [  349.553682] rbp: 0000000000000021   rsp: ffff8300ded37b68   r8:  0000000000000000
(XEN) [  349.553682] r9:  0000000000000001   r10: 0000000000000004   r11: 0000000000000200
(XEN) [  349.553683] r12: 0000000000000000   r13: 0000000000001830   r14: 0000000000000065
(XEN) [  349.553684] r15: 0000000000000010   cr0: 0000000080050033   cr4: 00000000001526e0
(XEN) [  349.553685] cr3: 000000040df7c000   cr2: 00007f7186aa1a40
(XEN) [  349.553686] ds: 002b   es: 002b   fs: 0000   gs: 0000   ss: e010   cs: e008
(XEN) [  349.553687] Xen code around <00000000db7aa368> (00000000db7aa368):
(XEN) [  349.553688]  08 00 00 b9 5a 5a 5a 5a <ff> 50 18 48 8b d8 48 83 f8 1f 74 0f 48 8b 15 dd
(XEN) [  349.553692] Xen stack trace from rsp=ffff8300ded37b68:
(XEN) [  349.553693]    00000700ded37bb8 0000000080022023 ffff83041b92b914 ffff83041b800000
(XEN) [  349.553694]    0000000000000000 00000000db79f348 0000000000000000 0000000000000000
(XEN) [  349.553696]    0000000000000000 0000000000000000 000000000000000d 00000000db7ff870
(XEN) [  349.553697]    0000000000000000 0000000000000000 0000005162b3bf76 0000000000000000
(XEN) [  349.553698]    00007cff212c83e7 ffff82d080244f57 0000000000000010 00000000db7fe671
(XEN) [  349.553699]    ffff8300ded37c38 0000000000000206 00000000ded28000 0000000000000000
(XEN) [  349.553701]    0000000000000000 00000000db7e0311 0000000000000000 0000000000000000
(XEN) [  349.553702]    0000000000000000 000000000000080f 0000000000000000 0000000000000000
(XEN) [  349.553703]    000000040df7c000 ffff82d080101242 00000000ded28000 ffff8300ded37ca8
(XEN) [  349.553704]    ffff82d080352b00 ffff8300ded37ca0 0000000000000000 00000000fffffffe
(XEN) [  349.553706]    ffff8300ded37cf8 ffff82d0801956e7 ffff8300ded37cd0 0000000000000046
(XEN) [  349.553707]    00008300dee1d000 0000000000000000 0000000000000000 ffff8300ded37dd8
(XEN) [  349.553709]    00000000000000fb 0000005162b3bf76 ffff8300ded37d08 ffff82d080195785
(XEN) [  349.553710]    ffff8300ded37d28 ffff82d080137482 0000000000000016 0000000000000000
(XEN) [  349.553711]    ffff8300ded37d38 ffff82d080195de7 ffff8300ded37dc8 ffff82d08017532c
(XEN) [  349.553713]    0000000000000000 0000000000000000 0000000000000000 0000000000000000
(XEN) [  349.553714]    ffff83040df78c50 ffff8300ded97000 80000000dee1d000 0000000000000000
(XEN) [  349.553715]    0000000000000000 ffff83040defc000 ffff8300ded37dc0 0000005162dd573d
(XEN) [  349.553717]    ffff83040df77010 ffff83040df770e8 0000005162b3bf76 0000000000000010
(XEN) [  349.553718]    00007cff212c8207 ffff82d080244f57 0000000000000010 0000005162b3bf76
(XEN) [  349.553720] Xen call trace:
(XEN) [  349.553721]    [<00000000db7aa368>] 00000000db7aa368
(XEN) [  349.553721] 
(XEN) [  349.553722] 
(XEN) [  349.553723] ****************************************
(XEN) [  349.553723] Panic on CPU 0:
(XEN) [  349.553724] GENERAL PROTECTION FAULT
(XEN) [  349.553724] [error_code=0000]
(XEN) [  349.553725] ****************************************
(XEN) [  349.553725] 
(XEN) [  349.553726] Reboot in five seconds...
(XEN) [  349.553727] Executing kexec image on cpu0
(XEN) [  349.553728] Shot down all CPUs

This is caused by callq *0x18(%rax)

The only #GP fault to be have is if the end of that pointer is non-canonical.

~Andrew

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#4 lore raw
Quoted 88 lines
Quoted 1 line
Quoted 1 line · On 14.12.16 at 14:15, <[email protected]> wrote:
Quoted 5 lines · Jan Beulich
Quoted 3 lines
Quoted 1 line
Quoted 1 line · On 14.12.16 at 12:12, <[email protected]> wrote:

When EFI booting the Dell OptiPlex 9020, it sometimes GP faults in the EFI runtime instead of rebooting.

Has it been understood what the #GP is due to? I.e. is it namely not because of a mis-aligned SSE instruction memory reference?

(XEN) [  349.551011] Hardware Dom0 shutdown: rebooting machine
(XEN) [  349.553668] APIC error on CPU0: 40(00)
(XEN) [  349.553675] ----[ Xen-4.7.0-xs128737-d  x86_64  debug=y  Not tainted ]----
(XEN) [  349.553676] CPU:    0
(XEN) [  349.553677] RIP:    e008:[<00000000db7aa368>] 00000000db7aa368
(XEN) [  349.553678] RFLAGS: 0000000000010246   CONTEXT: hypervisor
(XEN) [  349.553680] rax: 00000000d48595e0   rbx: 0000000000000000   rcx: 

000000005a5a5a5a
(XEN) [ 349.553681] rdx: 0000000000001830 rsi: 0000000000000000 rdi:
ffff8300ded37bb8
(XEN) [ 349.553682] rbp: 0000000000000021 rsp: ffff8300ded37b68 r8:
0000000000000000
(XEN) [ 349.553682] r9: 0000000000000001 r10: 0000000000000004 r11:
0000000000000200
(XEN) [ 349.553683] r12: 0000000000000000 r13: 0000000000001830 r14:
0000000000000065
(XEN) [ 349.553684] r15: 0000000000000010 cr0: 0000000080050033 cr4:
00000000001526e0
(XEN) [ 349.553685] cr3: 000000040df7c000 cr2: 00007f7186aa1a40
(XEN) [ 349.553686] ds: 002b es: 002b fs: 0000 gs: 0000 ss: e010
cs: e008
(XEN) [ 349.553687] Xen code around <00000000db7aa368> (00000000db7aa368):
(XEN) [ 349.553688] 08 00 00 b9 5a 5a 5a 5a <ff> 50 18 48 8b d8 48 83 f8 1f 74 0f 48 8b 15 dd
(XEN) [ 349.553692] Xen stack trace from rsp=ffff8300ded37b68:
(XEN) [ 349.553693] 00000700ded37bb8 0000000080022023 ffff83041b92b914
ffff83041b800000
(XEN) [ 349.553694] 0000000000000000 00000000db79f348 0000000000000000
0000000000000000
(XEN) [ 349.553696] 0000000000000000 0000000000000000 000000000000000d
00000000db7ff870
(XEN) [ 349.553697] 0000000000000000 0000000000000000 0000005162b3bf76
0000000000000000
(XEN) [ 349.553698] 00007cff212c83e7 ffff82d080244f57 0000000000000010
00000000db7fe671
(XEN) [ 349.553699] ffff8300ded37c38 0000000000000206 00000000ded28000
0000000000000000
(XEN) [ 349.553701] 0000000000000000 00000000db7e0311 0000000000000000
0000000000000000
(XEN) [ 349.553702] 0000000000000000 000000000000080f 0000000000000000
0000000000000000
(XEN) [ 349.553703] 000000040df7c000 ffff82d080101242 00000000ded28000
ffff8300ded37ca8
(XEN) [ 349.553704] ffff82d080352b00 ffff8300ded37ca0 0000000000000000
00000000fffffffe
(XEN) [ 349.553706] ffff8300ded37cf8 ffff82d0801956e7 ffff8300ded37cd0
0000000000000046
(XEN) [ 349.553707] 00008300dee1d000 0000000000000000 0000000000000000
ffff8300ded37dd8
(XEN) [ 349.553709] 00000000000000fb 0000005162b3bf76 ffff8300ded37d08
ffff82d080195785
(XEN) [ 349.553710] ffff8300ded37d28 ffff82d080137482 0000000000000016
0000000000000000
(XEN) [ 349.553711] ffff8300ded37d38 ffff82d080195de7 ffff8300ded37dc8
ffff82d08017532c
(XEN) [ 349.553713] 0000000000000000 0000000000000000 0000000000000000
0000000000000000
(XEN) [ 349.553714] ffff83040df78c50 ffff8300ded97000 80000000dee1d000
0000000000000000
(XEN) [ 349.553715] 0000000000000000 ffff83040defc000 ffff8300ded37dc0
0000005162dd573d
(XEN) [ 349.553717] ffff83040df77010 ffff83040df770e8 0000005162b3bf76
0000000000000010
(XEN) [ 349.553718] 00007cff212c8207 ffff82d080244f57 0000000000000010
0000005162b3bf76

(XEN) [  349.553720] Xen call trace:
(XEN) [  349.553721]    [<00000000db7aa368>] 00000000db7aa368
(XEN) [  349.553721] 
(XEN) [  349.553722] 
(XEN) [  349.553723] ****************************************
(XEN) [  349.553723] Panic on CPU 0:
(XEN) [  349.553724] GENERAL PROTECTION FAULT
(XEN) [  349.553724] [error_code=0000]
(XEN) [  349.553725] ****************************************
(XEN) [  349.553725] 
(XEN) [  349.553726] Reboot in five seconds...
(XEN) [  349.553727] Executing kexec image on cpu0
(XEN) [  349.553728] Shot down all CPUs
Quoted 4 lines

This is caused by callq *0x18(%rax)

The only #GP fault to be have is if the end of that pointer is non-canonical.

Thanks for clarifying - I'm fine with the patch then.

Jan

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel

#5 lore raw
Quoted 87 lines · Jan Beulich
Quoted 87 lines
Quoted 1 line
Quoted 1 line · On 14.12.16 at 14:15, <[email protected]> wrote:
Quoted 5 lines · Jan Beulich
Quoted 3 lines
Quoted 1 line
Quoted 1 line · On 14.12.16 at 12:12, <[email protected]> wrote:

When EFI booting the Dell OptiPlex 9020, it sometimes GP faults in the EFI runtime instead of rebooting.

Has it been understood what the #GP is due to? I.e. is it namely not because of a mis-aligned SSE instruction memory reference?

(XEN) [  349.551011] Hardware Dom0 shutdown: rebooting machine
(XEN) [  349.553668] APIC error on CPU0: 40(00)
(XEN) [  349.553675] ----[ Xen-4.7.0-xs128737-d  x86_64  debug=y  Not tainted ]----
(XEN) [  349.553676] CPU:    0
(XEN) [  349.553677] RIP:    e008:[<00000000db7aa368>] 00000000db7aa368
(XEN) [  349.553678] RFLAGS: 0000000000010246   CONTEXT: hypervisor
(XEN) [  349.553680] rax: 00000000d48595e0   rbx: 0000000000000000   rcx: 

000000005a5a5a5a
(XEN) [ 349.553681] rdx: 0000000000001830 rsi: 0000000000000000 rdi:
ffff8300ded37bb8
(XEN) [ 349.553682] rbp: 0000000000000021 rsp: ffff8300ded37b68 r8:
0000000000000000
(XEN) [ 349.553682] r9: 0000000000000001 r10: 0000000000000004 r11:
0000000000000200
(XEN) [ 349.553683] r12: 0000000000000000 r13: 0000000000001830 r14:
0000000000000065
(XEN) [ 349.553684] r15: 0000000000000010 cr0: 0000000080050033 cr4:
00000000001526e0
(XEN) [ 349.553685] cr3: 000000040df7c000 cr2: 00007f7186aa1a40
(XEN) [ 349.553686] ds: 002b es: 002b fs: 0000 gs: 0000 ss: e010
cs: e008
(XEN) [ 349.553687] Xen code around <00000000db7aa368> (00000000db7aa368):
(XEN) [ 349.553688] 08 00 00 b9 5a 5a 5a 5a <ff> 50 18 48 8b d8 48 83 f8 1f 74 0f 48 8b 15 dd
(XEN) [ 349.553692] Xen stack trace from rsp=ffff8300ded37b68:
(XEN) [ 349.553693] 00000700ded37bb8 0000000080022023 ffff83041b92b914
ffff83041b800000
(XEN) [ 349.553694] 0000000000000000 00000000db79f348 0000000000000000
0000000000000000
(XEN) [ 349.553696] 0000000000000000 0000000000000000 000000000000000d
00000000db7ff870
(XEN) [ 349.553697] 0000000000000000 0000000000000000 0000005162b3bf76
0000000000000000
(XEN) [ 349.553698] 00007cff212c83e7 ffff82d080244f57 0000000000000010
00000000db7fe671
(XEN) [ 349.553699] ffff8300ded37c38 0000000000000206 00000000ded28000
0000000000000000
(XEN) [ 349.553701] 0000000000000000 00000000db7e0311 0000000000000000
0000000000000000
(XEN) [ 349.553702] 0000000000000000 000000000000080f 0000000000000000
0000000000000000
(XEN) [ 349.553703] 000000040df7c000 ffff82d080101242 00000000ded28000
ffff8300ded37ca8
(XEN) [ 349.553704] ffff82d080352b00 ffff8300ded37ca0 0000000000000000
00000000fffffffe
(XEN) [ 349.553706] ffff8300ded37cf8 ffff82d0801956e7 ffff8300ded37cd0
0000000000000046
(XEN) [ 349.553707] 00008300dee1d000 0000000000000000 0000000000000000
ffff8300ded37dd8
(XEN) [ 349.553709] 00000000000000fb 0000005162b3bf76 ffff8300ded37d08
ffff82d080195785
(XEN) [ 349.553710] ffff8300ded37d28 ffff82d080137482 0000000000000016
0000000000000000
(XEN) [ 349.553711] ffff8300ded37d38 ffff82d080195de7 ffff8300ded37dc8
ffff82d08017532c
(XEN) [ 349.553713] 0000000000000000 0000000000000000 0000000000000000
0000000000000000
(XEN) [ 349.553714] ffff83040df78c50 ffff8300ded97000 80000000dee1d000
0000000000000000
(XEN) [ 349.553715] 0000000000000000 ffff83040defc000 ffff8300ded37dc0
0000005162dd573d
(XEN) [ 349.553717] ffff83040df77010 ffff83040df770e8 0000005162b3bf76
0000000000000010
(XEN) [ 349.553718] 00007cff212c8207 ffff82d080244f57 0000000000000010
0000005162b3bf76

(XEN) [  349.553720] Xen call trace:
(XEN) [  349.553721]    [<00000000db7aa368>] 00000000db7aa368
(XEN) [  349.553721] 
(XEN) [  349.553722] 
(XEN) [  349.553723] ****************************************
(XEN) [  349.553723] Panic on CPU 0:
(XEN) [  349.553724] GENERAL PROTECTION FAULT
(XEN) [  349.553724] [error_code=0000]
(XEN) [  349.553725] ****************************************
(XEN) [  349.553725] 
(XEN) [  349.553726] Reboot in five seconds...
(XEN) [  349.553727] Executing kexec image on cpu0
(XEN) [  349.553728] Shot down all CPUs
Quoted 5 lines
Quoted 4 lines

This is caused by callq *0x18(%rax)

The only #GP fault to be have is if the end of that pointer is non-canonical.

Thanks for clarifying - I'm fine with the patch then.

Ok - I will queue it.

~Andrew

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel