Bug 241467 - bhyve crashes after import ACPICA 20191018
Summary: bhyve crashes after import ACPICA 20191018
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bhyve (show other bugs)
Version: CURRENT
Hardware: amd64 Any
: --- Affects Many People
Assignee: Jung-uk Kim
URL:
Keywords:
: 241399 (view as bug list)
Depends on:
Blocks:
 
Reported: 2019-10-24 13:14 UTC by Aleksandr Fedorov
Modified: 2019-10-24 22:38 UTC (History)
6 users (show)

See Also:


Attachments
Broken ACPI file (1.27 KB, text/plain)
2019-10-24 13:14 UTC, Aleksandr Fedorov
no flags Details
Fix MADT (765 bytes, patch)
2019-10-24 13:51 UTC, Jung-uk Kim
no flags Details | Diff
After 1 patch (715 bytes, text/plain)
2019-10-24 14:51 UTC, Aleksandr Fedorov
no flags Details
Fix MADT, HPET and MCFG (2.06 KB, patch)
2019-10-24 20:25 UTC, Jung-uk Kim
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Aleksandr Fedorov freebsd_committer freebsd_triage 2019-10-24 13:14:41 UTC
Created attachment 208566 [details]
Broken ACPI file

I try to run bhyve on CURRENT r354005 revision and observe the following crash (setenv BHYVE_ACPI_KEEPTMPS 1 & setenv BHYVE_ACPI_VERBOSE_IASL 1):

Loading kernel...
/boot/kernel/kernel text=0x16db63c data=0x1c5878+0x74d158 syms=[0x8+0x181da0+0x8+0x19e780]
Loading configured modules...
/boot/entropy size=0x1000
-
Intel ACPI Component Architecture
ASL+ Optimizing Compiler/Disassembler version 20191018
Copyright (c) 2000 - 2019 Intel Corporation

Table Input:   /tmp/bhyve.airmMK2 -     286 bytes      9 fields       12 source lines
                                                                                                                                                                                                                      Binary Output: /tmp/bhyve.RTQcA9D.aml -      36 bytes
Compilation successful. 0 Errors, 0 Warnings, 0 Remarks

Intel ACPI Component Architecture
ASL+ Optimizing Compiler/Disassembler version 20191018                                                                                                                                                                           Copyright (c) 2000 - 2019 Intel Corporation
                                                                                                                                                                                                                      Table Input:   /tmp/bhyve.jz82gGa -     460 bytes      9 fields       17 source lines
Binary Output: /tmp/bhyve.tAeYCDa.aml -      52 bytes
Compilation successful. 0 Errors, 0 Warnings, 0 Remarks

                                                                                                                                                                           Intel ACPI Component Architecture
ASL+ Optimizing Compiler/Disassembler version 20191018
Copyright (c) 2000 - 2019 Intel Corporation
Table Input:   /tmp/bhyve.F0mo6Fj -     492 bytes      9 fields       17 source lines
Binary Output: /tmp/bhyve.93IG24I.aml -      68 bytes
Compilation successful. 0 Errors, 0 Warnings, 0 Remarks


Intel ACPI Component Architecture
ASL+ Optimizing Compiler/Disassembler version 20191018
Copyright (c) 2000 - 2019 Intel Corporation
                                                                                                                                                      /tmp/bhyve.mlMzmgN     53: [0001]                ProcessorId : FF
                                                                                                                                                                                                                        Error    6313 -    Invalid field label detected ^  (found "ProcessorId" expected "Processor ID")
/tmp/bhyve.mlMzmgN     57: [0001]            Interrupt : 01
Error    6313 -  Invalid field label detected ^  (found "Interrupt" expected "Interrupt Input LINT")

                                                                                                                                                                                                                                         Table Input:   /tmp/bhyve.mlMzmgN -    1298 bytes     48 fields       58 source lines
Binary Output: /tmp/bhyve.xdijIVH.aml -      90 bytes
Compilation failed. 2 Errors, 0 Warnings, 0 Remarks
                                                                                                                                                                                          Assertion failed: (error == 0), function main, file /afedorov/vstack-develop-freebsd/usr.sbin/bhyve/bhyverun.c, line 1200.
Abort trap (core dumped)

So, as you can see iasl can't compile /tmp/bhyve.mlMzmgN (see attachment).

This bugreport may duplicate #241399
Comment 1 Jung-uk Kim freebsd_committer freebsd_triage 2019-10-24 13:51:02 UTC
Created attachment 208568 [details]
Fix MADT

Please try this patch.
Comment 2 Jung-uk Kim freebsd_committer freebsd_triage 2019-10-24 13:58:48 UTC
*** Bug 241399 has been marked as a duplicate of this bug. ***
Comment 3 Jung-uk Kim freebsd_committer freebsd_triage 2019-10-24 14:03:16 UTC
I'll take it.
Comment 4 Aleksandr Fedorov freebsd_committer freebsd_triage 2019-10-24 14:51:46 UTC
Created attachment 208570 [details]
After 1 patch
Comment 5 Aleksandr Fedorov freebsd_committer freebsd_triage 2019-10-24 14:52:19 UTC
(In reply to Jung-uk Kim from comment #3)

With proposed patch:

ASL+ Optimizing Compiler/Disassembler version 20191018
Copyright (c) 2000 - 2019 Intel Corporation
/tmp/bhyve.zIZAhVa     14: [0004]              Timer Block ID : 80860701
Error    6313 -       Invalid field label detected ^  (found "Timer Block ID" expected "Hardware Block ID")
/tmp/bhyve.zIZAhVa     22: [0001]           HPET Number : 00
Error    6313 -    Invalid field label detected ^  (found "HPET Number" expected "Sequence Number")
Table Input:   /tmp/bhyve.zIZAhVa -     715 bytes     21 fields       27 source lines
Binary Output: /tmp/bhyve.ZqsZTSs.aml -      56 bytes

Compilation failed. 2 Errors, 0 Warnings, 0 Remarks
Assertion failed: (error == 0), function main, file /afedorov/vstack-develop-freebsd/usr.sbin/bhyve/bhyverun.c, line 1200.
Abort trap (core dumped)
Comment 6 John Baldwin freebsd_committer freebsd_triage 2019-10-24 16:14:01 UTC
BTW, can we give some feedback to upstream that gratuitous changes to the ASL accepted by iasl are disruptive?  I understand that in these cases it's not the standard-defined ASL for DSDT/SSDT, but it's the format used by alternate tables like MADT, etc.  However, it would be good to let them know that changing that isn't "free".
Comment 7 Jung-uk Kim freebsd_committer freebsd_triage 2019-10-24 20:25:57 UTC
Created attachment 208584 [details]
Fix MADT, HPET and MCFG

Please try this version.
Comment 8 commit-hook freebsd_committer freebsd_triage 2019-10-24 22:34:35 UTC
A commit references this bug:

Author: jkim
Date: Thu Oct 24 22:33:47 UTC 2019
New revision: 354056
URL: https://svnweb.freebsd.org/changeset/base/354056

Log:
  Catch up with ACPICA 20191018.

  PR:		241467
  XMFC with:	r353764

Changes:
  head/usr.sbin/bhyve/acpi.c
  head/usr.sbin/bhyve/pci_emul.c
Comment 9 Jung-uk Kim freebsd_committer freebsd_triage 2019-10-24 22:36:08 UTC
It should be fixed with r354056.  If you still have issues, please let me know.
Comment 10 Jung-uk Kim freebsd_committer freebsd_triage 2019-10-24 22:38:28 UTC
(In reply to John Baldwin from comment #6)
I will let them know.