Date   

Re: Running ACRN in Virtualbox on NUC7i7DNH?

Geoffroy Van Cutsem
 

Hi Lonnie,

 

I have never heard of anyone attempting to boot ACRN in a VirtualBox VM… do let us know if you and have any success there! 😉

 

One other path you could take is to QEMU on Windows and follow this tutorial: https://projectacrn.github.io/latest/tutorials/acrn_on_qemu.html. I don’t have any experience with QEMU on Windows, but assuming it only does the emulation piece, you’d probably also want to use the HAXM driver to expose VT-x (https://github.com/intel/haxm).

 

Unfortunately, I don’t have any Windows machine other than my official IT machine… and I don’t think my IT department would be too thrilled if I was to try this on it 😊

 

Cheers,

Geoffroy

 

 

 

From: acrn-users@... <acrn-users@...> On Behalf Of Lonnie Cumberland
Sent: Sunday, February 7, 2021 2:18 PM
To: acrn-users@...
Subject: [acrn-users] Running ACRN in Virtualbox on NUC7i7DNH?

 

Hi All,

 

I am running my new NUC7i7DNHE that has Windows 10 on it and have installed VirtualBox so that I can use it as a build platform for ACRN in some VM's.

 

I am wondering if anyone has been able to install and boot up ACRN in a VirtualBox VM with Clear Linux or other?

 

I have been using these dated ACRN videos as guides while trying to replicate just a basic install and boot up of ACRN to see it in action before wiping my NUC and working from that pathway.

 

 

--- ACRN Getting Started and Demo

 

 

--- Info on ACRN design 

 

Basically, I would just like to see it run locally, in a VM if possible, before digging heavier into it.

 

Cheers,

Lonnie

 


Running ACRN in Virtualbox on NUC7i7DNH?

Lonnie Cumberland <lonnie@...>
 

Hi All,

I am running my new NUC7i7DNHE that has Windows 10 on it and have installed VirtualBox so that I can use it as a build platform for ACRN in some VM's.

I am wondering if anyone has been able to install and boot up ACRN in a VirtualBox VM with Clear Linux or other?

I have been using these dated ACRN videos as guides while trying to replicate just a basic install and boot up of ACRN to see it in action before wiping my NUC and working from that pathway.


--- ACRN Getting Started and Demo


--- Info on ACRN design 

Basically, I would just like to see it run locally, in a VM if possible, before digging heavier into it.

Cheers,
Lonnie


Re: Can't enable uart for Ubuntu SOS

Liu, Fuzhong
 

Hi zhangshuai

Could you please try "make install" instead of copy the grubx64.efi?

It works for my setup:
root@acrn-OptiPlex-9010:/home/acrn/work/grub-2.04# make install
root@acrn-OptiPlex-9010:/home/acrn/work/grub-2.04# grub-install -V
grub-install (GRUB) 2.02-2ubuntu8.17
root@acrn-OptiPlex-9010:/home/acrn/work/grub-2.04# reboot
root@acrn-OptiPlex-9010:/home/acrn# grub-install -V
grub-install (GRUB) 2.04


BR.
Fuzhong

-----Original Message-----
From: acrn-users@... <acrn-users@...> On Behalf Of "??????-?????-??
Sent: Thursday, February 4, 2021 5:27 PM
To: acrn-users@...
Cc: ligang@...; wumengkui@...; lijia@...; hujunke@...; hudongjiang@...
Subject: Re: [acrn-users] Can't enable uart for Ubuntu SOS

Hi Victor,
        update the grub2.05 according to this https://projectacrn.github.io/latest/tutorials/using_grub.html?#installing-self-built-grub,
copy the grubx64.efi to /boot/efi/EFI/ubuntu . But grub cannot boot ubuntu to startup. Is the file in the wrong place?


Thanks and Best Regards,
zhangshuai

--

Xi'an R&D Center Computerized Numerical Control R&D Dept. Shuai Zhang Tel : 029-84503040-8360
E-mail :zhangshuai@... Web :www.jingdiao.com


Re: Can't enable uart for Ubuntu SOS

Victor Sun
 

hi Shuai,

If you follows https://projectacrn.github.io/latest/tutorials/using_grub.html?#installing-self-built-grub

then you should not replace grubx64.efi to /boot/efi/EFI/ubuntu since grub-mkimge -p parameter is incorrect. Ubuntu GRUB is built with its own build script and parameters.

please put efi application to your "-p" specified folder, (maybe you can try "grub-mkimage -p /EFI/grub ..." to replace your Ubuntu grub efi but I am not sure it can work, depends on your ubuntu version.)


BR,

Victor

On 2/4/2021 5:27 PM, "西安研发中心-数控研发部-张帅 wrote:
Hi Victor,
        update the grub2.05 according to this https://projectacrn.github.io/latest/tutorials/using_grub.html?#installing-self-built-grub, copy the grubx64.efi to /boot/efi/EFI/ubuntu . But grub cannot boot ubuntu to startup. Is the file in the wrong place?


Thanks and Best Regards,
zhangshuai


Re: Can't enable uart for Ubuntu SOS

Geoffroy Van Cutsem
 

Hi Zhangshuai,

What is your version of Ubuntu? I'm running Ubuntu 20.04 on a machine and did not have to update Grub to install ACRN.

This is the right location, do you see the Grub menu at all after updating the Grub binary? If not, can you get to the EFI shell and manually start it from there? Make sure you have secure boot turned off in your bios as well.

Back to your question about the UART, can you also try to use the bdf info instead, i.e.:
# lspci | grep UART
00:18.0 . Series HSUART Controller #1 (rev 0b)
00:18.1 . Series HSUART Controller #2 (rev 0b)

Which translates into uart=bdf@00:18.1 (if you want to use the second one for example).

One last thing, make sure you have flow control (HW and SW) turned off in your serial port program (e.g. minicom).

Geoffroy

-----Original Message-----
From: acrn-users@... <acrn-users@...>
On Behalf Of "??????-?????-??
Sent: Thursday, February 4, 2021 10:27 AM
To: acrn-users@...
Cc: ligang@...; wumengkui@...; lijia@...;
hujunke@...; hudongjiang@...
Subject: Re: [acrn-users] Can't enable uart for Ubuntu SOS

Hi Victor,
        update the grub2.05 according to this
https://projectacrn.github.io/latest/tutorials/using_grub.html?#installing-
self-built-grub,
copy the grubx64.efi to /boot/efi/EFI/ubuntu . But grub cannot boot ubuntu
to startup. Is the file in the wrong place?


Thanks and Best Regards,
zhangshuai

--

Xi'an R&D Center Computerized Numerical Control R&D Dept. Shuai Zhang
Tel : 029-84503040-8360
E-mail :zhangshuai@... Web :www.jingdiao.com





Re: Can't enable uart for Ubuntu SOS

ZhangShuai
 

Hi Victor,
        update the grub2.05 according to this https://projectacrn.github.io/latest/tutorials/using_grub.html?#installing-self-built-grub, copy the grubx64.efi to /boot/efi/EFI/ubuntu . But grub cannot boot ubuntu to startup. Is the file in the wrong place?


Thanks and Best Regards,
zhangshuai

--

Xi'an R&D Center Computerized Numerical Control R&D Dept. Shuai Zhang
Tel : 029-84503040-8360
E-mail :zhangshuai@... Web :www.jingdiao.com


Re: Can't enable uart for Ubuntu SOS

ligang@jingdiao.com
 

张帅:
        后面在一些开源项目里面提问,可以把大家都抄送上。


ligang@...

 
From: Victor Sun
Date: 2021-02-04 10:37
Subject: Re: [acrn-users] Can't enable uart for Ubuntu SOS

Hi Shuai,

First of all, make sure your grub has below commit:

http://git.savannah.gnu.org/cgit/grub.git/commit/?id=0f3f5b7c13fa9b677a64cf11f20eca0f850a2b20 multiboot2: Set min address for mbi allocation to 0x1000

 

If the issue still occurs, please post your board file and scenario file.

 

BR,

Victor

 

From: acrn-users@... <acrn-users@...> On Behalf Of "西安研发中心-数控研发部-张帅
Sent: Thursday, February 4, 2021 10:26 AM
To: acrn-users@...
Subject: [acrn-users] Can't enable uart for Ubuntu SOS

 

Hello,
        We have a development board with i5-7300U and tried to install acrn sos. We generated the board and scenario xmls using ACRN Configuration Tool, builded the acrn Hypervisor with RELEASE=0. When boot into ubuntu-service-vm, the system got stuck with HDMI show "loading ACRN..."
        There is a serial port on the board, so we want to output the boot log. The setting of the uart is as fellows. The serial works ok when boot into the Ubuntu without acrn kernel(native boot?) ; but there is nothing output when boot into  ubuntu-service-vm.  Is this configuration correct? or should I do something else?

$ dmesg | grep tty
[   13.399735] dw-apb-uart.2: ttyS4 at MMIO 0xb151b000 (irq = 20, base_baud = 115200) is a 16550A
[   13.399769] printk: console [ttyS4] enabled

$ vi /etc/grub.d/40_custom
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
menuentry "ACRN Multiboot Ubuntu Service VM" --id ubuntu-service-vm {
  load_video
  insmod gzio
  insmod part_gpt
  insmod ext2

  search --no-floppy --fs-uuid --set 9efd748b-88fc-4082-b2f9-2e91b6e3dc07
  echo 'loading ACRN...'
  multiboot2 /boot/acrn/acrn.bin  root=PARTUUID="41d2eeec-fd7b-4479-9ae0-3a41845d25ff" uart=mmio@0xb151b000
  module2 /boot/bzImage Linux_bzImage
}


Best Regards
zhangshuai

 

------------------------- 
Xi'an R&D Center Computerized Numerical Control R&D Dept.  Shuai Zhang 
Tel : 029-84503040-8360 
E-mail :  zhangshuai@...     Web :  www.jingdiao.com


Re: Can't enable uart for Ubuntu SOS

Victor Sun
 

Hi Shuai,

First of all, make sure your grub has below commit:

http://git.savannah.gnu.org/cgit/grub.git/commit/?id=0f3f5b7c13fa9b677a64cf11f20eca0f850a2b20 multiboot2: Set min address for mbi allocation to 0x1000

 

If the issue still occurs, please post your board file and scenario file.

 

BR,

Victor

 

From: acrn-users@... <acrn-users@...> On Behalf Of "西安研发中心-数控研发部-张帅
Sent: Thursday, February 4, 2021 10:26 AM
To: acrn-users@...
Subject: [acrn-users] Can't enable uart for Ubuntu SOS

 

Hello,
        We have a development board with i5-7300U and tried to install acrn sos. We generated the board and scenario xmls using ACRN Configuration Tool, builded the acrn Hypervisor with RELEASE=0. When boot into ubuntu-service-vm, the system got stuck with HDMI show "loading ACRN..."
        There is a serial port on the board, so we want to output the boot log. The setting of the uart is as fellows. The serial works ok when boot into the Ubuntu without acrn kernel(native boot?) ; but there is nothing output when boot into  ubuntu-service-vm.  Is this configuration correct? or should I do something else?

$ dmesg | grep tty
[   13.399735] dw-apb-uart.2: ttyS4 at MMIO 0xb151b000 (irq = 20, base_baud = 115200) is a 16550A
[   13.399769] printk: console [ttyS4] enabled

$ vi /etc/grub.d/40_custom
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
menuentry "ACRN Multiboot Ubuntu Service VM" --id ubuntu-service-vm {
  load_video
  insmod gzio
  insmod part_gpt
  insmod ext2

  search --no-floppy --fs-uuid --set 9efd748b-88fc-4082-b2f9-2e91b6e3dc07
  echo 'loading ACRN...'
  multiboot2 /boot/acrn/acrn.bin  root=PARTUUID="41d2eeec-fd7b-4479-9ae0-3a41845d25ff" uart=mmio@0xb151b000
  module2 /boot/bzImage Linux_bzImage
}


Best Regards
zhangshuai

 

------------------------- 
Xi'an R&D Center Computerized Numerical Control R&D Dept.  Shuai Zhang 
Tel : 029-84503040-8360 
E-mail :  zhangshuai@...     Web :  www.jingdiao.com


Can't enable uart for Ubuntu SOS

ZhangShuai
 

Hello,
        We have a development board with i5-7300U and tried to install acrn sos. We generated the board and scenario xmls using ACRN Configuration Tool, builded the acrn Hypervisor with RELEASE=0. When boot into ubuntu-service-vm, the system got stuck with HDMI show "loading ACRN..."
        There is a serial port on the board, so we want to output the boot log. The setting of the uart is as fellows. The serial works ok when boot into the Ubuntu without acrn kernel(native boot?) ; but there is nothing output when boot into  ubuntu-service-vm.  Is this configuration correct? or should I do something else?

$ dmesg | grep tty
[   13.399735] dw-apb-uart.2: ttyS4 at MMIO 0xb151b000 (irq = 20, base_baud = 115200) is a 16550A
[   13.399769] printk: console [ttyS4] enabled

$ vi /etc/grub.d/40_custom
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
menuentry "ACRN Multiboot Ubuntu Service VM" --id ubuntu-service-vm {
  load_video
  insmod gzio
  insmod part_gpt
  insmod ext2

  search --no-floppy --fs-uuid --set 9efd748b-88fc-4082-b2f9-2e91b6e3dc07
  echo 'loading ACRN...'
  multiboot2 /boot/acrn/acrn.bin  root=PARTUUID="41d2eeec-fd7b-4479-9ae0-3a41845d25ff" uart=mmio@0xb151b000
  module2 /boot/bzImage Linux_bzImage
}


Best Regards
zhangshuai


------------------------- 
Xi'an R&D Center Computerized Numerical Control R&D Dept.  Shuai Zhang 
Tel : 029-84503040-8360 
E-mail :  zhangshuai@...     Web :  www.jingdiao.com


Re: GVT init failed when install windows

Geoffroy Van Cutsem
 

Fuzhong, do we have more details on this issue documented somewhere? Is there any plan to fix this?

Jacky, I assume the different content for the various screens will be coming from different VMs, is that correct? Do you have a need for 3D acceleration or can a remote display solution (e.g. VNC) meet your needs too?

Thanks,
Geoffroy

-----Original Message-----
From: acrn-users@... <acrn-users@...>
On Behalf Of Jacky Lau
Sent: Monday, February 1, 2021 2:06 PM
To: acrn-users@...
Subject: Re: [acrn-users] GVT init failed when install windows

Got it, thank you.

Liu, Fuzhong <fuzhong.liu@...> 于2021年2月1日周一 下午4:17写道


Hi Jacky
There is the known GVT-g issue after v2.0, please try v2.0 if you MUST use
GVT-g.

BR.
Fuzhong

-----Original Message-----
From: acrn-users@...
<acrn-users@...> On Behalf Of Jacky Lau
Sent: Thursday, January 28, 2021 10:31 PM
To: acrn-users@...
Subject: Re: [acrn-users] GVT init failed when install windows

Well, I'm using acrn v2.3, so I following this tutorial:
https://projectacrn.github.io/2.3/tutorials/using_windows_as_uos.html

I checked the code and fixed the gvt init failed issue by enlarged
PCI_EMUL_MEMLIMIT32.
The install_win.sh run successful. But nothing displayed on my hdmi
screen.
When I run install_win.sh, the kernel print messages:
[ 214.077918] IRQ 122: no longer affine to CPU1 [ 214.079031] smpboot:
CPU 1 is now offline [ 215.083296] vhm: try to offline cpu 1 with lapicid 2 [
215.110031] IRQ 120: no longer affine to CPU2 [ 215.112118] smpboot: CPU 2
is now offline [ 216.114476] vhm: try to offline cpu 2 with lapicid 1 [
216.130278] IRQ 124: no longer affine to CPU3 [ 216.131571] smpboot: CPU 3
is now offline [ 217.135012] vhm: try to offline cpu 3 with lapicid 3 [
217.190688] vhm_dev_open: opening device node [ 217.191180] vhm-ioreq:
init request buffer @ 00000000d5da3ebd!
[ 217.191184] vhm-ioreq: created ioreq client 1 for ioeventfd-1 [
217.191214] ACRN vhm ioeventfd init done!
[ 217.191222] ACRN vhm irqfd init done!
[ 217.191223] vhm: VM 1 created
[ 217.385657] vhm-ioreq: created ioreq client 2 for ioreq gvt-g [
217.387846] IPv6: ADDRCONF(NETDEV_CHANGE): tap0: link becomes ready
[
217.387871] acrn-br0: port 1(tap0) entered blocking state [
217.387873] acrn-br0: port 1(tap0) entered forwarding state [
217.475601] vhm-ioreq: created ioreq client 3 for acrndm [
217.563042] [drm] prepare GOP fb: 8100KB for 1920X1080@32 [
217.567443] [drm] Set up display w:1920 h:1080 for GOP [ 217.567456]
gvt: vgpu 1: pvinfo read gop: [78860:4] = df000000 [ 217.567758] gvt:
vgpu 1: pvinfo read gop: [78864:4] = 780 [ 217.567904] gvt: vgpu 1:
pvinfo read gop: [78868:4] = 438 [ 217.568049] gvt: vgpu 1: pvinfo
read gop: [7886c:4] = 780 [ 217.568194] gvt: vgpu 1: pvinfo read gop:
[78870:4] = 4 [ 217.568336] gvt: vgpu 1: pvinfo read gop: [78874:4] =
7e9000 [ 217.574251] [drm:intel_cpu_fifo_underrun_irq_handler]
*ERROR* CPU pipe A FIFO underrun [ 496.745805] [drm] hotplug can't be
supported in idv [ 497.781306] [drm] hotplug can't be supported in
idv [ 498.869303] [drm] hotplug can't be supported in idv

I must use GTV-g, as I need to display different content on different
screens.

Geoffroy Van Cutsem <geoffroy.vancutsem@...> 于2021年1月28
日周四
下午8:21写道:

Hi,

Were you following this tutorial when you hit this issue?
https://projectacrn.github.io/latest/tutorials/using_windows_as_uos.
ht
ml

We switched at some point and are now using GVT-d (direct
assignement) to run Windows as a Guest, and I believe there are some
known issues if trying to install Windows using GTV-g. Which version of ACRN
are you using?

Thanks,
Geoffroy

-----Original Message-----
From: acrn-users@...
<acrn-users@...>
On Behalf Of Jacky Lau
Sent: Thursday, January 28, 2021 10:03 AM
To: acrn-users@...
Subject: [acrn-users] GVT init failed when install windows

Hi, all.
After setup an ACRN Industry Scenario with Ubuntu Service VM, I
want to launch Windows as the Guest VM. But there are some issues
when I install windows.

1. Service VM boot time become very long when enable gvt:
...
[ 0.699211] Linux agpgart interface v0.103
[ 0.699424] vhm: initializing
[ 0.699427] vhm: hv api version 1.0
[ 0.699428] vhm: registered correctly with major number 243
[ 0.699431] vhm: device class registered correctly
[ 0.699457] register IPI handler
[ 0.699515] vhm: Virtio & Hypervisor service module initialized
[ 0.700422] i915 0000:00:02.0: Direct firmware load for
i915/gvt/vid_0x8086_did_0x5912_rid_0x04.golden_hw_state failed
with error -2
[ 0.700424] i915 0000:00:02.0: Falling back to sysfs fallback for:
i915/gvt/vid_0x8086_did_0x5912_rid_0x04.golden_hw_state
[ 1.458633] tsc: Refined TSC clocksource calibration: 3912.000 MHz
[ 1.458640] clocksource: tsc: mask: 0xffffffffffffffff max_cycles:
0x70c747804da, max_idle_ns: 881591211608 ns
[ 1.458656] clocksource: Switched to clocksource tsc
[ 62.531820] [drm] Supports vblank timestamp caching Rev 2
(21.10.2013).
[ 62.531821] [drm] Driver supports precise vblank timestamp query.
[ 62.532332] i915 0000:00:02.0: vgaarb: changed VGA decodes:
olddecodes=io+mem,decodes=io+mem:owns=io+mem
[ 62.532346] [drm] Skip DMC firmware loading in IDV
[ 62.532347] i915 0000:00:02.0: Failed to load DMC firmware
i915/kbl_dmc_ver1_04.bin. Disabling runtime power management.
[ 62.532348] i915 0000:00:02.0: DMC firmware homepage:
https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-
firmware.git/tree/i915
[ 62.532567] [drm] Disable FBC for direct display in IDV
[ 64.563004] [drm] Initialized i915 1.6.0 20191101 for 0000:00:02.0 on
minor 0
[ 64.565045] ACPI: Video Device [GFX0] (multi-head: yes rom: no post:
no)
[ 64.565372] input: Video Bus as
/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/input/inpu
t3
[ 64.568575] brd: module loaded
[ 64.570271] loop: module loaded
[ 64.570359] zram: Added device: zram0
[ 64.570457] mei_me 0000:00:16.0: enabling device (0000 -> 0002)
...

The kernel parameters of my Service VM is:
root=/dev/sda3 console=ttyS0 idle=halt rw rootwait console=tty0
consoleblank=0 no_timer_check quiet loglevel=3
i915.nuclear_pageflip=1
hvlog=2M@0xe00000 memmap=0x200000$0xe00000 maxcpus=4
root=PARTUUID=28259bf2-ab31-1048-a7b8-96cf62ef034f
intel_iommu=on
i915.enable_gvt=1 i915.enable_guc=0 i915.enable_inital_modeset=1
hugepagesz=1G hugepages=4

Full dmesg is in the attached file.

2. acrn-dm report "gvt pci bases are out of range" when init gvt:
jacky@acrn:~/acrn-work$ sudo ./install_win.sh
cpu1 online=0
cpu2 online=0
cpu3 online=0
passed gvt-g optargs low_gm 64, high_gm 448, fence 8
SW_LOAD: get ovmf path /usr/share/acrn/bios/OVMF.fd, size 0x200000
vm_create: win_vm1
VHM api version 1.0
vm_setup_memory: size=0x100000000
open hugetlbfs file
/run/hugepage/acrn/huge_lv1/win_vm1/D279543825D611E8864ECB7A18B34
643
open hugetlbfs file
/run/hugepage/acrn/huge_lv2/win_vm1/D279543825D611E8864ECB7A18B34
643
level 0 free/need pages:1/1 page size:0x200000 level 1 free/need
pages:4/4 page size:0x40000000

try to setup hugepage with:
level 0 - lowmem 0x0, biosmem 0x200000, highmem 0x0
level 1 - lowmem 0x80000000, biosmem 0x0, highmem
0x80000000 total_size 0x200000000

mmap ptr 0x0x7fd9e6fbf000 -> baseaddr 0x0x7fda00000000 mmap
0x80000000@0x7fda00000000 touch 2 pages with pagesz 0x40000000
mmap
0x80000000@0x7fdb40000000 touch 2 pages with pagesz 0x40000000
mmap
0x200000@0x7fdaffe00000 touch 1 pages with pagesz 0x200000

really setup hugepage with:
level 0 - lowmem 0x0, biosmem 0x200000, highmem 0x0
level 1 - lowmem 0x80000000, biosmem 0x0, highmem
0x80000000 vm_init_vdevs No correct pm notify channel given pci
init hostbridge pci init lpc pci init pci-gvt gvt pci bases are out of range
GVT: init failed
pci pci-gvt init
failed

polling 34...

Listening 34...

Stop listening 34...

Stop polling 34...

No
correct pm notify channel given


Unable to init vdev (2)

my install_win.sh script:
#!/bin/bash
# Copyright (C) 2019 Intel Corporation.
# SPDX-License-Identifier: BSD-3-Clause

function launch_win()
{
vm_name=win_vm$1

#check if the vm is running or not vm_ps=$(pgrep -a -f acrn-dm)
result=$(echo $vm_ps | grep "${vm_name}") if [[ "$result" != ""
]]; then echo "$vm_name is running, can't create twice!"
exit
fi

#for memsize setting
mem_size=4096M

acrn-dm -A -m $mem_size -s 0:0,hostbridge -s 1:0,lpc -l com1,stdio
\ -s 2,pci- gvt -G "$2" \ -s 3,virtio-blk,./win10-20h2.img \ -s
4,virtio-net,tap0 \ -s
6,xhci,1-7 \ -s 8,ahci,cd:./Windows.iso \ -s
9,ahci,cd:./virtio-win-0.1.190.iso \ --ovmf
/usr/share/acrn/bios/OVMF.fd \ --windows \ $vm_name }

# offline SOS CPUs except BSP before launch UOS for i in `ls -d
/sys/devices/system/cpu/cpu[1-99]`; do
online=`cat $i/online`
idx=`echo $i | tr -cd "[1-99]"`
echo cpu$idx online=$online
if [ "$online" = "1" ]; then
echo 0 > $i/online
# during boot time, cpu hotplug may be disabled by
pci_device_probe during a pci module insmod
while [ "$online" = "1" ]; do
sleep 1
echo 0 > $i/online
online=`cat $i/online`
done
echo $idx > /sys/class/vhm/acrn_vhm/offline_cpu
fi
done

launch_win 1 "64 448 8"


3. There are no mdev_supported_types file in the /sys filesystem
jacky@acrn:~/acrn-work$ lspci|grep -i vga
00:02.0 VGA compatible controller: Intel Corporation HD Graphics
630 (rev 04)

jacky@acrn:~/acrn-work$ ls -l
/sys/devices/pci0000\:00/0000\:00\:02.0/
total 0
-r--r--r-- 1 root root 4096 Jan 28 15:58 ari_enabled
-r--r--r-- 1 root root 4096 Jan 28 15:58 boot_vga
-rw-r--r-- 1 root root 4096 Jan 28 15:58 broken_parity_status
-r--r--r-- 1 root root 4096 Jan 28 15:58 class
-rw-r--r-- 1 root root 4096 Jan 28 15:58 config
-r--r--r-- 1 root root 4096 Jan 28 15:58 consistent_dma_mask_bits
-r--r--r-- 1 root root 4096 Jan 28 15:58 current_link_speed
-r--r--r-- 1 root root 4096 Jan 28 15:58 current_link_width
-rw-r--r-- 1 root root 4096 Jan 28 15:58 d3cold_allowed
-r--r--r-- 1 root root 4096 Jan 28 15:58 device
-r--r--r-- 1 root root 4096 Jan 28 15:58 dma_mask_bits
lrwxrwxrwx 1 root root 0 Jan 28 15:58 driver ->
../../../bus/pci/drivers/i915
-rw-r--r-- 1 root root 4096 Jan 28 15:58 driver_override
drwxr-xr-x 4 root root 0 Jan 28 15:58 drm
-rw-r--r-- 1 root root 4096 Jan 28 15:58 enable
lrwxrwxrwx 1 root root 0 Jan 28 15:58 firmware_node ->
../../LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00
drwxr-xr-x 3 root root 0 Jan 28 15:58 graphics
-r-------- 1 root root 2101304 Jan 28 15:58 gvt_firmware
drwxr-xr-x 4 root root 0 Jan 28 15:58 i2c-0
drwxr-xr-x 4 root root 0 Jan 28 15:58 i2c-1
drwxr-xr-x 4 root root 0 Jan 28 15:58 i2c-2
-r--r--r-- 1 root root 4096 Jan 28 15:58 index
-r--r--r-- 1 root root 4096 Jan 28 15:58 irq
-r--r--r-- 1 root root 4096 Jan 28 15:58 label
-r--r--r-- 1 root root 4096 Jan 28 15:58 local_cpulist
-r--r--r-- 1 root root 4096 Jan 28 15:58 local_cpus
-r--r--r-- 1 root root 4096 Jan 28 15:58 max_link_speed
-r--r--r-- 1 root root 4096 Jan 28 15:58 max_link_width
-r--r--r-- 1 root root 4096 Jan 28 15:58 modalias
-rw-r--r-- 1 root root 4096 Jan 28 15:58 msi_bus
drwxr-xr-x 2 root root 0 Jan 28 15:58 msi_irqs
drwxr-xr-x 2 root root 0 Jan 28 15:58 power
--w--w---- 1 root root 4096 Jan 28 15:58 remove
--w------- 1 root root 4096 Jan 28 15:58 rescan
--w------- 1 root root 4096 Jan 28 15:58 reset
-r--r--r-- 1 root root 4096 Jan 28 15:58 resource
-rw------- 1 root root 16777216 Jan 28 15:58 resource0
-rw------- 1 root root 268435456 Jan 28 15:58 resource2
-rw------- 1 root root 268435456 Jan 28 15:58 resource2_wc
-rw------- 1 root root 64 Jan 28 15:58 resource4
-r--r--r-- 1 root root 4096 Jan 28 15:58 revision
-rw------- 1 root root 131072 Jan 28 15:58 rom
lrwxrwxrwx 1 root root 0 Jan 28 15:58 subsystem -> ../../../bus/pci
-r--r--r-- 1 root root 4096 Jan 28 15:58 subsystem_device
-r--r--r-- 1 root root 4096 Jan 28 15:58 subsystem_vendor
-rw-r--r-- 1 root root 4096 Jan 28 15:58 uevent
-r--r--r-- 1 root root 4096 Jan 28 15:58 vendor

So, do I miss anything?


















Re: GVT init failed when install windows

Jacky Lau
 

Got it, thank you.

Liu, Fuzhong <fuzhong.liu@...> 于2021年2月1日周一 下午4:17写道:


Hi Jacky
There is the known GVT-g issue after v2.0, please try v2.0 if you MUST use GVT-g.

BR.
Fuzhong

-----Original Message-----
From: acrn-users@... <acrn-users@...> On Behalf Of Jacky Lau
Sent: Thursday, January 28, 2021 10:31 PM
To: acrn-users@...
Subject: Re: [acrn-users] GVT init failed when install windows

Well, I'm using acrn v2.3, so I following this tutorial:
https://projectacrn.github.io/2.3/tutorials/using_windows_as_uos.html

I checked the code and fixed the gvt init failed issue by enlarged PCI_EMUL_MEMLIMIT32.
The install_win.sh run successful. But nothing displayed on my hdmi screen.
When I run install_win.sh, the kernel print messages:
[ 214.077918] IRQ 122: no longer affine to CPU1 [ 214.079031] smpboot: CPU 1 is now offline [ 215.083296] vhm: try to offline cpu 1 with lapicid 2 [ 215.110031] IRQ 120: no longer affine to CPU2 [ 215.112118] smpboot: CPU 2 is now offline [ 216.114476] vhm: try to offline cpu 2 with lapicid 1 [ 216.130278] IRQ 124: no longer affine to CPU3 [ 216.131571] smpboot: CPU 3 is now offline [ 217.135012] vhm: try to offline cpu 3 with lapicid 3 [ 217.190688] vhm_dev_open: opening device node [ 217.191180] vhm-ioreq: init request buffer @ 00000000d5da3ebd!
[ 217.191184] vhm-ioreq: created ioreq client 1 for ioeventfd-1 [ 217.191214] ACRN vhm ioeventfd init done!
[ 217.191222] ACRN vhm irqfd init done!
[ 217.191223] vhm: VM 1 created
[ 217.385657] vhm-ioreq: created ioreq client 2 for ioreq gvt-g [ 217.387846] IPv6: ADDRCONF(NETDEV_CHANGE): tap0: link becomes ready [ 217.387871] acrn-br0: port 1(tap0) entered blocking state [ 217.387873] acrn-br0: port 1(tap0) entered forwarding state [ 217.475601] vhm-ioreq: created ioreq client 3 for acrndm [ 217.563042] [drm] prepare GOP fb: 8100KB for 1920X1080@32 [ 217.567443] [drm] Set up display w:1920 h:1080 for GOP [ 217.567456] gvt: vgpu 1: pvinfo read gop: [78860:4] = df000000 [ 217.567758] gvt: vgpu 1: pvinfo read gop: [78864:4] = 780 [ 217.567904] gvt: vgpu 1: pvinfo read gop: [78868:4] = 438 [ 217.568049] gvt: vgpu 1: pvinfo read gop: [7886c:4] = 780 [ 217.568194] gvt: vgpu 1: pvinfo read gop: [78870:4] = 4 [ 217.568336] gvt: vgpu 1: pvinfo read gop: [78874:4] = 7e9000 [ 217.574251] [drm:intel_cpu_fifo_underrun_irq_handler] *ERROR* CPU pipe A FIFO underrun [ 496.745805] [drm] hotplug can't be supported in idv [ 497.781306] [drm] hotplug can't be supported in idv [ 498.869303] [drm] hotplug can't be supported in idv

I must use GTV-g, as I need to display different content on different screens.

Geoffroy Van Cutsem <geoffroy.vancutsem@...> 于2021年1月28日周四 下午8:21写道:

Hi,

Were you following this tutorial when you hit this issue?
https://projectacrn.github.io/latest/tutorials/using_windows_as_uos.ht
ml

We switched at some point and are now using GVT-d (direct assignement) to run Windows as a Guest, and I believe there are some known issues if trying to install Windows using GTV-g. Which version of ACRN are you using?

Thanks,
Geoffroy

-----Original Message-----
From: acrn-users@...
<acrn-users@...>
On Behalf Of Jacky Lau
Sent: Thursday, January 28, 2021 10:03 AM
To: acrn-users@...
Subject: [acrn-users] GVT init failed when install windows

Hi, all.
After setup an ACRN Industry Scenario with Ubuntu Service VM, I want
to launch Windows as the Guest VM. But there are some issues when I
install windows.

1. Service VM boot time become very long when enable gvt:
...
[ 0.699211] Linux agpgart interface v0.103
[ 0.699424] vhm: initializing
[ 0.699427] vhm: hv api version 1.0
[ 0.699428] vhm: registered correctly with major number 243
[ 0.699431] vhm: device class registered correctly
[ 0.699457] register IPI handler
[ 0.699515] vhm: Virtio & Hypervisor service module initialized
[ 0.700422] i915 0000:00:02.0: Direct firmware load for
i915/gvt/vid_0x8086_did_0x5912_rid_0x04.golden_hw_state failed with
error -2
[ 0.700424] i915 0000:00:02.0: Falling back to sysfs fallback for:
i915/gvt/vid_0x8086_did_0x5912_rid_0x04.golden_hw_state
[ 1.458633] tsc: Refined TSC clocksource calibration: 3912.000 MHz
[ 1.458640] clocksource: tsc: mask: 0xffffffffffffffff max_cycles:
0x70c747804da, max_idle_ns: 881591211608 ns
[ 1.458656] clocksource: Switched to clocksource tsc
[ 62.531820] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 62.531821] [drm] Driver supports precise vblank timestamp query.
[ 62.532332] i915 0000:00:02.0: vgaarb: changed VGA decodes:
olddecodes=io+mem,decodes=io+mem:owns=io+mem
[ 62.532346] [drm] Skip DMC firmware loading in IDV
[ 62.532347] i915 0000:00:02.0: Failed to load DMC firmware
i915/kbl_dmc_ver1_04.bin. Disabling runtime power management.
[ 62.532348] i915 0000:00:02.0: DMC firmware homepage:
https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-
firmware.git/tree/i915
[ 62.532567] [drm] Disable FBC for direct display in IDV
[ 64.563004] [drm] Initialized i915 1.6.0 20191101 for 0000:00:02.0 on minor 0
[ 64.565045] ACPI: Video Device [GFX0] (multi-head: yes rom: no post: no)
[ 64.565372] input: Video Bus as
/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/input/inpu
t3
[ 64.568575] brd: module loaded
[ 64.570271] loop: module loaded
[ 64.570359] zram: Added device: zram0
[ 64.570457] mei_me 0000:00:16.0: enabling device (0000 -> 0002)
...

The kernel parameters of my Service VM is:
root=/dev/sda3 console=ttyS0 idle=halt rw rootwait console=tty0
consoleblank=0 no_timer_check quiet loglevel=3
i915.nuclear_pageflip=1
hvlog=2M@0xe00000 memmap=0x200000$0xe00000 maxcpus=4
root=PARTUUID=28259bf2-ab31-1048-a7b8-96cf62ef034f intel_iommu=on
i915.enable_gvt=1 i915.enable_guc=0 i915.enable_inital_modeset=1
hugepagesz=1G hugepages=4

Full dmesg is in the attached file.

2. acrn-dm report "gvt pci bases are out of range" when init gvt:
jacky@acrn:~/acrn-work$ sudo ./install_win.sh
cpu1 online=0
cpu2 online=0
cpu3 online=0
passed gvt-g optargs low_gm 64, high_gm 448, fence 8
SW_LOAD: get ovmf path /usr/share/acrn/bios/OVMF.fd, size 0x200000
vm_create: win_vm1
VHM api version 1.0
vm_setup_memory: size=0x100000000
open hugetlbfs file
/run/hugepage/acrn/huge_lv1/win_vm1/D279543825D611E8864ECB7A18B34
643
open hugetlbfs file
/run/hugepage/acrn/huge_lv2/win_vm1/D279543825D611E8864ECB7A18B34
643
level 0 free/need pages:1/1 page size:0x200000 level 1 free/need
pages:4/4 page size:0x40000000

try to setup hugepage with:
level 0 - lowmem 0x0, biosmem 0x200000, highmem 0x0
level 1 - lowmem 0x80000000, biosmem 0x0, highmem 0x80000000
total_size 0x200000000

mmap ptr 0x0x7fd9e6fbf000 -> baseaddr 0x0x7fda00000000 mmap
0x80000000@0x7fda00000000 touch 2 pages with pagesz 0x40000000 mmap
0x80000000@0x7fdb40000000 touch 2 pages with pagesz 0x40000000 mmap
0x200000@0x7fdaffe00000 touch 1 pages with pagesz 0x200000

really setup hugepage with:
level 0 - lowmem 0x0, biosmem 0x200000, highmem 0x0
level 1 - lowmem 0x80000000, biosmem 0x0, highmem 0x80000000
vm_init_vdevs No correct pm notify channel given pci init hostbridge
pci init lpc pci init pci-gvt gvt pci bases are out of range
GVT: init failed
pci pci-gvt init failed

polling 34...

Listening 34...

Stop listening 34...

Stop polling 34...

No
correct pm notify channel given


Unable to init vdev (2)

my install_win.sh script:
#!/bin/bash
# Copyright (C) 2019 Intel Corporation.
# SPDX-License-Identifier: BSD-3-Clause

function launch_win()
{
vm_name=win_vm$1

#check if the vm is running or not
vm_ps=$(pgrep -a -f acrn-dm)
result=$(echo $vm_ps | grep "${vm_name}") if [[ "$result" != "" ]];
then echo "$vm_name is running, can't create twice!"
exit
fi

#for memsize setting
mem_size=4096M

acrn-dm -A -m $mem_size -s 0:0,hostbridge -s 1:0,lpc -l com1,stdio \
-s 2,pci- gvt -G "$2" \ -s 3,virtio-blk,./win10-20h2.img \ -s
4,virtio-net,tap0 \ -s
6,xhci,1-7 \ -s 8,ahci,cd:./Windows.iso \ -s
9,ahci,cd:./virtio-win-0.1.190.iso \ --ovmf
/usr/share/acrn/bios/OVMF.fd \ --windows \ $vm_name }

# offline SOS CPUs except BSP before launch UOS for i in `ls -d
/sys/devices/system/cpu/cpu[1-99]`; do
online=`cat $i/online`
idx=`echo $i | tr -cd "[1-99]"`
echo cpu$idx online=$online
if [ "$online" = "1" ]; then
echo 0 > $i/online
# during boot time, cpu hotplug may be disabled by
pci_device_probe during a pci module insmod
while [ "$online" = "1" ]; do
sleep 1
echo 0 > $i/online
online=`cat $i/online`
done
echo $idx > /sys/class/vhm/acrn_vhm/offline_cpu
fi
done

launch_win 1 "64 448 8"


3. There are no mdev_supported_types file in the /sys filesystem
jacky@acrn:~/acrn-work$ lspci|grep -i vga
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 630
(rev 04)

jacky@acrn:~/acrn-work$ ls -l
/sys/devices/pci0000\:00/0000\:00\:02.0/
total 0
-r--r--r-- 1 root root 4096 Jan 28 15:58 ari_enabled
-r--r--r-- 1 root root 4096 Jan 28 15:58 boot_vga
-rw-r--r-- 1 root root 4096 Jan 28 15:58 broken_parity_status
-r--r--r-- 1 root root 4096 Jan 28 15:58 class
-rw-r--r-- 1 root root 4096 Jan 28 15:58 config
-r--r--r-- 1 root root 4096 Jan 28 15:58 consistent_dma_mask_bits
-r--r--r-- 1 root root 4096 Jan 28 15:58 current_link_speed
-r--r--r-- 1 root root 4096 Jan 28 15:58 current_link_width
-rw-r--r-- 1 root root 4096 Jan 28 15:58 d3cold_allowed
-r--r--r-- 1 root root 4096 Jan 28 15:58 device
-r--r--r-- 1 root root 4096 Jan 28 15:58 dma_mask_bits
lrwxrwxrwx 1 root root 0 Jan 28 15:58 driver ->
../../../bus/pci/drivers/i915
-rw-r--r-- 1 root root 4096 Jan 28 15:58 driver_override
drwxr-xr-x 4 root root 0 Jan 28 15:58 drm
-rw-r--r-- 1 root root 4096 Jan 28 15:58 enable
lrwxrwxrwx 1 root root 0 Jan 28 15:58 firmware_node ->
../../LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00
drwxr-xr-x 3 root root 0 Jan 28 15:58 graphics
-r-------- 1 root root 2101304 Jan 28 15:58 gvt_firmware
drwxr-xr-x 4 root root 0 Jan 28 15:58 i2c-0
drwxr-xr-x 4 root root 0 Jan 28 15:58 i2c-1
drwxr-xr-x 4 root root 0 Jan 28 15:58 i2c-2
-r--r--r-- 1 root root 4096 Jan 28 15:58 index
-r--r--r-- 1 root root 4096 Jan 28 15:58 irq
-r--r--r-- 1 root root 4096 Jan 28 15:58 label
-r--r--r-- 1 root root 4096 Jan 28 15:58 local_cpulist
-r--r--r-- 1 root root 4096 Jan 28 15:58 local_cpus
-r--r--r-- 1 root root 4096 Jan 28 15:58 max_link_speed
-r--r--r-- 1 root root 4096 Jan 28 15:58 max_link_width
-r--r--r-- 1 root root 4096 Jan 28 15:58 modalias
-rw-r--r-- 1 root root 4096 Jan 28 15:58 msi_bus
drwxr-xr-x 2 root root 0 Jan 28 15:58 msi_irqs
drwxr-xr-x 2 root root 0 Jan 28 15:58 power
--w--w---- 1 root root 4096 Jan 28 15:58 remove
--w------- 1 root root 4096 Jan 28 15:58 rescan
--w------- 1 root root 4096 Jan 28 15:58 reset
-r--r--r-- 1 root root 4096 Jan 28 15:58 resource
-rw------- 1 root root 16777216 Jan 28 15:58 resource0
-rw------- 1 root root 268435456 Jan 28 15:58 resource2
-rw------- 1 root root 268435456 Jan 28 15:58 resource2_wc
-rw------- 1 root root 64 Jan 28 15:58 resource4
-r--r--r-- 1 root root 4096 Jan 28 15:58 revision
-rw------- 1 root root 131072 Jan 28 15:58 rom
lrwxrwxrwx 1 root root 0 Jan 28 15:58 subsystem -> ../../../bus/pci
-r--r--r-- 1 root root 4096 Jan 28 15:58 subsystem_device
-r--r--r-- 1 root root 4096 Jan 28 15:58 subsystem_vendor
-rw-r--r-- 1 root root 4096 Jan 28 15:58 uevent
-r--r--r-- 1 root root 4096 Jan 28 15:58 vendor

So, do I miss anything?
















Re: GVT init failed when install windows

Liu, Fuzhong
 

Hi Jacky
There is the known GVT-g issue after v2.0, please try v2.0 if you MUST use GVT-g.

BR.
Fuzhong

-----Original Message-----
From: acrn-users@... <acrn-users@...> On Behalf Of Jacky Lau
Sent: Thursday, January 28, 2021 10:31 PM
To: acrn-users@...
Subject: Re: [acrn-users] GVT init failed when install windows

Well, I'm using acrn v2.3, so I following this tutorial:
https://projectacrn.github.io/2.3/tutorials/using_windows_as_uos.html

I checked the code and fixed the gvt init failed issue by enlarged PCI_EMUL_MEMLIMIT32.
The install_win.sh run successful. But nothing displayed on my hdmi screen.
When I run install_win.sh, the kernel print messages:
[ 214.077918] IRQ 122: no longer affine to CPU1 [ 214.079031] smpboot: CPU 1 is now offline [ 215.083296] vhm: try to offline cpu 1 with lapicid 2 [ 215.110031] IRQ 120: no longer affine to CPU2 [ 215.112118] smpboot: CPU 2 is now offline [ 216.114476] vhm: try to offline cpu 2 with lapicid 1 [ 216.130278] IRQ 124: no longer affine to CPU3 [ 216.131571] smpboot: CPU 3 is now offline [ 217.135012] vhm: try to offline cpu 3 with lapicid 3 [ 217.190688] vhm_dev_open: opening device node [ 217.191180] vhm-ioreq: init request buffer @ 00000000d5da3ebd!
[ 217.191184] vhm-ioreq: created ioreq client 1 for ioeventfd-1 [ 217.191214] ACRN vhm ioeventfd init done!
[ 217.191222] ACRN vhm irqfd init done!
[ 217.191223] vhm: VM 1 created
[ 217.385657] vhm-ioreq: created ioreq client 2 for ioreq gvt-g [ 217.387846] IPv6: ADDRCONF(NETDEV_CHANGE): tap0: link becomes ready [ 217.387871] acrn-br0: port 1(tap0) entered blocking state [ 217.387873] acrn-br0: port 1(tap0) entered forwarding state [ 217.475601] vhm-ioreq: created ioreq client 3 for acrndm [ 217.563042] [drm] prepare GOP fb: 8100KB for 1920X1080@32 [ 217.567443] [drm] Set up display w:1920 h:1080 for GOP [ 217.567456] gvt: vgpu 1: pvinfo read gop: [78860:4] = df000000 [ 217.567758] gvt: vgpu 1: pvinfo read gop: [78864:4] = 780 [ 217.567904] gvt: vgpu 1: pvinfo read gop: [78868:4] = 438 [ 217.568049] gvt: vgpu 1: pvinfo read gop: [7886c:4] = 780 [ 217.568194] gvt: vgpu 1: pvinfo read gop: [78870:4] = 4 [ 217.568336] gvt: vgpu 1: pvinfo read gop: [78874:4] = 7e9000 [ 217.574251] [drm:intel_cpu_fifo_underrun_irq_handler] *ERROR* CPU pipe A FIFO underrun [ 496.745805] [drm] hotplug can't be supported in idv [ 497.781306] [drm] hotplug can't be supported in idv [ 498.869303] [drm] hotplug can't be supported in idv

I must use GTV-g, as I need to display different content on different screens.

Geoffroy Van Cutsem <geoffroy.vancutsem@...> 于2021年1月28日周四 下午8:21写道:

Hi,

Were you following this tutorial when you hit this issue?
https://projectacrn.github.io/latest/tutorials/using_windows_as_uos.ht
ml

We switched at some point and are now using GVT-d (direct assignement) to run Windows as a Guest, and I believe there are some known issues if trying to install Windows using GTV-g. Which version of ACRN are you using?

Thanks,
Geoffroy

-----Original Message-----
From: acrn-users@...
<acrn-users@...>
On Behalf Of Jacky Lau
Sent: Thursday, January 28, 2021 10:03 AM
To: acrn-users@...
Subject: [acrn-users] GVT init failed when install windows

Hi, all.
After setup an ACRN Industry Scenario with Ubuntu Service VM, I want
to launch Windows as the Guest VM. But there are some issues when I
install windows.

1. Service VM boot time become very long when enable gvt:
...
[ 0.699211] Linux agpgart interface v0.103
[ 0.699424] vhm: initializing
[ 0.699427] vhm: hv api version 1.0
[ 0.699428] vhm: registered correctly with major number 243
[ 0.699431] vhm: device class registered correctly
[ 0.699457] register IPI handler
[ 0.699515] vhm: Virtio & Hypervisor service module initialized
[ 0.700422] i915 0000:00:02.0: Direct firmware load for
i915/gvt/vid_0x8086_did_0x5912_rid_0x04.golden_hw_state failed with
error -2
[ 0.700424] i915 0000:00:02.0: Falling back to sysfs fallback for:
i915/gvt/vid_0x8086_did_0x5912_rid_0x04.golden_hw_state
[ 1.458633] tsc: Refined TSC clocksource calibration: 3912.000 MHz
[ 1.458640] clocksource: tsc: mask: 0xffffffffffffffff max_cycles:
0x70c747804da, max_idle_ns: 881591211608 ns
[ 1.458656] clocksource: Switched to clocksource tsc
[ 62.531820] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 62.531821] [drm] Driver supports precise vblank timestamp query.
[ 62.532332] i915 0000:00:02.0: vgaarb: changed VGA decodes:
olddecodes=io+mem,decodes=io+mem:owns=io+mem
[ 62.532346] [drm] Skip DMC firmware loading in IDV
[ 62.532347] i915 0000:00:02.0: Failed to load DMC firmware
i915/kbl_dmc_ver1_04.bin. Disabling runtime power management.
[ 62.532348] i915 0000:00:02.0: DMC firmware homepage:
https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-
firmware.git/tree/i915
[ 62.532567] [drm] Disable FBC for direct display in IDV
[ 64.563004] [drm] Initialized i915 1.6.0 20191101 for 0000:00:02.0 on minor 0
[ 64.565045] ACPI: Video Device [GFX0] (multi-head: yes rom: no post: no)
[ 64.565372] input: Video Bus as
/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/input/inpu
t3
[ 64.568575] brd: module loaded
[ 64.570271] loop: module loaded
[ 64.570359] zram: Added device: zram0
[ 64.570457] mei_me 0000:00:16.0: enabling device (0000 -> 0002)
...

The kernel parameters of my Service VM is:
root=/dev/sda3 console=ttyS0 idle=halt rw rootwait console=tty0
consoleblank=0 no_timer_check quiet loglevel=3
i915.nuclear_pageflip=1
hvlog=2M@0xe00000 memmap=0x200000$0xe00000 maxcpus=4
root=PARTUUID=28259bf2-ab31-1048-a7b8-96cf62ef034f intel_iommu=on
i915.enable_gvt=1 i915.enable_guc=0 i915.enable_inital_modeset=1
hugepagesz=1G hugepages=4

Full dmesg is in the attached file.

2. acrn-dm report "gvt pci bases are out of range" when init gvt:
jacky@acrn:~/acrn-work$ sudo ./install_win.sh
cpu1 online=0
cpu2 online=0
cpu3 online=0
passed gvt-g optargs low_gm 64, high_gm 448, fence 8
SW_LOAD: get ovmf path /usr/share/acrn/bios/OVMF.fd, size 0x200000
vm_create: win_vm1
VHM api version 1.0
vm_setup_memory: size=0x100000000
open hugetlbfs file
/run/hugepage/acrn/huge_lv1/win_vm1/D279543825D611E8864ECB7A18B34
643
open hugetlbfs file
/run/hugepage/acrn/huge_lv2/win_vm1/D279543825D611E8864ECB7A18B34
643
level 0 free/need pages:1/1 page size:0x200000 level 1 free/need
pages:4/4 page size:0x40000000

try to setup hugepage with:
level 0 - lowmem 0x0, biosmem 0x200000, highmem 0x0
level 1 - lowmem 0x80000000, biosmem 0x0, highmem 0x80000000
total_size 0x200000000

mmap ptr 0x0x7fd9e6fbf000 -> baseaddr 0x0x7fda00000000 mmap
0x80000000@0x7fda00000000 touch 2 pages with pagesz 0x40000000 mmap
0x80000000@0x7fdb40000000 touch 2 pages with pagesz 0x40000000 mmap
0x200000@0x7fdaffe00000 touch 1 pages with pagesz 0x200000

really setup hugepage with:
level 0 - lowmem 0x0, biosmem 0x200000, highmem 0x0
level 1 - lowmem 0x80000000, biosmem 0x0, highmem 0x80000000
vm_init_vdevs No correct pm notify channel given pci init hostbridge
pci init lpc pci init pci-gvt gvt pci bases are out of range
GVT: init failed
pci pci-gvt init failed

polling 34...

Listening 34...

Stop listening 34...

Stop polling 34...

No
correct pm notify channel given


Unable to init vdev (2)

my install_win.sh script:
#!/bin/bash
# Copyright (C) 2019 Intel Corporation.
# SPDX-License-Identifier: BSD-3-Clause

function launch_win()
{
vm_name=win_vm$1

#check if the vm is running or not
vm_ps=$(pgrep -a -f acrn-dm)
result=$(echo $vm_ps | grep "${vm_name}") if [[ "$result" != "" ]];
then echo "$vm_name is running, can't create twice!"
exit
fi

#for memsize setting
mem_size=4096M

acrn-dm -A -m $mem_size -s 0:0,hostbridge -s 1:0,lpc -l com1,stdio \
-s 2,pci- gvt -G "$2" \ -s 3,virtio-blk,./win10-20h2.img \ -s
4,virtio-net,tap0 \ -s
6,xhci,1-7 \ -s 8,ahci,cd:./Windows.iso \ -s
9,ahci,cd:./virtio-win-0.1.190.iso \ --ovmf
/usr/share/acrn/bios/OVMF.fd \ --windows \ $vm_name }

# offline SOS CPUs except BSP before launch UOS for i in `ls -d
/sys/devices/system/cpu/cpu[1-99]`; do
online=`cat $i/online`
idx=`echo $i | tr -cd "[1-99]"`
echo cpu$idx online=$online
if [ "$online" = "1" ]; then
echo 0 > $i/online
# during boot time, cpu hotplug may be disabled by
pci_device_probe during a pci module insmod
while [ "$online" = "1" ]; do
sleep 1
echo 0 > $i/online
online=`cat $i/online`
done
echo $idx > /sys/class/vhm/acrn_vhm/offline_cpu
fi
done

launch_win 1 "64 448 8"


3. There are no mdev_supported_types file in the /sys filesystem
jacky@acrn:~/acrn-work$ lspci|grep -i vga
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 630
(rev 04)

jacky@acrn:~/acrn-work$ ls -l
/sys/devices/pci0000\:00/0000\:00\:02.0/
total 0
-r--r--r-- 1 root root 4096 Jan 28 15:58 ari_enabled
-r--r--r-- 1 root root 4096 Jan 28 15:58 boot_vga
-rw-r--r-- 1 root root 4096 Jan 28 15:58 broken_parity_status
-r--r--r-- 1 root root 4096 Jan 28 15:58 class
-rw-r--r-- 1 root root 4096 Jan 28 15:58 config
-r--r--r-- 1 root root 4096 Jan 28 15:58 consistent_dma_mask_bits
-r--r--r-- 1 root root 4096 Jan 28 15:58 current_link_speed
-r--r--r-- 1 root root 4096 Jan 28 15:58 current_link_width
-rw-r--r-- 1 root root 4096 Jan 28 15:58 d3cold_allowed
-r--r--r-- 1 root root 4096 Jan 28 15:58 device
-r--r--r-- 1 root root 4096 Jan 28 15:58 dma_mask_bits
lrwxrwxrwx 1 root root 0 Jan 28 15:58 driver ->
../../../bus/pci/drivers/i915
-rw-r--r-- 1 root root 4096 Jan 28 15:58 driver_override
drwxr-xr-x 4 root root 0 Jan 28 15:58 drm
-rw-r--r-- 1 root root 4096 Jan 28 15:58 enable
lrwxrwxrwx 1 root root 0 Jan 28 15:58 firmware_node ->
../../LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00
drwxr-xr-x 3 root root 0 Jan 28 15:58 graphics
-r-------- 1 root root 2101304 Jan 28 15:58 gvt_firmware
drwxr-xr-x 4 root root 0 Jan 28 15:58 i2c-0
drwxr-xr-x 4 root root 0 Jan 28 15:58 i2c-1
drwxr-xr-x 4 root root 0 Jan 28 15:58 i2c-2
-r--r--r-- 1 root root 4096 Jan 28 15:58 index
-r--r--r-- 1 root root 4096 Jan 28 15:58 irq
-r--r--r-- 1 root root 4096 Jan 28 15:58 label
-r--r--r-- 1 root root 4096 Jan 28 15:58 local_cpulist
-r--r--r-- 1 root root 4096 Jan 28 15:58 local_cpus
-r--r--r-- 1 root root 4096 Jan 28 15:58 max_link_speed
-r--r--r-- 1 root root 4096 Jan 28 15:58 max_link_width
-r--r--r-- 1 root root 4096 Jan 28 15:58 modalias
-rw-r--r-- 1 root root 4096 Jan 28 15:58 msi_bus
drwxr-xr-x 2 root root 0 Jan 28 15:58 msi_irqs
drwxr-xr-x 2 root root 0 Jan 28 15:58 power
--w--w---- 1 root root 4096 Jan 28 15:58 remove
--w------- 1 root root 4096 Jan 28 15:58 rescan
--w------- 1 root root 4096 Jan 28 15:58 reset
-r--r--r-- 1 root root 4096 Jan 28 15:58 resource
-rw------- 1 root root 16777216 Jan 28 15:58 resource0
-rw------- 1 root root 268435456 Jan 28 15:58 resource2
-rw------- 1 root root 268435456 Jan 28 15:58 resource2_wc
-rw------- 1 root root 64 Jan 28 15:58 resource4
-r--r--r-- 1 root root 4096 Jan 28 15:58 revision
-rw------- 1 root root 131072 Jan 28 15:58 rom
lrwxrwxrwx 1 root root 0 Jan 28 15:58 subsystem -> ../../../bus/pci
-r--r--r-- 1 root root 4096 Jan 28 15:58 subsystem_device
-r--r--r-- 1 root root 4096 Jan 28 15:58 subsystem_vendor
-rw-r--r-- 1 root root 4096 Jan 28 15:58 uevent
-r--r--r-- 1 root root 4096 Jan 28 15:58 vendor

So, do I miss anything?








Re: GVT init failed when install windows

Geoffroy Van Cutsem
 

Fuzhong, is this something you can help with?

Thanks,
Geoffroy

-----Original Message-----
From: acrn-users@... <acrn-users@...>
On Behalf Of Jacky Lau
Sent: Thursday, January 28, 2021 3:31 PM
To: acrn-users@...
Subject: Re: [acrn-users] GVT init failed when install windows

Well, I'm using acrn v2.3, so I following this tutorial:
https://projectacrn.github.io/2.3/tutorials/using_windows_as_uos.html

I checked the code and fixed the gvt init failed issue by enlarged
PCI_EMUL_MEMLIMIT32.
The install_win.sh run successful. But nothing displayed on my hdmi screen.
When I run install_win.sh, the kernel print messages:
[ 214.077918] IRQ 122: no longer affine to CPU1 [ 214.079031] smpboot: CPU
1 is now offline [ 215.083296] vhm: try to offline cpu 1 with lapicid 2 [
215.110031] IRQ 120: no longer affine to CPU2 [ 215.112118] smpboot: CPU 2
is now offline [ 216.114476] vhm: try to offline cpu 2 with lapicid 1 [
216.130278] IRQ 124: no longer affine to CPU3 [ 216.131571] smpboot: CPU 3
is now offline [ 217.135012] vhm: try to offline cpu 3 with lapicid 3 [
217.190688] vhm_dev_open: opening device node [ 217.191180] vhm-ioreq:
init request buffer @ 00000000d5da3ebd!
[ 217.191184] vhm-ioreq: created ioreq client 1 for ioeventfd-1 [ 217.191214]
ACRN vhm ioeventfd init done!
[ 217.191222] ACRN vhm irqfd init done!
[ 217.191223] vhm: VM 1 created
[ 217.385657] vhm-ioreq: created ioreq client 2 for ioreq gvt-g [ 217.387846]
IPv6: ADDRCONF(NETDEV_CHANGE): tap0: link becomes ready [ 217.387871]
acrn-br0: port 1(tap0) entered blocking state [ 217.387873] acrn-br0: port
1(tap0) entered forwarding state [ 217.475601] vhm-ioreq: created ioreq
client 3 for acrndm [ 217.563042] [drm] prepare GOP fb: 8100KB for
1920X1080@32 [ 217.567443] [drm] Set up display w:1920 h:1080 for GOP [
217.567456] gvt: vgpu 1: pvinfo read gop: [78860:4] = df000000 [ 217.567758]
gvt: vgpu 1: pvinfo read gop: [78864:4] = 780 [ 217.567904] gvt: vgpu 1: pvinfo
read gop: [78868:4] = 438 [ 217.568049] gvt: vgpu 1: pvinfo read gop:
[7886c:4] = 780 [ 217.568194] gvt: vgpu 1: pvinfo read gop: [78870:4] = 4 [
217.568336] gvt: vgpu 1: pvinfo read gop: [78874:4] = 7e9000 [ 217.574251]
[drm:intel_cpu_fifo_underrun_irq_handler] *ERROR* CPU pipe A FIFO
underrun [ 496.745805] [drm] hotplug can't be supported in idv [
497.781306] [drm] hotplug can't be supported in idv [ 498.869303] [drm]
hotplug can't be supported in idv

I must use GTV-g, as I need to display different content on different screens.

Geoffroy Van Cutsem <geoffroy.vancutsem@...> 于2021年1月28日
周四 下午8:21写道:

Hi,

Were you following this tutorial when you hit this issue?
https://projectacrn.github.io/latest/tutorials/using_windows_as_uos.ht
ml

We switched at some point and are now using GVT-d (direct assignement)
to run Windows as a Guest, and I believe there are some known issues if
trying to install Windows using GTV-g. Which version of ACRN are you using?

Thanks,
Geoffroy

-----Original Message-----
From: acrn-users@...
<acrn-users@...>
On Behalf Of Jacky Lau
Sent: Thursday, January 28, 2021 10:03 AM
To: acrn-users@...
Subject: [acrn-users] GVT init failed when install windows

Hi, all.
After setup an ACRN Industry Scenario with Ubuntu Service VM, I want
to launch Windows as the Guest VM. But there are some issues when I
install windows.

1. Service VM boot time become very long when enable gvt:
...
[ 0.699211] Linux agpgart interface v0.103
[ 0.699424] vhm: initializing
[ 0.699427] vhm: hv api version 1.0
[ 0.699428] vhm: registered correctly with major number 243
[ 0.699431] vhm: device class registered correctly
[ 0.699457] register IPI handler
[ 0.699515] vhm: Virtio & Hypervisor service module initialized
[ 0.700422] i915 0000:00:02.0: Direct firmware load for
i915/gvt/vid_0x8086_did_0x5912_rid_0x04.golden_hw_state failed with
error -2
[ 0.700424] i915 0000:00:02.0: Falling back to sysfs fallback for:
i915/gvt/vid_0x8086_did_0x5912_rid_0x04.golden_hw_state
[ 1.458633] tsc: Refined TSC clocksource calibration: 3912.000 MHz
[ 1.458640] clocksource: tsc: mask: 0xffffffffffffffff max_cycles:
0x70c747804da, max_idle_ns: 881591211608 ns
[ 1.458656] clocksource: Switched to clocksource tsc
[ 62.531820] [drm] Supports vblank timestamp caching Rev 2
(21.10.2013).
[ 62.531821] [drm] Driver supports precise vblank timestamp query.
[ 62.532332] i915 0000:00:02.0: vgaarb: changed VGA decodes:
olddecodes=io+mem,decodes=io+mem:owns=io+mem
[ 62.532346] [drm] Skip DMC firmware loading in IDV
[ 62.532347] i915 0000:00:02.0: Failed to load DMC firmware
i915/kbl_dmc_ver1_04.bin. Disabling runtime power management.
[ 62.532348] i915 0000:00:02.0: DMC firmware homepage:
https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-
firmware.git/tree/i915
[ 62.532567] [drm] Disable FBC for direct display in IDV
[ 64.563004] [drm] Initialized i915 1.6.0 20191101 for 0000:00:02.0 on
minor 0
[ 64.565045] ACPI: Video Device [GFX0] (multi-head: yes rom: no post:
no)
[ 64.565372] input: Video Bus as
/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/input/inpu
t3
[ 64.568575] brd: module loaded
[ 64.570271] loop: module loaded
[ 64.570359] zram: Added device: zram0
[ 64.570457] mei_me 0000:00:16.0: enabling device (0000 -> 0002)
...

The kernel parameters of my Service VM is:
root=/dev/sda3 console=ttyS0 idle=halt rw rootwait console=tty0
consoleblank=0 no_timer_check quiet loglevel=3
i915.nuclear_pageflip=1
hvlog=2M@0xe00000 memmap=0x200000$0xe00000 maxcpus=4
root=PARTUUID=28259bf2-ab31-1048-a7b8-96cf62ef034f
intel_iommu=on
i915.enable_gvt=1 i915.enable_guc=0 i915.enable_inital_modeset=1
hugepagesz=1G hugepages=4

Full dmesg is in the attached file.

2. acrn-dm report "gvt pci bases are out of range" when init gvt:
jacky@acrn:~/acrn-work$ sudo ./install_win.sh
cpu1 online=0
cpu2 online=0
cpu3 online=0
passed gvt-g optargs low_gm 64, high_gm 448, fence 8
SW_LOAD: get ovmf path /usr/share/acrn/bios/OVMF.fd, size 0x200000
vm_create: win_vm1
VHM api version 1.0
vm_setup_memory: size=0x100000000
open hugetlbfs file
/run/hugepage/acrn/huge_lv1/win_vm1/D279543825D611E8864ECB7A18B34
643
open hugetlbfs file
/run/hugepage/acrn/huge_lv2/win_vm1/D279543825D611E8864ECB7A18B34
643
level 0 free/need pages:1/1 page size:0x200000 level 1 free/need
pages:4/4 page size:0x40000000

try to setup hugepage with:
level 0 - lowmem 0x0, biosmem 0x200000, highmem 0x0
level 1 - lowmem 0x80000000, biosmem 0x0, highmem 0x80000000
total_size 0x200000000

mmap ptr 0x0x7fd9e6fbf000 -> baseaddr 0x0x7fda00000000 mmap
0x80000000@0x7fda00000000 touch 2 pages with pagesz 0x40000000
mmap
0x80000000@0x7fdb40000000 touch 2 pages with pagesz 0x40000000
mmap
0x200000@0x7fdaffe00000 touch 1 pages with pagesz 0x200000

really setup hugepage with:
level 0 - lowmem 0x0, biosmem 0x200000, highmem 0x0
level 1 - lowmem 0x80000000, biosmem 0x0, highmem 0x80000000
vm_init_vdevs No correct pm notify channel given pci init hostbridge
pci init lpc pci init pci-gvt gvt pci bases are out of range
GVT: init failed
pci pci-gvt init failed

polling 34...

Listening 34...

Stop listening 34...

Stop polling 34...

No
correct pm notify channel given


Unable to init vdev (2)

my install_win.sh script:
#!/bin/bash
# Copyright (C) 2019 Intel Corporation.
# SPDX-License-Identifier: BSD-3-Clause

function launch_win()
{
vm_name=win_vm$1

#check if the vm is running or not
vm_ps=$(pgrep -a -f acrn-dm)
result=$(echo $vm_ps | grep "${vm_name}") if [[ "$result" != "" ]];
then echo "$vm_name is running, can't create twice!"
exit
fi

#for memsize setting
mem_size=4096M

acrn-dm -A -m $mem_size -s 0:0,hostbridge -s 1:0,lpc -l com1,stdio \
-s 2,pci- gvt -G "$2" \ -s 3,virtio-blk,./win10-20h2.img \ -s
4,virtio-net,tap0 \ -s
6,xhci,1-7 \ -s 8,ahci,cd:./Windows.iso \ -s
9,ahci,cd:./virtio-win-0.1.190.iso \ --ovmf
/usr/share/acrn/bios/OVMF.fd \ --windows \ $vm_name }

# offline SOS CPUs except BSP before launch UOS for i in `ls -d
/sys/devices/system/cpu/cpu[1-99]`; do
online=`cat $i/online`
idx=`echo $i | tr -cd "[1-99]"`
echo cpu$idx online=$online
if [ "$online" = "1" ]; then
echo 0 > $i/online
# during boot time, cpu hotplug may be disabled by
pci_device_probe during a pci module insmod
while [ "$online" = "1" ]; do
sleep 1
echo 0 > $i/online
online=`cat $i/online`
done
echo $idx > /sys/class/vhm/acrn_vhm/offline_cpu
fi
done

launch_win 1 "64 448 8"


3. There are no mdev_supported_types file in the /sys filesystem
jacky@acrn:~/acrn-work$ lspci|grep -i vga
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 630
(rev 04)

jacky@acrn:~/acrn-work$ ls -l
/sys/devices/pci0000\:00/0000\:00\:02.0/
total 0
-r--r--r-- 1 root root 4096 Jan 28 15:58 ari_enabled
-r--r--r-- 1 root root 4096 Jan 28 15:58 boot_vga
-rw-r--r-- 1 root root 4096 Jan 28 15:58 broken_parity_status
-r--r--r-- 1 root root 4096 Jan 28 15:58 class
-rw-r--r-- 1 root root 4096 Jan 28 15:58 config
-r--r--r-- 1 root root 4096 Jan 28 15:58 consistent_dma_mask_bits
-r--r--r-- 1 root root 4096 Jan 28 15:58 current_link_speed
-r--r--r-- 1 root root 4096 Jan 28 15:58 current_link_width
-rw-r--r-- 1 root root 4096 Jan 28 15:58 d3cold_allowed
-r--r--r-- 1 root root 4096 Jan 28 15:58 device
-r--r--r-- 1 root root 4096 Jan 28 15:58 dma_mask_bits
lrwxrwxrwx 1 root root 0 Jan 28 15:58 driver ->
../../../bus/pci/drivers/i915
-rw-r--r-- 1 root root 4096 Jan 28 15:58 driver_override
drwxr-xr-x 4 root root 0 Jan 28 15:58 drm
-rw-r--r-- 1 root root 4096 Jan 28 15:58 enable
lrwxrwxrwx 1 root root 0 Jan 28 15:58 firmware_node ->
../../LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00
drwxr-xr-x 3 root root 0 Jan 28 15:58 graphics
-r-------- 1 root root 2101304 Jan 28 15:58 gvt_firmware
drwxr-xr-x 4 root root 0 Jan 28 15:58 i2c-0
drwxr-xr-x 4 root root 0 Jan 28 15:58 i2c-1
drwxr-xr-x 4 root root 0 Jan 28 15:58 i2c-2
-r--r--r-- 1 root root 4096 Jan 28 15:58 index
-r--r--r-- 1 root root 4096 Jan 28 15:58 irq
-r--r--r-- 1 root root 4096 Jan 28 15:58 label
-r--r--r-- 1 root root 4096 Jan 28 15:58 local_cpulist
-r--r--r-- 1 root root 4096 Jan 28 15:58 local_cpus
-r--r--r-- 1 root root 4096 Jan 28 15:58 max_link_speed
-r--r--r-- 1 root root 4096 Jan 28 15:58 max_link_width
-r--r--r-- 1 root root 4096 Jan 28 15:58 modalias
-rw-r--r-- 1 root root 4096 Jan 28 15:58 msi_bus
drwxr-xr-x 2 root root 0 Jan 28 15:58 msi_irqs
drwxr-xr-x 2 root root 0 Jan 28 15:58 power
--w--w---- 1 root root 4096 Jan 28 15:58 remove
--w------- 1 root root 4096 Jan 28 15:58 rescan
--w------- 1 root root 4096 Jan 28 15:58 reset
-r--r--r-- 1 root root 4096 Jan 28 15:58 resource
-rw------- 1 root root 16777216 Jan 28 15:58 resource0
-rw------- 1 root root 268435456 Jan 28 15:58 resource2
-rw------- 1 root root 268435456 Jan 28 15:58 resource2_wc
-rw------- 1 root root 64 Jan 28 15:58 resource4
-r--r--r-- 1 root root 4096 Jan 28 15:58 revision
-rw------- 1 root root 131072 Jan 28 15:58 rom
lrwxrwxrwx 1 root root 0 Jan 28 15:58 subsystem -> ../../../bus/pci
-r--r--r-- 1 root root 4096 Jan 28 15:58 subsystem_device
-r--r--r-- 1 root root 4096 Jan 28 15:58 subsystem_vendor
-rw-r--r-- 1 root root 4096 Jan 28 15:58 uevent
-r--r--r-- 1 root root 4096 Jan 28 15:58 vendor

So, do I miss anything?










Re: GVT init failed when install windows

Jacky Lau
 

Well, I'm using acrn v2.3, so I following this tutorial:
https://projectacrn.github.io/2.3/tutorials/using_windows_as_uos.html

I checked the code and fixed the gvt init failed issue by enlarged
PCI_EMUL_MEMLIMIT32.
The install_win.sh run successful. But nothing displayed on my hdmi screen.
When I run install_win.sh, the kernel print messages:
[ 214.077918] IRQ 122: no longer affine to CPU1
[ 214.079031] smpboot: CPU 1 is now offline
[ 215.083296] vhm: try to offline cpu 1 with lapicid 2
[ 215.110031] IRQ 120: no longer affine to CPU2
[ 215.112118] smpboot: CPU 2 is now offline
[ 216.114476] vhm: try to offline cpu 2 with lapicid 1
[ 216.130278] IRQ 124: no longer affine to CPU3
[ 216.131571] smpboot: CPU 3 is now offline
[ 217.135012] vhm: try to offline cpu 3 with lapicid 3
[ 217.190688] vhm_dev_open: opening device node
[ 217.191180] vhm-ioreq: init request buffer @ 00000000d5da3ebd!
[ 217.191184] vhm-ioreq: created ioreq client 1 for ioeventfd-1
[ 217.191214] ACRN vhm ioeventfd init done!
[ 217.191222] ACRN vhm irqfd init done!
[ 217.191223] vhm: VM 1 created
[ 217.385657] vhm-ioreq: created ioreq client 2 for ioreq gvt-g
[ 217.387846] IPv6: ADDRCONF(NETDEV_CHANGE): tap0: link becomes ready
[ 217.387871] acrn-br0: port 1(tap0) entered blocking state
[ 217.387873] acrn-br0: port 1(tap0) entered forwarding state
[ 217.475601] vhm-ioreq: created ioreq client 3 for acrndm
[ 217.563042] [drm] prepare GOP fb: 8100KB for 1920X1080@32
[ 217.567443] [drm] Set up display w:1920 h:1080 for GOP
[ 217.567456] gvt: vgpu 1: pvinfo read gop: [78860:4] = df000000
[ 217.567758] gvt: vgpu 1: pvinfo read gop: [78864:4] = 780
[ 217.567904] gvt: vgpu 1: pvinfo read gop: [78868:4] = 438
[ 217.568049] gvt: vgpu 1: pvinfo read gop: [7886c:4] = 780
[ 217.568194] gvt: vgpu 1: pvinfo read gop: [78870:4] = 4
[ 217.568336] gvt: vgpu 1: pvinfo read gop: [78874:4] = 7e9000
[ 217.574251] [drm:intel_cpu_fifo_underrun_irq_handler] *ERROR* CPU
pipe A FIFO underrun
[ 496.745805] [drm] hotplug can't be supported in idv
[ 497.781306] [drm] hotplug can't be supported in idv
[ 498.869303] [drm] hotplug can't be supported in idv

I must use GTV-g, as I need to display different content on different screens.

Geoffroy Van Cutsem <geoffroy.vancutsem@...> 于2021年1月28日周四 下午8:21写道:


Hi,

Were you following this tutorial when you hit this issue? https://projectacrn.github.io/latest/tutorials/using_windows_as_uos.html

We switched at some point and are now using GVT-d (direct assignement) to run Windows as a Guest, and I believe there are some known issues if trying to install Windows using GTV-g. Which version of ACRN are you using?

Thanks,
Geoffroy

-----Original Message-----
From: acrn-users@... <acrn-users@...>
On Behalf Of Jacky Lau
Sent: Thursday, January 28, 2021 10:03 AM
To: acrn-users@...
Subject: [acrn-users] GVT init failed when install windows

Hi, all.
After setup an ACRN Industry Scenario with Ubuntu Service VM, I want to
launch Windows as the Guest VM. But there are some issues when I install
windows.

1. Service VM boot time become very long when enable gvt:
...
[ 0.699211] Linux agpgart interface v0.103
[ 0.699424] vhm: initializing
[ 0.699427] vhm: hv api version 1.0
[ 0.699428] vhm: registered correctly with major number 243
[ 0.699431] vhm: device class registered correctly
[ 0.699457] register IPI handler
[ 0.699515] vhm: Virtio & Hypervisor service module initialized
[ 0.700422] i915 0000:00:02.0: Direct firmware load for
i915/gvt/vid_0x8086_did_0x5912_rid_0x04.golden_hw_state failed with
error -2
[ 0.700424] i915 0000:00:02.0: Falling back to sysfs fallback for:
i915/gvt/vid_0x8086_did_0x5912_rid_0x04.golden_hw_state
[ 1.458633] tsc: Refined TSC clocksource calibration: 3912.000 MHz
[ 1.458640] clocksource: tsc: mask: 0xffffffffffffffff max_cycles:
0x70c747804da, max_idle_ns: 881591211608 ns
[ 1.458656] clocksource: Switched to clocksource tsc
[ 62.531820] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 62.531821] [drm] Driver supports precise vblank timestamp query.
[ 62.532332] i915 0000:00:02.0: vgaarb: changed VGA decodes:
olddecodes=io+mem,decodes=io+mem:owns=io+mem
[ 62.532346] [drm] Skip DMC firmware loading in IDV
[ 62.532347] i915 0000:00:02.0: Failed to load DMC firmware
i915/kbl_dmc_ver1_04.bin. Disabling runtime power management.
[ 62.532348] i915 0000:00:02.0: DMC firmware homepage:
https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-
firmware.git/tree/i915
[ 62.532567] [drm] Disable FBC for direct display in IDV
[ 64.563004] [drm] Initialized i915 1.6.0 20191101 for 0000:00:02.0 on minor 0
[ 64.565045] ACPI: Video Device [GFX0] (multi-head: yes rom: no post: no)
[ 64.565372] input: Video Bus as
/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/input/inpu
t3
[ 64.568575] brd: module loaded
[ 64.570271] loop: module loaded
[ 64.570359] zram: Added device: zram0
[ 64.570457] mei_me 0000:00:16.0: enabling device (0000 -> 0002)
...

The kernel parameters of my Service VM is:
root=/dev/sda3 console=ttyS0 idle=halt rw rootwait console=tty0
consoleblank=0 no_timer_check quiet loglevel=3 i915.nuclear_pageflip=1
hvlog=2M@0xe00000 memmap=0x200000$0xe00000 maxcpus=4
root=PARTUUID=28259bf2-ab31-1048-a7b8-96cf62ef034f intel_iommu=on
i915.enable_gvt=1 i915.enable_guc=0 i915.enable_inital_modeset=1
hugepagesz=1G hugepages=4

Full dmesg is in the attached file.

2. acrn-dm report "gvt pci bases are out of range" when init gvt:
jacky@acrn:~/acrn-work$ sudo ./install_win.sh
cpu1 online=0
cpu2 online=0
cpu3 online=0
passed gvt-g optargs low_gm 64, high_gm 448, fence 8
SW_LOAD: get ovmf path /usr/share/acrn/bios/OVMF.fd, size 0x200000
vm_create: win_vm1
VHM api version 1.0
vm_setup_memory: size=0x100000000
open hugetlbfs file
/run/hugepage/acrn/huge_lv1/win_vm1/D279543825D611E8864ECB7A18B34
643
open hugetlbfs file
/run/hugepage/acrn/huge_lv2/win_vm1/D279543825D611E8864ECB7A18B34
643
level 0 free/need pages:1/1 page size:0x200000 level 1 free/need pages:4/4
page size:0x40000000

try to setup hugepage with:
level 0 - lowmem 0x0, biosmem 0x200000, highmem 0x0
level 1 - lowmem 0x80000000, biosmem 0x0, highmem 0x80000000
total_size 0x200000000

mmap ptr 0x0x7fd9e6fbf000 -> baseaddr 0x0x7fda00000000 mmap
0x80000000@0x7fda00000000 touch 2 pages with pagesz 0x40000000 mmap
0x80000000@0x7fdb40000000 touch 2 pages with pagesz 0x40000000 mmap
0x200000@0x7fdaffe00000 touch 1 pages with pagesz 0x200000

really setup hugepage with:
level 0 - lowmem 0x0, biosmem 0x200000, highmem 0x0
level 1 - lowmem 0x80000000, biosmem 0x0, highmem 0x80000000
vm_init_vdevs No correct pm notify channel given pci init hostbridge pci init
lpc pci init pci-gvt gvt pci bases are out of range
GVT: init failed
pci pci-gvt init failed

polling 34...

Listening 34...

Stop listening 34...

Stop polling 34...

No correct pm notify channel given


Unable to init vdev (2)

my install_win.sh script:
#!/bin/bash
# Copyright (C) 2019 Intel Corporation.
# SPDX-License-Identifier: BSD-3-Clause

function launch_win()
{
vm_name=win_vm$1

#check if the vm is running or not
vm_ps=$(pgrep -a -f acrn-dm)
result=$(echo $vm_ps | grep "${vm_name}") if [[ "$result" != "" ]]; then
echo "$vm_name is running, can't create twice!"
exit
fi

#for memsize setting
mem_size=4096M

acrn-dm -A -m $mem_size -s 0:0,hostbridge -s 1:0,lpc -l com1,stdio \ -s 2,pci-
gvt -G "$2" \ -s 3,virtio-blk,./win10-20h2.img \ -s 4,virtio-net,tap0 \ -s
6,xhci,1-7 \ -s 8,ahci,cd:./Windows.iso \ -s 9,ahci,cd:./virtio-win-0.1.190.iso \
--ovmf /usr/share/acrn/bios/OVMF.fd \ --windows \ $vm_name }

# offline SOS CPUs except BSP before launch UOS for i in `ls -d
/sys/devices/system/cpu/cpu[1-99]`; do
online=`cat $i/online`
idx=`echo $i | tr -cd "[1-99]"`
echo cpu$idx online=$online
if [ "$online" = "1" ]; then
echo 0 > $i/online
# during boot time, cpu hotplug may be disabled by pci_device_probe
during a pci module insmod
while [ "$online" = "1" ]; do
sleep 1
echo 0 > $i/online
online=`cat $i/online`
done
echo $idx > /sys/class/vhm/acrn_vhm/offline_cpu
fi
done

launch_win 1 "64 448 8"


3. There are no mdev_supported_types file in the /sys filesystem
jacky@acrn:~/acrn-work$ lspci|grep -i vga
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 630 (rev 04)

jacky@acrn:~/acrn-work$ ls -l /sys/devices/pci0000\:00/0000\:00\:02.0/
total 0
-r--r--r-- 1 root root 4096 Jan 28 15:58 ari_enabled
-r--r--r-- 1 root root 4096 Jan 28 15:58 boot_vga
-rw-r--r-- 1 root root 4096 Jan 28 15:58 broken_parity_status
-r--r--r-- 1 root root 4096 Jan 28 15:58 class
-rw-r--r-- 1 root root 4096 Jan 28 15:58 config
-r--r--r-- 1 root root 4096 Jan 28 15:58 consistent_dma_mask_bits
-r--r--r-- 1 root root 4096 Jan 28 15:58 current_link_speed
-r--r--r-- 1 root root 4096 Jan 28 15:58 current_link_width
-rw-r--r-- 1 root root 4096 Jan 28 15:58 d3cold_allowed
-r--r--r-- 1 root root 4096 Jan 28 15:58 device
-r--r--r-- 1 root root 4096 Jan 28 15:58 dma_mask_bits
lrwxrwxrwx 1 root root 0 Jan 28 15:58 driver ->
../../../bus/pci/drivers/i915
-rw-r--r-- 1 root root 4096 Jan 28 15:58 driver_override
drwxr-xr-x 4 root root 0 Jan 28 15:58 drm
-rw-r--r-- 1 root root 4096 Jan 28 15:58 enable
lrwxrwxrwx 1 root root 0 Jan 28 15:58 firmware_node ->
../../LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00
drwxr-xr-x 3 root root 0 Jan 28 15:58 graphics
-r-------- 1 root root 2101304 Jan 28 15:58 gvt_firmware
drwxr-xr-x 4 root root 0 Jan 28 15:58 i2c-0
drwxr-xr-x 4 root root 0 Jan 28 15:58 i2c-1
drwxr-xr-x 4 root root 0 Jan 28 15:58 i2c-2
-r--r--r-- 1 root root 4096 Jan 28 15:58 index
-r--r--r-- 1 root root 4096 Jan 28 15:58 irq
-r--r--r-- 1 root root 4096 Jan 28 15:58 label
-r--r--r-- 1 root root 4096 Jan 28 15:58 local_cpulist
-r--r--r-- 1 root root 4096 Jan 28 15:58 local_cpus
-r--r--r-- 1 root root 4096 Jan 28 15:58 max_link_speed
-r--r--r-- 1 root root 4096 Jan 28 15:58 max_link_width
-r--r--r-- 1 root root 4096 Jan 28 15:58 modalias
-rw-r--r-- 1 root root 4096 Jan 28 15:58 msi_bus
drwxr-xr-x 2 root root 0 Jan 28 15:58 msi_irqs
drwxr-xr-x 2 root root 0 Jan 28 15:58 power
--w--w---- 1 root root 4096 Jan 28 15:58 remove
--w------- 1 root root 4096 Jan 28 15:58 rescan
--w------- 1 root root 4096 Jan 28 15:58 reset
-r--r--r-- 1 root root 4096 Jan 28 15:58 resource
-rw------- 1 root root 16777216 Jan 28 15:58 resource0
-rw------- 1 root root 268435456 Jan 28 15:58 resource2
-rw------- 1 root root 268435456 Jan 28 15:58 resource2_wc
-rw------- 1 root root 64 Jan 28 15:58 resource4
-r--r--r-- 1 root root 4096 Jan 28 15:58 revision
-rw------- 1 root root 131072 Jan 28 15:58 rom
lrwxrwxrwx 1 root root 0 Jan 28 15:58 subsystem -> ../../../bus/pci
-r--r--r-- 1 root root 4096 Jan 28 15:58 subsystem_device
-r--r--r-- 1 root root 4096 Jan 28 15:58 subsystem_vendor
-rw-r--r-- 1 root root 4096 Jan 28 15:58 uevent
-r--r--r-- 1 root root 4096 Jan 28 15:58 vendor

So, do I miss anything?








Re: GVT init failed when install windows

Geoffroy Van Cutsem
 

Hi,

Were you following this tutorial when you hit this issue? https://projectacrn.github.io/latest/tutorials/using_windows_as_uos.html

We switched at some point and are now using GVT-d (direct assignement) to run Windows as a Guest, and I believe there are some known issues if trying to install Windows using GTV-g. Which version of ACRN are you using?

Thanks,
Geoffroy

-----Original Message-----
From: acrn-users@... <acrn-users@...>
On Behalf Of Jacky Lau
Sent: Thursday, January 28, 2021 10:03 AM
To: acrn-users@...
Subject: [acrn-users] GVT init failed when install windows

Hi, all.
After setup an ACRN Industry Scenario with Ubuntu Service VM, I want to
launch Windows as the Guest VM. But there are some issues when I install
windows.

1. Service VM boot time become very long when enable gvt:
...
[ 0.699211] Linux agpgart interface v0.103
[ 0.699424] vhm: initializing
[ 0.699427] vhm: hv api version 1.0
[ 0.699428] vhm: registered correctly with major number 243
[ 0.699431] vhm: device class registered correctly
[ 0.699457] register IPI handler
[ 0.699515] vhm: Virtio & Hypervisor service module initialized
[ 0.700422] i915 0000:00:02.0: Direct firmware load for
i915/gvt/vid_0x8086_did_0x5912_rid_0x04.golden_hw_state failed with
error -2
[ 0.700424] i915 0000:00:02.0: Falling back to sysfs fallback for:
i915/gvt/vid_0x8086_did_0x5912_rid_0x04.golden_hw_state
[ 1.458633] tsc: Refined TSC clocksource calibration: 3912.000 MHz
[ 1.458640] clocksource: tsc: mask: 0xffffffffffffffff max_cycles:
0x70c747804da, max_idle_ns: 881591211608 ns
[ 1.458656] clocksource: Switched to clocksource tsc
[ 62.531820] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 62.531821] [drm] Driver supports precise vblank timestamp query.
[ 62.532332] i915 0000:00:02.0: vgaarb: changed VGA decodes:
olddecodes=io+mem,decodes=io+mem:owns=io+mem
[ 62.532346] [drm] Skip DMC firmware loading in IDV
[ 62.532347] i915 0000:00:02.0: Failed to load DMC firmware
i915/kbl_dmc_ver1_04.bin. Disabling runtime power management.
[ 62.532348] i915 0000:00:02.0: DMC firmware homepage:
https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-
firmware.git/tree/i915
[ 62.532567] [drm] Disable FBC for direct display in IDV
[ 64.563004] [drm] Initialized i915 1.6.0 20191101 for 0000:00:02.0 on minor 0
[ 64.565045] ACPI: Video Device [GFX0] (multi-head: yes rom: no post: no)
[ 64.565372] input: Video Bus as
/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/input/inpu
t3
[ 64.568575] brd: module loaded
[ 64.570271] loop: module loaded
[ 64.570359] zram: Added device: zram0
[ 64.570457] mei_me 0000:00:16.0: enabling device (0000 -> 0002)
...

The kernel parameters of my Service VM is:
root=/dev/sda3 console=ttyS0 idle=halt rw rootwait console=tty0
consoleblank=0 no_timer_check quiet loglevel=3 i915.nuclear_pageflip=1
hvlog=2M@0xe00000 memmap=0x200000$0xe00000 maxcpus=4
root=PARTUUID=28259bf2-ab31-1048-a7b8-96cf62ef034f intel_iommu=on
i915.enable_gvt=1 i915.enable_guc=0 i915.enable_inital_modeset=1
hugepagesz=1G hugepages=4

Full dmesg is in the attached file.

2. acrn-dm report "gvt pci bases are out of range" when init gvt:
jacky@acrn:~/acrn-work$ sudo ./install_win.sh
cpu1 online=0
cpu2 online=0
cpu3 online=0
passed gvt-g optargs low_gm 64, high_gm 448, fence 8
SW_LOAD: get ovmf path /usr/share/acrn/bios/OVMF.fd, size 0x200000
vm_create: win_vm1
VHM api version 1.0
vm_setup_memory: size=0x100000000
open hugetlbfs file
/run/hugepage/acrn/huge_lv1/win_vm1/D279543825D611E8864ECB7A18B34
643
open hugetlbfs file
/run/hugepage/acrn/huge_lv2/win_vm1/D279543825D611E8864ECB7A18B34
643
level 0 free/need pages:1/1 page size:0x200000 level 1 free/need pages:4/4
page size:0x40000000

try to setup hugepage with:
level 0 - lowmem 0x0, biosmem 0x200000, highmem 0x0
level 1 - lowmem 0x80000000, biosmem 0x0, highmem 0x80000000
total_size 0x200000000

mmap ptr 0x0x7fd9e6fbf000 -> baseaddr 0x0x7fda00000000 mmap
0x80000000@0x7fda00000000 touch 2 pages with pagesz 0x40000000 mmap
0x80000000@0x7fdb40000000 touch 2 pages with pagesz 0x40000000 mmap
0x200000@0x7fdaffe00000 touch 1 pages with pagesz 0x200000

really setup hugepage with:
level 0 - lowmem 0x0, biosmem 0x200000, highmem 0x0
level 1 - lowmem 0x80000000, biosmem 0x0, highmem 0x80000000
vm_init_vdevs No correct pm notify channel given pci init hostbridge pci init
lpc pci init pci-gvt gvt pci bases are out of range
GVT: init failed
pci pci-gvt init failed

polling 34...

Listening 34...

Stop listening 34...

Stop polling 34...

No correct pm notify channel given


Unable to init vdev (2)

my install_win.sh script:
#!/bin/bash
# Copyright (C) 2019 Intel Corporation.
# SPDX-License-Identifier: BSD-3-Clause

function launch_win()
{
vm_name=win_vm$1

#check if the vm is running or not
vm_ps=$(pgrep -a -f acrn-dm)
result=$(echo $vm_ps | grep "${vm_name}") if [[ "$result" != "" ]]; then
echo "$vm_name is running, can't create twice!"
exit
fi

#for memsize setting
mem_size=4096M

acrn-dm -A -m $mem_size -s 0:0,hostbridge -s 1:0,lpc -l com1,stdio \ -s 2,pci-
gvt -G "$2" \ -s 3,virtio-blk,./win10-20h2.img \ -s 4,virtio-net,tap0 \ -s
6,xhci,1-7 \ -s 8,ahci,cd:./Windows.iso \ -s 9,ahci,cd:./virtio-win-0.1.190.iso \
--ovmf /usr/share/acrn/bios/OVMF.fd \ --windows \ $vm_name }

# offline SOS CPUs except BSP before launch UOS for i in `ls -d
/sys/devices/system/cpu/cpu[1-99]`; do
online=`cat $i/online`
idx=`echo $i | tr -cd "[1-99]"`
echo cpu$idx online=$online
if [ "$online" = "1" ]; then
echo 0 > $i/online
# during boot time, cpu hotplug may be disabled by pci_device_probe
during a pci module insmod
while [ "$online" = "1" ]; do
sleep 1
echo 0 > $i/online
online=`cat $i/online`
done
echo $idx > /sys/class/vhm/acrn_vhm/offline_cpu
fi
done

launch_win 1 "64 448 8"


3. There are no mdev_supported_types file in the /sys filesystem
jacky@acrn:~/acrn-work$ lspci|grep -i vga
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 630 (rev 04)

jacky@acrn:~/acrn-work$ ls -l /sys/devices/pci0000\:00/0000\:00\:02.0/
total 0
-r--r--r-- 1 root root 4096 Jan 28 15:58 ari_enabled
-r--r--r-- 1 root root 4096 Jan 28 15:58 boot_vga
-rw-r--r-- 1 root root 4096 Jan 28 15:58 broken_parity_status
-r--r--r-- 1 root root 4096 Jan 28 15:58 class
-rw-r--r-- 1 root root 4096 Jan 28 15:58 config
-r--r--r-- 1 root root 4096 Jan 28 15:58 consistent_dma_mask_bits
-r--r--r-- 1 root root 4096 Jan 28 15:58 current_link_speed
-r--r--r-- 1 root root 4096 Jan 28 15:58 current_link_width
-rw-r--r-- 1 root root 4096 Jan 28 15:58 d3cold_allowed
-r--r--r-- 1 root root 4096 Jan 28 15:58 device
-r--r--r-- 1 root root 4096 Jan 28 15:58 dma_mask_bits
lrwxrwxrwx 1 root root 0 Jan 28 15:58 driver ->
../../../bus/pci/drivers/i915
-rw-r--r-- 1 root root 4096 Jan 28 15:58 driver_override
drwxr-xr-x 4 root root 0 Jan 28 15:58 drm
-rw-r--r-- 1 root root 4096 Jan 28 15:58 enable
lrwxrwxrwx 1 root root 0 Jan 28 15:58 firmware_node ->
../../LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00
drwxr-xr-x 3 root root 0 Jan 28 15:58 graphics
-r-------- 1 root root 2101304 Jan 28 15:58 gvt_firmware
drwxr-xr-x 4 root root 0 Jan 28 15:58 i2c-0
drwxr-xr-x 4 root root 0 Jan 28 15:58 i2c-1
drwxr-xr-x 4 root root 0 Jan 28 15:58 i2c-2
-r--r--r-- 1 root root 4096 Jan 28 15:58 index
-r--r--r-- 1 root root 4096 Jan 28 15:58 irq
-r--r--r-- 1 root root 4096 Jan 28 15:58 label
-r--r--r-- 1 root root 4096 Jan 28 15:58 local_cpulist
-r--r--r-- 1 root root 4096 Jan 28 15:58 local_cpus
-r--r--r-- 1 root root 4096 Jan 28 15:58 max_link_speed
-r--r--r-- 1 root root 4096 Jan 28 15:58 max_link_width
-r--r--r-- 1 root root 4096 Jan 28 15:58 modalias
-rw-r--r-- 1 root root 4096 Jan 28 15:58 msi_bus
drwxr-xr-x 2 root root 0 Jan 28 15:58 msi_irqs
drwxr-xr-x 2 root root 0 Jan 28 15:58 power
--w--w---- 1 root root 4096 Jan 28 15:58 remove
--w------- 1 root root 4096 Jan 28 15:58 rescan
--w------- 1 root root 4096 Jan 28 15:58 reset
-r--r--r-- 1 root root 4096 Jan 28 15:58 resource
-rw------- 1 root root 16777216 Jan 28 15:58 resource0
-rw------- 1 root root 268435456 Jan 28 15:58 resource2
-rw------- 1 root root 268435456 Jan 28 15:58 resource2_wc
-rw------- 1 root root 64 Jan 28 15:58 resource4
-r--r--r-- 1 root root 4096 Jan 28 15:58 revision
-rw------- 1 root root 131072 Jan 28 15:58 rom
lrwxrwxrwx 1 root root 0 Jan 28 15:58 subsystem -> ../../../bus/pci
-r--r--r-- 1 root root 4096 Jan 28 15:58 subsystem_device
-r--r--r-- 1 root root 4096 Jan 28 15:58 subsystem_vendor
-rw-r--r-- 1 root root 4096 Jan 28 15:58 uevent
-r--r--r-- 1 root root 4096 Jan 28 15:58 vendor

So, do I miss anything?




GVT init failed when install windows

Jacky Lau
 

Hi, all.
After setup an ACRN Industry Scenario with Ubuntu Service VM, I want
to launch Windows as the Guest VM. But there are some issues when I
install windows.

1. Service VM boot time become very long when enable gvt:
...
[ 0.699211] Linux agpgart interface v0.103
[ 0.699424] vhm: initializing
[ 0.699427] vhm: hv api version 1.0
[ 0.699428] vhm: registered correctly with major number 243
[ 0.699431] vhm: device class registered correctly
[ 0.699457] register IPI handler
[ 0.699515] vhm: Virtio & Hypervisor service module initialized
[ 0.700422] i915 0000:00:02.0: Direct firmware load for
i915/gvt/vid_0x8086_did_0x5912_rid_0x04.golden_hw_state failed with
error -2
[ 0.700424] i915 0000:00:02.0: Falling back to sysfs fallback for:
i915/gvt/vid_0x8086_did_0x5912_rid_0x04.golden_hw_state
[ 1.458633] tsc: Refined TSC clocksource calibration: 3912.000 MHz
[ 1.458640] clocksource: tsc: mask: 0xffffffffffffffff max_cycles:
0x70c747804da, max_idle_ns: 881591211608 ns
[ 1.458656] clocksource: Switched to clocksource tsc
[ 62.531820] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 62.531821] [drm] Driver supports precise vblank timestamp query.
[ 62.532332] i915 0000:00:02.0: vgaarb: changed VGA decodes:
olddecodes=io+mem,decodes=io+mem:owns=io+mem
[ 62.532346] [drm] Skip DMC firmware loading in IDV
[ 62.532347] i915 0000:00:02.0: Failed to load DMC firmware
i915/kbl_dmc_ver1_04.bin. Disabling runtime power management.
[ 62.532348] i915 0000:00:02.0: DMC firmware homepage:
https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/i915
[ 62.532567] [drm] Disable FBC for direct display in IDV
[ 64.563004] [drm] Initialized i915 1.6.0 20191101 for 0000:00:02.0 on minor 0
[ 64.565045] ACPI: Video Device [GFX0] (multi-head: yes rom: no post: no)
[ 64.565372] input: Video Bus as
/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00/input/input3
[ 64.568575] brd: module loaded
[ 64.570271] loop: module loaded
[ 64.570359] zram: Added device: zram0
[ 64.570457] mei_me 0000:00:16.0: enabling device (0000 -> 0002)
...

The kernel parameters of my Service VM is:
root=/dev/sda3 console=ttyS0 idle=halt rw rootwait console=tty0
consoleblank=0 no_timer_check quiet loglevel=3 i915.nuclear_pageflip=1
hvlog=2M@0xe00000 memmap=0x200000$0xe00000 maxcpus=4
root=PARTUUID=28259bf2-ab31-1048-a7b8-96cf62ef034f intel_iommu=on
i915.enable_gvt=1 i915.enable_guc=0 i915.enable_inital_modeset=1
hugepagesz=1G hugepages=4

Full dmesg is in the attached file.

2. acrn-dm report "gvt pci bases are out of range" when init gvt:
jacky@acrn:~/acrn-work$ sudo ./install_win.sh
cpu1 online=0
cpu2 online=0
cpu3 online=0
passed gvt-g optargs low_gm 64, high_gm 448, fence 8
SW_LOAD: get ovmf path /usr/share/acrn/bios/OVMF.fd, size 0x200000
vm_create: win_vm1
VHM api version 1.0
vm_setup_memory: size=0x100000000
open hugetlbfs file
/run/hugepage/acrn/huge_lv1/win_vm1/D279543825D611E8864ECB7A18B34643
open hugetlbfs file
/run/hugepage/acrn/huge_lv2/win_vm1/D279543825D611E8864ECB7A18B34643
level 0 free/need pages:1/1 page size:0x200000
level 1 free/need pages:4/4 page size:0x40000000

try to setup hugepage with:
level 0 - lowmem 0x0, biosmem 0x200000, highmem 0x0
level 1 - lowmem 0x80000000, biosmem 0x0, highmem 0x80000000
total_size 0x200000000

mmap ptr 0x0x7fd9e6fbf000 -> baseaddr 0x0x7fda00000000
mmap 0x80000000@0x7fda00000000
touch 2 pages with pagesz 0x40000000
mmap 0x80000000@0x7fdb40000000
touch 2 pages with pagesz 0x40000000
mmap 0x200000@0x7fdaffe00000
touch 1 pages with pagesz 0x200000

really setup hugepage with:
level 0 - lowmem 0x0, biosmem 0x200000, highmem 0x0
level 1 - lowmem 0x80000000, biosmem 0x0, highmem 0x80000000
vm_init_vdevs
No correct pm notify channel given
pci init hostbridge
pci init lpc
pci init pci-gvt
gvt pci bases are out of range
GVT: init failed
pci pci-gvt init failed

polling 34...

Listening 34...

Stop listening 34...

Stop polling 34...

No
correct pm notify channel given


Unable to init vdev (2)

my install_win.sh script:
#!/bin/bash
# Copyright (C) 2019 Intel Corporation.
# SPDX-License-Identifier: BSD-3-Clause

function launch_win()
{
vm_name=win_vm$1

#check if the vm is running or not
vm_ps=$(pgrep -a -f acrn-dm)
result=$(echo $vm_ps | grep "${vm_name}")
if [[ "$result" != "" ]]; then
echo "$vm_name is running, can't create twice!"
exit
fi

#for memsize setting
mem_size=4096M

acrn-dm -A -m $mem_size -s 0:0,hostbridge -s 1:0,lpc -l com1,stdio \
-s 2,pci-gvt -G "$2" \
-s 3,virtio-blk,./win10-20h2.img \
-s 4,virtio-net,tap0 \
-s 6,xhci,1-7 \
-s 8,ahci,cd:./Windows.iso \
-s 9,ahci,cd:./virtio-win-0.1.190.iso \
--ovmf /usr/share/acrn/bios/OVMF.fd \
--windows \
$vm_name
}

# offline SOS CPUs except BSP before launch UOS
for i in `ls -d /sys/devices/system/cpu/cpu[1-99]`; do
online=`cat $i/online`
idx=`echo $i | tr -cd "[1-99]"`
echo cpu$idx online=$online
if [ "$online" = "1" ]; then
echo 0 > $i/online
# during boot time, cpu hotplug may be disabled by
pci_device_probe during a pci module insmod
while [ "$online" = "1" ]; do
sleep 1
echo 0 > $i/online
online=`cat $i/online`
done
echo $idx > /sys/class/vhm/acrn_vhm/offline_cpu
fi
done

launch_win 1 "64 448 8"


3. There are no mdev_supported_types file in the /sys filesystem
jacky@acrn:~/acrn-work$ lspci|grep -i vga
00:02.0 VGA compatible controller: Intel Corporation HD Graphics 630 (rev 04)

jacky@acrn:~/acrn-work$ ls -l /sys/devices/pci0000\:00/0000\:00\:02.0/
total 0
-r--r--r-- 1 root root 4096 Jan 28 15:58 ari_enabled
-r--r--r-- 1 root root 4096 Jan 28 15:58 boot_vga
-rw-r--r-- 1 root root 4096 Jan 28 15:58 broken_parity_status
-r--r--r-- 1 root root 4096 Jan 28 15:58 class
-rw-r--r-- 1 root root 4096 Jan 28 15:58 config
-r--r--r-- 1 root root 4096 Jan 28 15:58 consistent_dma_mask_bits
-r--r--r-- 1 root root 4096 Jan 28 15:58 current_link_speed
-r--r--r-- 1 root root 4096 Jan 28 15:58 current_link_width
-rw-r--r-- 1 root root 4096 Jan 28 15:58 d3cold_allowed
-r--r--r-- 1 root root 4096 Jan 28 15:58 device
-r--r--r-- 1 root root 4096 Jan 28 15:58 dma_mask_bits
lrwxrwxrwx 1 root root 0 Jan 28 15:58 driver ->
../../../bus/pci/drivers/i915
-rw-r--r-- 1 root root 4096 Jan 28 15:58 driver_override
drwxr-xr-x 4 root root 0 Jan 28 15:58 drm
-rw-r--r-- 1 root root 4096 Jan 28 15:58 enable
lrwxrwxrwx 1 root root 0 Jan 28 15:58 firmware_node ->
../../LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:00
drwxr-xr-x 3 root root 0 Jan 28 15:58 graphics
-r-------- 1 root root 2101304 Jan 28 15:58 gvt_firmware
drwxr-xr-x 4 root root 0 Jan 28 15:58 i2c-0
drwxr-xr-x 4 root root 0 Jan 28 15:58 i2c-1
drwxr-xr-x 4 root root 0 Jan 28 15:58 i2c-2
-r--r--r-- 1 root root 4096 Jan 28 15:58 index
-r--r--r-- 1 root root 4096 Jan 28 15:58 irq
-r--r--r-- 1 root root 4096 Jan 28 15:58 label
-r--r--r-- 1 root root 4096 Jan 28 15:58 local_cpulist
-r--r--r-- 1 root root 4096 Jan 28 15:58 local_cpus
-r--r--r-- 1 root root 4096 Jan 28 15:58 max_link_speed
-r--r--r-- 1 root root 4096 Jan 28 15:58 max_link_width
-r--r--r-- 1 root root 4096 Jan 28 15:58 modalias
-rw-r--r-- 1 root root 4096 Jan 28 15:58 msi_bus
drwxr-xr-x 2 root root 0 Jan 28 15:58 msi_irqs
drwxr-xr-x 2 root root 0 Jan 28 15:58 power
--w--w---- 1 root root 4096 Jan 28 15:58 remove
--w------- 1 root root 4096 Jan 28 15:58 rescan
--w------- 1 root root 4096 Jan 28 15:58 reset
-r--r--r-- 1 root root 4096 Jan 28 15:58 resource
-rw------- 1 root root 16777216 Jan 28 15:58 resource0
-rw------- 1 root root 268435456 Jan 28 15:58 resource2
-rw------- 1 root root 268435456 Jan 28 15:58 resource2_wc
-rw------- 1 root root 64 Jan 28 15:58 resource4
-r--r--r-- 1 root root 4096 Jan 28 15:58 revision
-rw------- 1 root root 131072 Jan 28 15:58 rom
lrwxrwxrwx 1 root root 0 Jan 28 15:58 subsystem -> ../../../bus/pci
-r--r--r-- 1 root root 4096 Jan 28 15:58 subsystem_device
-r--r--r-- 1 root root 4096 Jan 28 15:58 subsystem_vendor
-rw-r--r-- 1 root root 4096 Jan 28 15:58 uevent
-r--r--r-- 1 root root 4096 Jan 28 15:58 vendor

So, do I miss anything?


Re: How to run acrn on my Intel PC?

Geoffroy Van Cutsem
 

That’s very good to  hear! :-)

 

Have fun with it and let us know of any questions or feedback you may have!


Cheers,

Geoffroy

 

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

 

Wow, I boot acrn hypervisor and kernel successfully after enable vt-d in bios.

Thank you very much, Geoffroy.

 

 

Geoffroy Van Cutsem <geoffroy.vancutsem@...> 2021126日周二 下午8:08写道:

I believe it is. Can you confirm you have VT-d enabled in your bios? My understanding is that the DMAR table is set-up by the firmware if VT-d is enabled. If it does not do so, that is the sign of a broken firmware, and the next best source of action would be to contact the bios vendor. But let’s first make sure that VT-d is enabled in the bios.

 

Geoffroy

 

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

 

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@...> 2021126日周二 下午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


Re: How to run acrn on my Intel PC?

Jacky Lau
 

Wow, I boot acrn hypervisor and kernel successfully after enable vt-d in bios.
Thank you very much, Geoffroy.


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

I believe it is. Can you confirm you have VT-d enabled in your bios? My understanding is that the DMAR table is set-up by the firmware if VT-d is enabled. If it does not do so, that is the sign of a broken firmware, and the next best source of action would be to contact the bios vendor. But let’s first make sure that VT-d is enabled in the bios.

 

Geoffroy

 

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

 

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@...> 2021126日周二 下午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


Re: How to run acrn on my Intel PC?

Geoffroy Van Cutsem
 

I believe it is. Can you confirm you have VT-d enabled in your bios? My understanding is that the DMAR table is set-up by the firmware if VT-d is enabled. If it does not do so, that is the sign of a broken firmware, and the next best source of action would be to contact the bios vendor. But let’s first make sure that VT-d is enabled in the bios.

 

Geoffroy

 

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

 

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@...> 2021126日周二 下午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


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