Re: How to run acrn on my Intel PC?


Jacky Lau
 

The dmesg output is in the attached file.

I can't generate an XML file of my board, because /sys/firmware/acpi/tables/DMAR is missing in my system:

jacky@acrn:~/acrn-work/acrn-hypervisor/misc/acrn-config/target$ sudo python3 board_parser.py my-board
Traceback (most recent call last):
  File "board_parser.py", line 129, in <module>
    acpi.generate_info(BOARD_INFO)
  File "/home/jacky/acrn-work/acrn-hypervisor/misc/acrn-config/target/acpi.py", line 655, in generate_info
    gen_acpi_info(config)
  File "/home/jacky/acrn-work/acrn-hypervisor/misc/acrn-config/target/acpi.py", line 625, in gen_acpi_info
    dmar.write_dmar_data(SYS_PATH[1] + 'DMAR', config)
  File "/home/jacky/acrn-work/acrn-hypervisor/misc/acrn-config/target/dmar.py", line 358, in write_dmar_data
    (dmar_tbl, dmar_hw_list, dmar_dev_list, drhd_cnt) = walk_dmar_table(
  File "/home/jacky/acrn-work/acrn-hypervisor/misc/acrn-config/target/dmar.py", line 310, in walk_dmar_table
    data = open(sysnode, 'rb').read()
FileNotFoundError: [Errno 2] No such file or directory: '/sys/firmware/acpi/tables/DMAR'

Is this information essential?

Geoffroy Van Cutsem <geoffroy.vancutsem@...> 于2021年1月26日周二 下午7:08写道:

Hi!

 

Can you send the dmesg output when booting up a regular kernel. This error seems to indicate a problem with the bios.

 

It would also be worthwhile running the board information script that we have in order to fine-tune ACRN to your particular system. There is a script that collects all relevant info and generate an XML file with such as this one https://github.com/projectacrn/acrn-hypervisor/blob/master/misc/vm_configs/xmls/board-xmls/nuc7i7dnb.xml. Instruction on how to run this can be found here https://projectacrn.github.io/latest/tutorials/acrn_configuration_tool.html#board-and-vm-configuration-workflow.

 

We should then rebuild ACRN using this board XML file. The general instructions on the workflow and how to use these tools can be found here: https://projectacrn.github.io/latest/tutorials/acrn_configuration_tool.html

 

Note that the configuration tool is being re-architected so the process/workflow will change in the future.

 

Geoffroy

 

From: acrn-users@... <acrn-users@...> On Behalf Of Jacky Lau
Sent: Tuesday, January 26, 2021 11:43 AM
To: acrn-users@...
Subject: Re: [acrn-users] How to run acrn on my Intel PC?

 

Hi, Geoffroy.

I upgrade the BIOS to the latest version which was released in 2018, and disable Windows 8.1/10 WHQL Support and Windows 7 Installation support in BIOS setting.

I changed vm config file, set CONFIG_PLATFORM_RAM_SIZE and CONFIG_SOS_RAM_SIZE to 0x200000000, set CONFIG_UOS_RAM_SIZE to 0x100000000:

jacky@acrn:~/acrn-work/acrn-hypervisor$ cat build/hypervisor/.config
CONFIG_SCENARIO="industry"
CONFIG_MULTIBOOT2=y
# CONFIG_SCHED_NOOP is not set
# CONFIG_SCHED_IORR is not set
CONFIG_SCHED_BVT=y
CONFIG_BOARD="nuc7i7dnb"
CONFIG_RELEASE=y
CONFIG_MAX_EMULATED_MMIO_REGIONS=16
CONFIG_MAX_PT_IRQ_ENTRIES=64
CONFIG_STACK_SIZE=0x2000
CONFIG_LOG_BUF_SIZE=0x40000
CONFIG_LOG_DESTINATION=7
CONFIG_LOW_RAM_SIZE=0x00010000
CONFIG_HV_RAM_START=0x11000000
CONFIG_HV_RAM_SIZE=0x14800000
CONFIG_PLATFORM_RAM_SIZE=0x200000000
CONFIG_SOS_RAM_SIZE=0x200000000
CONFIG_UOS_RAM_SIZE=0x100000000
CONFIG_ACPI_PARSE_ENABLED=y
CONFIG_HYPERV_ENABLED=y
# CONFIG_RDT_ENABLED is not set
# CONFIG_PSRAM_ENABLED is not set
CONFIG_GPU_SBDF=0x00000010
CONFIG_RELOC=y
CONFIG_MAX_IOAPIC_NUM=1
CONFIG_MAX_IOAPIC_LINES=120
CONFIG_MAX_IR_ENTRIES=256
CONFIG_IOMMU_BUS_NUM=0x100
CONFIG_MAX_PCI_DEV_NUM=96
CONFIG_MAX_MSIX_TABLE_NUM=64
# CONFIG_L1D_FLUSH_VMENTRY_ENABLED is not set
# CONFIG_MCE_ON_PSC_WORKAROUND_DISABLED is not set
CONFIG_ENFORCE_TURNOFF_AC=y
# CONFIG_IVSHMEM_ENABLED is not set

 

After rebuilt and update /boot/acrn/acrn.bin, I can saw debug output from serial console:

Multiboot2 Bootloader: GRUB 2.04-1ubuntu26.7
ACRN Hypervisor
calibrate_tsc, tsc_khz=3900000
[11857166us][cpu=0][(null)][sev=2][seq=1]:HV version 2.3-2021-01-26 18:21:47-cfc3017a-dirty DBG (daily tag:acrn-2020w48.5-180000p) industry@nuc7i7dnb build by jacky, start time 11847871us
[11875864us][cpu=0][(null)][sev=2][seq=2]:API version 1.0
[11881807us][cpu=0][(null)][sev=2][seq=3]:Detect processor: Intel(R) Core(TM) i3-7100 CPU @ 3.90GHz
[11891833us][cpu=0][(null)][sev=1][seq=4]:SECURITY WARNING!!!!!!
[11898428us][cpu=0][(null)][sev=1][seq=5]:Please apply the latest CPU uCode patch!
[11907126us][cpu=0][(null)][sev=2][seq=6]:Assertion failed in file acpi_parser/dmar_parse.c,line 171 : fatal error
[11918587us][cpu=0][(null)][sev=2][seq=7]:
 delta = (actual_load_address - CONFIG_HV_RAM_START) = 0x0

[11929298us][cpu=0][(null)][sev=2][seq=8]:
Host Stack: CPU_ID = 0

[11936469us][cpu=0][(null)][sev=2][seq=9]:addr(0x1120ab60)      0x0000000000000000  0x0000000000000000  0x0000000000000001  0x0000000000000000

[11950583us][cpu=0][(null)][sev=2][seq=10]:addr(0x1120ab80)     0x000000001120abe0  0x00000000110119b0  0x000000001104fd40  0x00000000188ab600

[11964783us][cpu=0][(null)][sev=2][seq=11]:addr(0x1120aba0)     0x00000000000000e1  0x000000001100bf80  0x00000000000000fc  0x0000000000000440

[11979009us][cpu=0][(null)][sev=2][seq=12]:addr(0x1120abc0)     0x0000000000000000  0x0000000000000001  0x0000000000000000  0x0000000072dda0a0

[11993226us][cpu=0][(null)][sev=2][seq=13]:addr(0x1120abe0)     0x000000001120ac20  0x000000001100d56d  0x0000000000000001  0x0000000000000440

[12007390us][cpu=0][(null)][sev=2][seq=14]:addr(0x1120ac00)     0x0000000000000000  0x0000000000000001  0x0000000000000000  0x0000000072dda0a0

[12021617us][cpu=0][(null)][sev=2][seq=15]:addr(0x1120ac20)     0x000000001120ac50  0x00000000110092b1  0x0000000000000000  0x0000000000000000

[12035834us][cpu=0][(null)][sev=2][seq=16]:addr(0x1120ac40)     0x0000000000000000  0x00000000826cef44  0x000000001120ac70  0x00000000110081e8                                              
                                                                                                                                                                                             
[12050069us][cpu=0][(null)][sev=2][seq=17]:addr(0x1120ac60)     0x00000000110010e2  0x0000000072f38a70  0x0000000011057570  0x00000000696e746c                                              
                                                                                                                                                                                             
[12064261us][cpu=0][(null)][sev=2][seq=18]:addr(0x1120ac80)     0x0000000000000000  0x0000000000000000  0x0000000100000000  0x0000000000000000                                              
                                                                                                                                                                                             
[12078480us][cpu=0][(null)][sev=2][seq=19]:addr(0x1120aca0)     0x0000000000000000  0x0000000000000000  0x0000000000000000  0x0000000000000000                                              

[12092697us][cpu=0][(null)][sev=2][seq=20]:addr(0x1120acc0)     0x0000000000000000  0x0000000000000000  0x0000000000000000  0x0000000000000000

[12106966us][cpu=0][(null)][sev=2][seq=21]:addr(0x1120ace0)     0x0000000000000000  0x0000000000000000  0x0000000000000000  0x0000000000000000

[12121149us][cpu=0][(null)][sev=2][seq=22]:addr(0x1120ad00)     0x0000000000000000  0x0000000000000000  0x0000000000000000  0x0000000000000000

[12135315us][cpu=0][(null)][sev=2][seq=23]:addr(0x1120ad20)     0x0000000000000000  0x0000000000000000  0x0000000000000000  0x0000000000000000

[12149540us][cpu=0][(null)][sev=2][seq=24]:addr(0x1120ad40)     0x0000000000000000  0x0000000000000000  0x0000000000000000  0x0000000000000000

[12163722us][cpu=0][(null)][sev=2][seq=25]:

[12168507us][cpu=0][(null)][sev=2][seq=26]:Host Call Trace:

[12174894us][cpu=0][(null)][sev=2][seq=27]:----> 0x00000000110119b0

[12182063us][cpu=0][(null)][sev=2][seq=28]:----> 0x000000001100d56d

[12189189us][cpu=0][(null)][sev=2][seq=29]:----> 0x00000000110092b1

[12196357us][cpu=0][(null)][sev=2][seq=30]:----> 0x00000000110081e8

[12203527us][cpu=0][(null)][sev=2][seq=31]:

 

It seems that somethings is wrong. :(

 

Geoffroy Van Cutsem <geoffroy.vancutsem@...> 2021122日周五 上午1:32写道:

Thanks Jacky. We’ll be limited in what we can try as I assume you do not have a serial port on that platform, do you? This would be the most efficient way to debug this as it’s the only output for debug info from the hypervisor at that point.

 

But we can verify and try a couple of things still:

* Make sure you have VT (Intel Virtualization) enabled in your bios

* Disable secure boot in your bios

 

I see your bios is from 2017. I would also recommend to upgrade to the latest version if there is a newer one.

 

The pre-defined config we have is for 16GB of memory, we may need to change that to 8GB and rebuild it. There is some information on how to configure ACRN for a specific platform here: https://projectacrn.github.io/latest/tutorials/acrn_configuration_tool.html (note: we’re in the process of changing that tool but this is valid for the 2.3 release that you are using).

 

Thanks!
Geoffroy

 

From: acrn-users@... <acrn-users@...> On Behalf Of Jacky Lau
Sent: Thursday, January 21, 2021 3:34 PM
To: acrn-users@...
Subject: Re: [acrn-users] How to run acrn on my Intel PC?

 

There are 8G DRAM(4Gx2) installed on my computer.

 

Jacky Lau <i90091e@...> 2021121日周四 下午10:28写道:

Thank you, Geoffroy.

 

I rebuild acrn-hypervisor using "make BOARD=nuc7i7dnb SCENARIO=industry", install to /boot/acrn.

After reboot, the screen show "loading ACRN..." and nothing happens, my computer just hang.

 

I'm using ubuntu 20.04, the kernel version is 5.4.0-64-generic, and I built release_v2.3 branch of acrn-hypervisor and acrn-kernel.

This is part of lshw output on my system:

acrn                 
    description: Desktop Computer
    product: MS-7A69 (Default string)
    vendor: MSI
    version: 1.0
    serial: Default string
    width: 64 bits
    capabilities: smbios-3.0.0 dmi-3.0.0 smp vsyscall32
    configuration: boot=normal chassis=desktop family=Default string sku=Default string uuid=00000000-0000-0000-0000-309C231D2897
  *-core
       description: Motherboard
       product: B250M MORTAR (MS-7A69)
       vendor: MSI
       physical id: 0
       version: 1.0
       serial: H616541189
       slot: Default string
     *-firmware
          description: BIOS
          vendor: American Megatrends Inc.
          physical id: 0
          version: 2.40
          date: 11/17/2017
          size: 64KiB
          capacity: 16MiB
          capabilities: pci upgrade shadowing cdboot bootselect socketedrom edd int13floppy1200 int13floppy720 int13floppy2880 int5printscreen int9keyboard int14serial int17printer acpi usb biosbootspecification uefi
     *-memory
          description: System Memory
          physical id: 3c
          slot: System board or motherboard
          size: 8GiB
        *-bank:0
             description: [empty]
             physical id: 0
             slot: ChannelA-DIMM0
        *-bank:1
             description: DIMM DDR4 Synchronous Unbuffered (Unregistered) 2400 MHz (0.4 ns)

 

Geoffroy Van Cutsem <geoffroy.vancutsem@...> 2021121日周四 下午9:02写道:

Hi!

 

You may need to “port” it to your hardware. But in general, this is a Kaby Lake processor and we already use that on the NUCs so we may be able to get this to work without too much effort (famous last words… 😉)

 

Can you describe in more details what happens after you’ve followed all the instructions in the Getting Started Guide? Any logs/errors that you see on the screen?

 

One thing I would already do as well is switch to the industrial scenario, that is the one we have focused most of our efforts on over the last year (since the 1.0 release). So I’d recommend building ACRN using “make BOARD=nuc7i7dnb SCENARIO=industry”.

 

Give us more information about your system too, e.g.:
* Memory installed

* ACRN and kernel version you are using

And anything else you believe may be relevant.

 

Thanks,

Geoffroy

 

 

 

From: acrn-users@... <acrn-users@...> On Behalf Of Jacky Lau
Sent: Thursday, January 21, 2021 1:43 PM
To: acrn-users@...
Subject: [acrn-users] How to run acrn on my Intel PC?

 

Hi, all.

I have a PC which have Intel i3-7100 CPU and MSI B250M MORTAR main board.

I want to run acrn on my PC, I follow acrn Getting Started document, and build the SDC scenario on the nuc7i7dnb (make all BOARD_FILE=$PWD/misc/vm_configs/xmls/board-xmls/nuc7i7dnb.xml SCENARIO_FILE=$PWD/misc/vm_configs/xmls/config-xmls/nuc7i7dnb/sdc.xml), but acrn can't boot to SOS (ubuntu 20.04).

I want to know how to run acrn on my PC? Do I need to port it to my hardware?

 

Regards

Join acrn-users@lists.projectacrn.org to automatically receive all group messages.