GPT ERROR when write preempt img to sata on NUC7i5BNB


siming
 

Hi,
    My board is NUC7i5BNB, with two disks: an NVMe disk for the Clear Linux-based Service VM and a SATA disk for the RTVM.Accoring to https://projectacrn.github.io/1.6/getting-started/rt_industry.html#install-and-launch-the-preempt-rt-vmwhen I write preempt img to sata, there is always have gpt errors. I have chaged another sata disk, but it's the same error.
root@nuc-acrn /home/acrn # dd if=./preempt-rt-32680.img of=/dev/sda bs=4M oflag=sync status=progress iflag=fullblock seek=0 conv=notrunc
9122611200 bytes (9.1 GB, 8.5 GiB) copied, 124 s, 73.5 MB/s
2186+1 records in
2186+1 records out 
9169755648 bytes (9.2 GB, 8.5 GiB) copied, 126.281 s, 72.6 MB/s
[  171.967643] GPT:Primary header thinks Alt. header is not at the end of the disk.
[  171.967982] GPT:17909678 != 234441647
[  171.968146] GPT:Alternate GPT header not at the end of the disk.
[  171.968406] GPT:17909678 != 234441647
[  171.968616] GPT: Use GNU Parted to correct GPT errors.
[  171.968864]  sda: sda1 sda2 sda3
then I run the launch_hard_rt_vm.sh, it cannot create VM from Hypervisor.
root@nuc-acrn /home/acrn # ./launch_hard_rt_vm.sh
cpu1 online=1 
[ 1525.901370] smpboot: CPU 1 is now offline
[ 1525.902204] vhm: try to offline cpu 1 with lapicid 2
cpu2 online=1 
[ 1525.916019] smpboot: CPU 2 is now offline
[ 1525.917264] vhm: try to offline cpu 2 with lapicid 1
cpu3 online=1 
[ 1525.929538] smpboot: CPU 3 is now offline
[ 1525.930969] vhm: try to offline cpu 3 with lapicid 3
[ 1525.935378] ata1.00: disabled
[ 1525.938524] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[ 1525.939206] sd 0:0:0:0: [sda] Synchronize Cache(10) failed: Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1525.941643] sd 0:0:0:0: [sda] Stopping disk
[ 1525.941888] sd 0:0:0:0: [sda] Start/Stop Unit failed: Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1525.956762] pci-stub 0000:00:17.0: claimed by stub
pm by vuart node-index = 1 
SW_LOAD: get ovmf path /usr/share/acrn/bios/OVMF.fd, size 0x200000 
vm_create: hard_rtvm 
[ 1525.981345] vhm_dev_open: opening device node
VHM api version 1.0 
[ 1525.982333] vhm: failed to create VM from Hypervisor !
[ 1526.483047] vhm: failed to create VM from Hypervisor !
[ 1526.983377] vhm: failed to create VM from Hypervisor !
[ 1527.483702] vhm: failed to create VM from Hypervisor !
[ 1527.984028] vhm: failed to create VM from Hypervisor !
[ 1528.484363] vhm: failed to create VM from Hypervisor !
[ 1528.984686] vhm: failed to create VM from Hypervisor !
[ 1529.485021] vhm: failed to create VM from Hypervisor !
[ 1529.985346] vhm: failed to create VM from Hypervisor !
[ 1530.485672] vhm: failed to create VM from Hypervisor !
failed to create VM hard_rtvm 
vm_create failed
[ 1530.994415] vhm: freed vm
Thanks!
ZS


 


Liu, Fuzhong
 

Hi

The dd issue is for acrn boot or native boot?

Please  boot into native and try it again.

Thanks!

 

BR.

Fuzhong

From: acrn-users@... <acrn-users@...> On Behalf Of siming
Sent: Friday, July 31, 2020 11:34 AM
To: acrn-users@...
Subject: [acrn-users] GPT ERROR when write preempt img to sata on NUC7i5BNB

 

Hi,

    My board is NUC7i5BNB, with two disks: an NVMe disk for the Clear Linux-based Service VM and a SATA disk for the RTVM.Accoring to https://projectacrn.github.io/1.6/getting-started/rt_industry.html#install-and-launch-the-preempt-rt-vmwhen I write preempt img to sata, there is always have gpt errors. I have chaged another sata disk, but it's the same error.

root@nuc-acrn /home/acrn # dd if=./preempt-rt-32680.img of=/dev/sda bs=4M oflag=sync status=progress iflag=fullblock seek=0 conv=notrunc
9122611200 bytes (9.1 GB, 8.5 GiB) copied, 124 s, 73.5 MB/s
2186+1 records in
2186+1 records out 
9169755648 bytes (9.2 GB, 8.5 GiB) copied, 126.281 s, 72.6 MB/s
[  171.967643] GPT:Primary header thinks Alt. header is not at the end of the disk.
[  171.967982] GPT:17909678 != 234441647
[  171.968146] GPT:Alternate GPT header not at the end of the disk.
[  171.968406] GPT:17909678 != 234441647
[  171.968616] GPT: Use GNU Parted to correct GPT errors.
[  171.968864]  sda: sda1 sda2 sda3

then I run the launch_hard_rt_vm.sh, it cannot create VM from Hypervisor.

root@nuc-acrn /home/acrn # ./launch_hard_rt_vm.sh
cpu1 online=1 
[ 1525.901370] smpboot: CPU 1 is now offline
[ 1525.902204] vhm: try to offline cpu 1 with lapicid 2
cpu2 online=1 
[ 1525.916019] smpboot: CPU 2 is now offline
[ 1525.917264] vhm: try to offline cpu 2 with lapicid 1
cpu3 online=1 
[ 1525.929538] smpboot: CPU 3 is now offline
[ 1525.930969] vhm: try to offline cpu 3 with lapicid 3
[ 1525.935378] ata1.00: disabled
[ 1525.938524] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[ 1525.939206] sd 0:0:0:0: [sda] Synchronize Cache(10) failed: Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1525.941643] sd 0:0:0:0: [sda] Stopping disk
[ 1525.941888] sd 0:0:0:0: [sda] Start/Stop Unit failed: Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1525.956762] pci-stub 0000:00:17.0: claimed by stub
pm by vuart node-index = 1 
SW_LOAD: get ovmf path /usr/share/acrn/bios/OVMF.fd, size 0x200000 
vm_create: hard_rtvm 
[ 1525.981345] vhm_dev_open: opening device node
VHM api version 1.0 
[ 1525.982333] vhm: failed to create VM from Hypervisor !
[ 1526.483047] vhm: failed to create VM from Hypervisor !
[ 1526.983377] vhm: failed to create VM from Hypervisor !
[ 1527.483702] vhm: failed to create VM from Hypervisor !
[ 1527.984028] vhm: failed to create VM from Hypervisor !
[ 1528.484363] vhm: failed to create VM from Hypervisor !
[ 1528.984686] vhm: failed to create VM from Hypervisor !
[ 1529.485021] vhm: failed to create VM from Hypervisor !
[ 1529.985346] vhm: failed to create VM from Hypervisor !
[ 1530.485672] vhm: failed to create VM from Hypervisor !
failed to create VM hard_rtvm 
vm_create failed
[ 1530.994415] vhm: freed vm

Thanks!

ZS

 

 


siming
 

thanks for the responds.I did the dd comond in the acrn boot. 
After I install the service VM with./acrn_quick_setup.sh ,I cannot boot into Clear-linux-native-5.5.11-922. The HDMI is nothing out when I choose this.
    Clear Linux OS(acrn)
    Clear Linux OS(Clear-linux-iot-lts2018-sos-4.19.97-104)
    Clear Linux OS(Clear-linux-native-5.5.11-922)
Did I miss something in the set up of the service vm?
thanks

在 2020-07-31 12:58:21,"Liu, Fuzhong" <fuzhong.liu@...> 写道:

Hi

The dd issue is for acrn boot or native boot?

Please  boot into native and try it again.

Thanks!

 

BR.

Fuzhong

From: acrn-users@... <acrn-users@...> On Behalf Of siming
Sent: Friday, July 31, 2020 11:34 AM
To: acrn-users@...
Subject: [acrn-users] GPT ERROR when write preempt img to sata on NUC7i5BNB

 

Hi,

    My board is NUC7i5BNB, with two disks: an NVMe disk for the Clear Linux-based Service VM and a SATA disk for the RTVM.Accoring to https://projectacrn.github.io/1.6/getting-started/rt_industry.html#install-and-launch-the-preempt-rt-vmwhen I write preempt img to sata, there is always have gpt errors. I have chaged another sata disk, but it's the same error.

root@nuc-acrn /home/acrn # dd if=./preempt-rt-32680.img of=/dev/sda bs=4M oflag=sync status=progress iflag=fullblock seek=0 conv=notrunc
9122611200 bytes (9.1 GB, 8.5 GiB) copied, 124 s, 73.5 MB/s
2186+1 records in
2186+1 records out 
9169755648 bytes (9.2 GB, 8.5 GiB) copied, 126.281 s, 72.6 MB/s
[  171.967643] GPT:Primary header thinks Alt. header is not at the end of the disk.
[  171.967982] GPT:17909678 != 234441647
[  171.968146] GPT:Alternate GPT header not at the end of the disk.
[  171.968406] GPT:17909678 != 234441647
[  171.968616] GPT: Use GNU Parted to correct GPT errors.
[  171.968864]  sda: sda1 sda2 sda3

then I run the launch_hard_rt_vm.sh, it cannot create VM from Hypervisor.

root@nuc-acrn /home/acrn # ./launch_hard_rt_vm.sh
cpu1 online=1 
[ 1525.901370] smpboot: CPU 1 is now offline
[ 1525.902204] vhm: try to offline cpu 1 with lapicid 2
cpu2 online=1 
[ 1525.916019] smpboot: CPU 2 is now offline
[ 1525.917264] vhm: try to offline cpu 2 with lapicid 1
cpu3 online=1 
[ 1525.929538] smpboot: CPU 3 is now offline
[ 1525.930969] vhm: try to offline cpu 3 with lapicid 3
[ 1525.935378] ata1.00: disabled
[ 1525.938524] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[ 1525.939206] sd 0:0:0:0: [sda] Synchronize Cache(10) failed: Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1525.941643] sd 0:0:0:0: [sda] Stopping disk
[ 1525.941888] sd 0:0:0:0: [sda] Start/Stop Unit failed: Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1525.956762] pci-stub 0000:00:17.0: claimed by stub
pm by vuart node-index = 1 
SW_LOAD: get ovmf path /usr/share/acrn/bios/OVMF.fd, size 0x200000 
vm_create: hard_rtvm 
[ 1525.981345] vhm_dev_open: opening device node
VHM api version 1.0 
[ 1525.982333] vhm: failed to create VM from Hypervisor !
[ 1526.483047] vhm: failed to create VM from Hypervisor !
[ 1526.983377] vhm: failed to create VM from Hypervisor !
[ 1527.483702] vhm: failed to create VM from Hypervisor !
[ 1527.984028] vhm: failed to create VM from Hypervisor !
[ 1528.484363] vhm: failed to create VM from Hypervisor !
[ 1528.984686] vhm: failed to create VM from Hypervisor !
[ 1529.485021] vhm: failed to create VM from Hypervisor !
[ 1529.985346] vhm: failed to create VM from Hypervisor !
[ 1530.485672] vhm: failed to create VM from Hypervisor !
failed to create VM hard_rtvm 
vm_create failed
[ 1530.994415] vhm: freed vm

Thanks!

ZS

 

 



 


Liu, Fuzhong
 

Please set boot order to Built-in shell;

then type fs1: ENTER

cd EFI/BOOT ENTER

run BOOTX64.EFI

It will boot from native.

 

BR.

Fuzhong

From: acrn-users@... <acrn-users@...> On Behalf Of siming
Sent: Friday, July 31, 2020 2:10 PM
To: acrn-users@...
Subject: Re: [acrn-users] GPT ERROR when write preempt img to sata on NUC7i5BNB

 

thanks for the responds.I did the dd comond in the acrn boot. 

After I install the service VM with./acrn_quick_setup.sh ,I cannot boot into Clear-linux-native-5.5.11-922. The HDMI is nothing out when I choose this.

    Clear Linux OS(acrn)

    Clear Linux OS(Clear-linux-iot-lts2018-sos-4.19.97-104)

    Clear Linux OS(Clear-linux-native-5.5.11-922)

Did I miss something in the set up of the service vm?

thanks

 

2020-07-31 12:58:21"Liu, Fuzhong" <fuzhong.liu@...> 写道:

Hi

The dd issue is for acrn boot or native boot?

Please  boot into native and try it again.

Thanks!

 

BR.

Fuzhong

From: acrn-users@... <acrn-users@...> On Behalf Of siming
Sent: Friday, July 31, 2020 11:34 AM
To: acrn-users@...
Subject: [acrn-users] GPT ERROR when write preempt img to sata on NUC7i5BNB

 

Hi,

    My board is NUC7i5BNB, with two disks: an NVMe disk for the Clear Linux-based Service VM and a SATA disk for the RTVM.Accoring to https://projectacrn.github.io/1.6/getting-started/rt_industry.html#install-and-launch-the-preempt-rt-vmwhen I write preempt img to sata, there is always have gpt errors. I have chaged another sata disk, but it's the same error.

root@nuc-acrn /home/acrn # dd if=./preempt-rt-32680.img of=/dev/sda bs=4M oflag=sync status=progress iflag=fullblock seek=0 conv=notrunc
9122611200 bytes (9.1 GB, 8.5 GiB) copied, 124 s, 73.5 MB/s
2186+1 records in
2186+1 records out 
9169755648 bytes (9.2 GB, 8.5 GiB) copied, 126.281 s, 72.6 MB/s
[  171.967643] GPT:Primary header thinks Alt. header is not at the end of the disk.
[  171.967982] GPT:17909678 != 234441647
[  171.968146] GPT:Alternate GPT header not at the end of the disk.
[  171.968406] GPT:17909678 != 234441647
[  171.968616] GPT: Use GNU Parted to correct GPT errors.
[  171.968864]  sda: sda1 sda2 sda3

then I run the launch_hard_rt_vm.sh, it cannot create VM from Hypervisor.

root@nuc-acrn /home/acrn # ./launch_hard_rt_vm.sh
cpu1 online=1 
[ 1525.901370] smpboot: CPU 1 is now offline
[ 1525.902204] vhm: try to offline cpu 1 with lapicid 2
cpu2 online=1 
[ 1525.916019] smpboot: CPU 2 is now offline
[ 1525.917264] vhm: try to offline cpu 2 with lapicid 1
cpu3 online=1 
[ 1525.929538] smpboot: CPU 3 is now offline
[ 1525.930969] vhm: try to offline cpu 3 with lapicid 3
[ 1525.935378] ata1.00: disabled
[ 1525.938524] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[ 1525.939206] sd 0:0:0:0: [sda] Synchronize Cache(10) failed: Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1525.941643] sd 0:0:0:0: [sda] Stopping disk
[ 1525.941888] sd 0:0:0:0: [sda] Start/Stop Unit failed: Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1525.956762] pci-stub 0000:00:17.0: claimed by stub
pm by vuart node-index = 1 
SW_LOAD: get ovmf path /usr/share/acrn/bios/OVMF.fd, size 0x200000 
vm_create: hard_rtvm 
[ 1525.981345] vhm_dev_open: opening device node
VHM api version 1.0 
[ 1525.982333] vhm: failed to create VM from Hypervisor !
[ 1526.483047] vhm: failed to create VM from Hypervisor !
[ 1526.983377] vhm: failed to create VM from Hypervisor !
[ 1527.483702] vhm: failed to create VM from Hypervisor !
[ 1527.984028] vhm: failed to create VM from Hypervisor !
[ 1528.484363] vhm: failed to create VM from Hypervisor !
[ 1528.984686] vhm: failed to create VM from Hypervisor !
[ 1529.485021] vhm: failed to create VM from Hypervisor !
[ 1529.985346] vhm: failed to create VM from Hypervisor !
[ 1530.485672] vhm: failed to create VM from Hypervisor !
failed to create VM hard_rtvm 
vm_create failed
[ 1530.994415] vhm: freed vm

Thanks!

ZS

 

 

 

 


siming
 

thanks for the direction, the dd commond works fine in the native boot, but the launch rt vm still failed (in acrn boot).

I tried two way to launch the vm, the difference is "-s 2 " of the acrn-dm.
# diff launch_hard_rt_vm1.sh launch_hard_rt_vm2.sh 
<    -s 2,passthru,00/17/0 \
---
>    -s 2,virtio-blk,/dev/sda \

launch_hard_rt_vm1.sh error log:
modify_bar_registration: bypass for pci-passthru 0:2.0
[   41.557774] Unknown IOCTL 0x43000055
pci passthru init failed
mngr_client_new: Failed to accept from fd 35, err: Invalid argument
Stop listening 35...
Stop polling 35...
Unable to init vdev (22)

launch_hard_rt_vm2.sh error log:
polling 35...
pci init hostbridge
pci init virtio-blk
acrn-dm: Could not open backing file: /dev/sdaListening 35...
: No such file or directory
Could not open backing filepci virtio-blk init failed
mngr_client_new: Failed to accept from fd 35, err: Invalid argument
Stop listening 35...

my sata info:
$ lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda           8:0    0 111.8G  0 disk 
├─sda1        8:1    0   510M  0 part 
├─sda2        8:2    0    33M  0 part 
└─sda3        8:3    0     8G  0 part 
nvme0n1     259:0    0 238.5G  0 disk 
├─nvme0n1p1 259:1    0   142M  0 part 
├─nvme0n1p2 259:2    0   244M  0 part [SWAP]
└─nvme0n1p3 259:3    0 238.1G  0 part /
$ lspci -nn | grep SATA

00:17.0 SATA controller [0106]: Intel Corporation Sunrise Point-LP SATA Controller [AHCI mode] [8086:9d03] (rev 21)


The attachment is the error logs and the launch script. 


Best Regards


在 2020-07-31 15:47:15,"Liu, Fuzhong" <fuzhong.liu@...> 写道:

Please set boot order to Built-in shell;

then type fs1: ENTER

cd EFI/BOOT ENTER

run BOOTX64.EFI

It will boot from native.

 

BR.

Fuzhong

From: acrn-users@... <acrn-users@...> On Behalf Of siming
Sent: Friday, July 31, 2020 2:10 PM
To: acrn-users@...
Subject: Re: [acrn-users] GPT ERROR when write preempt img to sata on NUC7i5BNB

 

thanks for the responds.I did the dd comond in the acrn boot. 

After I install the service VM with./acrn_quick_setup.sh ,I cannot boot into Clear-linux-native-5.5.11-922. The HDMI is nothing out when I choose this.

    Clear Linux OS(acrn)

    Clear Linux OS(Clear-linux-iot-lts2018-sos-4.19.97-104)

    Clear Linux OS(Clear-linux-native-5.5.11-922)

Did I miss something in the set up of the service vm?

thanks

 

2020-07-31 12:58:21"Liu, Fuzhong" <fuzhong.liu@...> 写道:

Hi

The dd issue is for acrn boot or native boot?

Please  boot into native and try it again.

Thanks!

 

BR.

Fuzhong

From: acrn-users@... <acrn-users@...> On Behalf Of siming
Sent: Friday, July 31, 2020 11:34 AM
To: acrn-users@...
Subject: [acrn-users] GPT ERROR when write preempt img to sata on NUC7i5BNB

 

Hi,

    My board is NUC7i5BNB, with two disks: an NVMe disk for the Clear Linux-based Service VM and a SATA disk for the RTVM.Accoring to https://projectacrn.github.io/1.6/getting-started/rt_industry.html#install-and-launch-the-preempt-rt-vmwhen I write preempt img to sata, there is always have gpt errors. I have chaged another sata disk, but it's the same error.

root@nuc-acrn /home/acrn # dd if=./preempt-rt-32680.img of=/dev/sda bs=4M oflag=sync status=progress iflag=fullblock seek=0 conv=notrunc
9122611200 bytes (9.1 GB, 8.5 GiB) copied, 124 s, 73.5 MB/s
2186+1 records in
2186+1 records out 
9169755648 bytes (9.2 GB, 8.5 GiB) copied, 126.281 s, 72.6 MB/s
[  171.967643] GPT:Primary header thinks Alt. header is not at the end of the disk.
[  171.967982] GPT:17909678 != 234441647
[  171.968146] GPT:Alternate GPT header not at the end of the disk.
[  171.968406] GPT:17909678 != 234441647
[  171.968616] GPT: Use GNU Parted to correct GPT errors.
[  171.968864]  sda: sda1 sda2 sda3

then I run the launch_hard_rt_vm.sh, it cannot create VM from Hypervisor.

root@nuc-acrn /home/acrn # ./launch_hard_rt_vm.sh
cpu1 online=1 
[ 1525.901370] smpboot: CPU 1 is now offline
[ 1525.902204] vhm: try to offline cpu 1 with lapicid 2
cpu2 online=1 
[ 1525.916019] smpboot: CPU 2 is now offline
[ 1525.917264] vhm: try to offline cpu 2 with lapicid 1
cpu3 online=1 
[ 1525.929538] smpboot: CPU 3 is now offline
[ 1525.930969] vhm: try to offline cpu 3 with lapicid 3
[ 1525.935378] ata1.00: disabled
[ 1525.938524] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[ 1525.939206] sd 0:0:0:0: [sda] Synchronize Cache(10) failed: Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1525.941643] sd 0:0:0:0: [sda] Stopping disk
[ 1525.941888] sd 0:0:0:0: [sda] Start/Stop Unit failed: Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1525.956762] pci-stub 0000:00:17.0: claimed by stub
pm by vuart node-index = 1 
SW_LOAD: get ovmf path /usr/share/acrn/bios/OVMF.fd, size 0x200000 
vm_create: hard_rtvm 
[ 1525.981345] vhm_dev_open: opening device node
VHM api version 1.0 
[ 1525.982333] vhm: failed to create VM from Hypervisor !
[ 1526.483047] vhm: failed to create VM from Hypervisor !
[ 1526.983377] vhm: failed to create VM from Hypervisor !
[ 1527.483702] vhm: failed to create VM from Hypervisor !
[ 1527.984028] vhm: failed to create VM from Hypervisor !
[ 1528.484363] vhm: failed to create VM from Hypervisor !
[ 1528.984686] vhm: failed to create VM from Hypervisor !
[ 1529.485021] vhm: failed to create VM from Hypervisor !
[ 1529.985346] vhm: failed to create VM from Hypervisor !
[ 1530.485672] vhm: failed to create VM from Hypervisor !
failed to create VM hard_rtvm 
vm_create failed
[ 1530.994415] vhm: freed vm

Thanks!

ZS

 

 

 

 



 


Liu, Fuzhong
 

Hi

Could you please double check if it can native boot from sda?

  1. set boot order to Built-in shell;
  2. type fs0: ENTER
  3. cd EFI/BOOT ENTER
  4. run BOOTX64.EFI

BR.

Fuzhong

 

 

From: acrn-users@... <acrn-users@...> On Behalf Of siming
Sent: Saturday, August 1, 2020 9:50 AM
To: acrn-users@...
Subject: Re: [acrn-users] GPT ERROR when write preempt img to sata on NUC7i5BNB

 

thanks for the direction, the dd commond works fine in the native boot, but the launch rt vm still failed (in acrn boot).

I tried two way to launch the vm, the difference is "-s 2 " of the acrn-dm.

# diff launch_hard_rt_vm1.sh launch_hard_rt_vm2.sh 

<    -s 2,passthru,00/17/0 \

---

>    -s 2,virtio-blk,/dev/sda \

 

launch_hard_rt_vm1.sh error log:

modify_bar_registration: bypass for pci-passthru 0:2.0

[   41.557774] Unknown IOCTL 0x43000055

pci passthru init failed

mngr_client_new: Failed to accept from fd 35, err: Invalid argument

Stop listening 35...

Stop polling 35...

Unable to init vdev (22)

 

launch_hard_rt_vm2.sh error log:

polling 35...

pci init hostbridge

pci init virtio-blk

acrn-dm: Could not open backing file: /dev/sdaListening 35...

: No such file or directory

Could not open backing filepci virtio-blk init failed

mngr_client_new: Failed to accept from fd 35, err: Invalid argument

Stop listening 35...

 

my sata info:

$ lsblk

NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT

sda           8:0    0 111.8G  0 disk 

├─sda1        8:1    0   510M  0 part 

├─sda2        8:2    0    33M  0 part 

└─sda3        8:3    0     8G  0 part 

nvme0n1     259:0    0 238.5G  0 disk 

├─nvme0n1p1 259:1    0   142M  0 part 

├─nvme0n1p2 259:2    0   244M  0 part [SWAP]

└─nvme0n1p3 259:3    0 238.1G  0 part /

$ lspci -nn | grep SATA

00:17.0 SATA controller [0106]: Intel Corporation Sunrise Point-LP SATA Controller [AHCI mode] [8086:9d03] (rev 21)

 

The attachment is the error logs and the launch script. 

 

Best Regards

 

2020-07-31 15:47:15"Liu, Fuzhong" <fuzhong.liu@...> 写道:

Please set boot order to Built-in shell;

then type fs1: ENTER

cd EFI/BOOT ENTER

run BOOTX64.EFI

It will boot from native.

 

BR.

Fuzhong

From: acrn-users@... <acrn-users@...> On Behalf Of siming
Sent: Friday, July 31, 2020 2:10 PM
To: acrn-users@...
Subject: Re: [acrn-users] GPT ERROR when write preempt img to sata on NUC7i5BNB

 

thanks for the responds.I did the dd comond in the acrn boot. 

After I install the service VM with./acrn_quick_setup.sh ,I cannot boot into Clear-linux-native-5.5.11-922. The HDMI is nothing out when I choose this.

    Clear Linux OS(acrn)

    Clear Linux OS(Clear-linux-iot-lts2018-sos-4.19.97-104)

    Clear Linux OS(Clear-linux-native-5.5.11-922)

Did I miss something in the set up of the service vm?

thanks

 

2020-07-31 12:58:21"Liu, Fuzhong" <fuzhong.liu@...> 写道:

Hi

The dd issue is for acrn boot or native boot?

Please  boot into native and try it again.

Thanks!

 

BR.

Fuzhong

From: acrn-users@... <acrn-users@...> On Behalf Of siming
Sent: Friday, July 31, 2020 11:34 AM
To: acrn-users@...
Subject: [acrn-users] GPT ERROR when write preempt img to sata on NUC7i5BNB

 

Hi,

    My board is NUC7i5BNB, with two disks: an NVMe disk for the Clear Linux-based Service VM and a SATA disk for the RTVM.Accoring to https://projectacrn.github.io/1.6/getting-started/rt_industry.html#install-and-launch-the-preempt-rt-vmwhen I write preempt img to sata, there is always have gpt errors. I have chaged another sata disk, but it's the same error.

root@nuc-acrn /home/acrn # dd if=./preempt-rt-32680.img of=/dev/sda bs=4M oflag=sync status=progress iflag=fullblock seek=0 conv=notrunc
9122611200 bytes (9.1 GB, 8.5 GiB) copied, 124 s, 73.5 MB/s
2186+1 records in
2186+1 records out 
9169755648 bytes (9.2 GB, 8.5 GiB) copied, 126.281 s, 72.6 MB/s
[  171.967643] GPT:Primary header thinks Alt. header is not at the end of the disk.
[  171.967982] GPT:17909678 != 234441647
[  171.968146] GPT:Alternate GPT header not at the end of the disk.
[  171.968406] GPT:17909678 != 234441647
[  171.968616] GPT: Use GNU Parted to correct GPT errors.
[  171.968864]  sda: sda1 sda2 sda3

then I run the launch_hard_rt_vm.sh, it cannot create VM from Hypervisor.

root@nuc-acrn /home/acrn # ./launch_hard_rt_vm.sh
cpu1 online=1 
[ 1525.901370] smpboot: CPU 1 is now offline
[ 1525.902204] vhm: try to offline cpu 1 with lapicid 2
cpu2 online=1 
[ 1525.916019] smpboot: CPU 2 is now offline
[ 1525.917264] vhm: try to offline cpu 2 with lapicid 1
cpu3 online=1 
[ 1525.929538] smpboot: CPU 3 is now offline
[ 1525.930969] vhm: try to offline cpu 3 with lapicid 3
[ 1525.935378] ata1.00: disabled
[ 1525.938524] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[ 1525.939206] sd 0:0:0:0: [sda] Synchronize Cache(10) failed: Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1525.941643] sd 0:0:0:0: [sda] Stopping disk
[ 1525.941888] sd 0:0:0:0: [sda] Start/Stop Unit failed: Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1525.956762] pci-stub 0000:00:17.0: claimed by stub
pm by vuart node-index = 1 
SW_LOAD: get ovmf path /usr/share/acrn/bios/OVMF.fd, size 0x200000 
vm_create: hard_rtvm 
[ 1525.981345] vhm_dev_open: opening device node
VHM api version 1.0 
[ 1525.982333] vhm: failed to create VM from Hypervisor !
[ 1526.483047] vhm: failed to create VM from Hypervisor !
[ 1526.983377] vhm: failed to create VM from Hypervisor !
[ 1527.483702] vhm: failed to create VM from Hypervisor !
[ 1527.984028] vhm: failed to create VM from Hypervisor !
[ 1528.484363] vhm: failed to create VM from Hypervisor !
[ 1528.984686] vhm: failed to create VM from Hypervisor !
[ 1529.485021] vhm: failed to create VM from Hypervisor !
[ 1529.985346] vhm: failed to create VM from Hypervisor !
[ 1530.485672] vhm: failed to create VM from Hypervisor !
failed to create VM hard_rtvm 
vm_create failed
[ 1530.994415] vhm: freed vm

Thanks!

ZS

 

 

 

 

 

 


siming
 

I have boot from sata by choose sata in the boot menu:
UEFI:SATA PORT 0 : OS Bootloader
the systen works well, system info :
root@clr-preempt-rt~#: uname -a
Linux clr-preempt-rt 4.19.94-20.iot-lts2018-preempt-rt #1 SMP PREEMPT RT Thu Jan 23 15:05:47 PST 2020 x86_64 GNU/Linux




在 2020-08-03 07:10:44,"Liu, Fuzhong" <fuzhong.liu@...> 写道:

Hi

Could you please double check if it can native boot from sda?

  1. set boot order to Built-in shell;
  2. type fs0: ENTER
  3. cd EFI/BOOT ENTER
  4. run BOOTX64.EFI

BR.

Fuzhong

 

 

From: acrn-users@... <acrn-users@...> On Behalf Of siming
Sent: Saturday, August 1, 2020 9:50 AM
To: acrn-users@...
Subject: Re: [acrn-users] GPT ERROR when write preempt img to sata on NUC7i5BNB

 

thanks for the direction, the dd commond works fine in the native boot, but the launch rt vm still failed (in acrn boot).

I tried two way to launch the vm, the difference is "-s 2 " of the acrn-dm.

# diff launch_hard_rt_vm1.sh launch_hard_rt_vm2.sh 

<    -s 2,passthru,00/17/0 \

---

>    -s 2,virtio-blk,/dev/sda \

 

launch_hard_rt_vm1.sh error log:

modify_bar_registration: bypass for pci-passthru 0:2.0

[   41.557774] Unknown IOCTL 0x43000055

pci passthru init failed

mngr_client_new: Failed to accept from fd 35, err: Invalid argument

Stop listening 35...

Stop polling 35...

Unable to init vdev (22)

 

launch_hard_rt_vm2.sh error log:

polling 35...

pci init hostbridge

pci init virtio-blk

acrn-dm: Could not open backing file: /dev/sdaListening 35...

: No such file or directory

Could not open backing filepci virtio-blk init failed

mngr_client_new: Failed to accept from fd 35, err: Invalid argument

Stop listening 35...

 

my sata info:

$ lsblk

NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT

sda           8:0    0 111.8G  0 disk 

├─sda1        8:1    0   510M  0 part 

├─sda2        8:2    0    33M  0 part 

└─sda3        8:3    0     8G  0 part 

nvme0n1     259:0    0 238.5G  0 disk 

├─nvme0n1p1 259:1    0   142M  0 part 

├─nvme0n1p2 259:2    0   244M  0 part [SWAP]

└─nvme0n1p3 259:3    0 238.1G  0 part /

$ lspci -nn | grep SATA

00:17.0 SATA controller [0106]: Intel Corporation Sunrise Point-LP SATA Controller [AHCI mode] [8086:9d03] (rev 21)

 

The attachment is the error logs and the launch script. 

 

Best Regards

 

2020-07-31 15:47:15"Liu, Fuzhong" <fuzhong.liu@...> 写道:

Please set boot order to Built-in shell;

then type fs1: ENTER

cd EFI/BOOT ENTER

run BOOTX64.EFI

It will boot from native.

 

BR.

Fuzhong

From: acrn-users@... <acrn-users@...> On Behalf Of siming
Sent: Friday, July 31, 2020 2:10 PM
To: acrn-users@...
Subject: Re: [acrn-users] GPT ERROR when write preempt img to sata on NUC7i5BNB

 

thanks for the responds.I did the dd comond in the acrn boot. 

After I install the service VM with./acrn_quick_setup.sh ,I cannot boot into Clear-linux-native-5.5.11-922. The HDMI is nothing out when I choose this.

    Clear Linux OS(acrn)

    Clear Linux OS(Clear-linux-iot-lts2018-sos-4.19.97-104)

    Clear Linux OS(Clear-linux-native-5.5.11-922)

Did I miss something in the set up of the service vm?

thanks

 

2020-07-31 12:58:21"Liu, Fuzhong" <fuzhong.liu@...> 写道:

Hi

The dd issue is for acrn boot or native boot?

Please  boot into native and try it again.

Thanks!

 

BR.

Fuzhong

From: acrn-users@... <acrn-users@...> On Behalf Of siming
Sent: Friday, July 31, 2020 11:34 AM
To: acrn-users@...
Subject: [acrn-users] GPT ERROR when write preempt img to sata on NUC7i5BNB

 

Hi,

    My board is NUC7i5BNB, with two disks: an NVMe disk for the Clear Linux-based Service VM and a SATA disk for the RTVM.Accoring to https://projectacrn.github.io/1.6/getting-started/rt_industry.html#install-and-launch-the-preempt-rt-vmwhen I write preempt img to sata, there is always have gpt errors. I have chaged another sata disk, but it's the same error.

root@nuc-acrn /home/acrn # dd if=./preempt-rt-32680.img of=/dev/sda bs=4M oflag=sync status=progress iflag=fullblock seek=0 conv=notrunc
9122611200 bytes (9.1 GB, 8.5 GiB) copied, 124 s, 73.5 MB/s
2186+1 records in
2186+1 records out 
9169755648 bytes (9.2 GB, 8.5 GiB) copied, 126.281 s, 72.6 MB/s
[  171.967643] GPT:Primary header thinks Alt. header is not at the end of the disk.
[  171.967982] GPT:17909678 != 234441647
[  171.968146] GPT:Alternate GPT header not at the end of the disk.
[  171.968406] GPT:17909678 != 234441647
[  171.968616] GPT: Use GNU Parted to correct GPT errors.
[  171.968864]  sda: sda1 sda2 sda3

then I run the launch_hard_rt_vm.sh, it cannot create VM from Hypervisor.

root@nuc-acrn /home/acrn # ./launch_hard_rt_vm.sh
cpu1 online=1 
[ 1525.901370] smpboot: CPU 1 is now offline
[ 1525.902204] vhm: try to offline cpu 1 with lapicid 2
cpu2 online=1 
[ 1525.916019] smpboot: CPU 2 is now offline
[ 1525.917264] vhm: try to offline cpu 2 with lapicid 1
cpu3 online=1 
[ 1525.929538] smpboot: CPU 3 is now offline
[ 1525.930969] vhm: try to offline cpu 3 with lapicid 3
[ 1525.935378] ata1.00: disabled
[ 1525.938524] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[ 1525.939206] sd 0:0:0:0: [sda] Synchronize Cache(10) failed: Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1525.941643] sd 0:0:0:0: [sda] Stopping disk
[ 1525.941888] sd 0:0:0:0: [sda] Start/Stop Unit failed: Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1525.956762] pci-stub 0000:00:17.0: claimed by stub
pm by vuart node-index = 1 
SW_LOAD: get ovmf path /usr/share/acrn/bios/OVMF.fd, size 0x200000 
vm_create: hard_rtvm 
[ 1525.981345] vhm_dev_open: opening device node
VHM api version 1.0 
[ 1525.982333] vhm: failed to create VM from Hypervisor !
[ 1526.483047] vhm: failed to create VM from Hypervisor !
[ 1526.983377] vhm: failed to create VM from Hypervisor !
[ 1527.483702] vhm: failed to create VM from Hypervisor !
[ 1527.984028] vhm: failed to create VM from Hypervisor !
[ 1528.484363] vhm: failed to create VM from Hypervisor !
[ 1528.984686] vhm: failed to create VM from Hypervisor !
[ 1529.485021] vhm: failed to create VM from Hypervisor !
[ 1529.985346] vhm: failed to create VM from Hypervisor !
[ 1530.485672] vhm: failed to create VM from Hypervisor !
failed to create VM hard_rtvm 
vm_create failed
[ 1530.994415] vhm: freed vm

Thanks!

ZS

 

 

 

 

 

 



 


Yin, Fengwei <fengwei.yin@...>
 

Hi Siming,

I suppose you need passthru the SATA controller to your second VM. Not using virtio block

based /dev/sda.


Regards
Yin, Fengwei
------------------------------------

On 8/3/20 8:52 AM, siming wrote:

I have boot from sata by choose sata in the boot menu:
UEFI:SATA PORT 0 : OS Bootloader
the systen works well, system info :
root@clr-preempt-rt~#: uname -a
Linux clr-preempt-rt 4.19.94-20.iot-lts2018-preempt-rt #1 SMP PREEMPT RT Thu Jan 23 15:05:47 PST 2020 x86_64 GNU/Linux




在 2020-08-03 07:10:44,"Liu, Fuzhong" <fuzhong.liu@...> 写道:

Hi

Could you please double check if it can native boot from sda?

  1. set boot order to Built-in shell;
  2. type fs0: ENTER
  3. cd EFI/BOOT ENTER
  4. run BOOTX64.EFI

BR.

Fuzhong

 

 

From: acrn-users@... <acrn-users@...> On Behalf Of siming
Sent: Saturday, August 1, 2020 9:50 AM
To: acrn-users@...
Subject: Re: [acrn-users] GPT ERROR when write preempt img to sata on NUC7i5BNB

 

thanks for the direction, the dd commond works fine in the native boot, but the launch rt vm still failed (in acrn boot).

I tried two way to launch the vm, the difference is "-s 2 " of the acrn-dm.

# diff launch_hard_rt_vm1.sh launch_hard_rt_vm2.sh 

<    -s 2,passthru,00/17/0 \

---

>    -s 2,virtio-blk,/dev/sda \

 

launch_hard_rt_vm1.sh error log:

modify_bar_registration: bypass for pci-passthru 0:2.0

[   41.557774] Unknown IOCTL 0x43000055

pci passthru init failed

mngr_client_new: Failed to accept from fd 35, err: Invalid argument

Stop listening 35...

Stop polling 35...

Unable to init vdev (22)

 

launch_hard_rt_vm2.sh error log:

polling 35...

pci init hostbridge

pci init virtio-blk

acrn-dm: Could not open backing file: /dev/sdaListening 35...

: No such file or directory

Could not open backing filepci virtio-blk init failed

mngr_client_new: Failed to accept from fd 35, err: Invalid argument

Stop listening 35...

 

my sata info:

$ lsblk

NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT

sda           8:0    0 111.8G  0 disk 

├─sda1        8:1    0   510M  0 part 

├─sda2        8:2    0    33M  0 part 

└─sda3        8:3    0     8G  0 part 

nvme0n1     259:0    0 238.5G  0 disk 

├─nvme0n1p1 259:1    0   142M  0 part 

├─nvme0n1p2 259:2    0   244M  0 part [SWAP]

└─nvme0n1p3 259:3    0 238.1G  0 part /

$ lspci -nn | grep SATA

00:17.0 SATA controller [0106]: Intel Corporation Sunrise Point-LP SATA Controller [AHCI mode] [8086:9d03] (rev 21)

 

The attachment is the error logs and the launch script. 

 

Best Regards

 

2020-07-31 15:47:15"Liu, Fuzhong" <fuzhong.liu@...> 写道:

Please set boot order to Built-in shell;

then type fs1: ENTER

cd EFI/BOOT ENTER

run BOOTX64.EFI

It will boot from native.

 

BR.

Fuzhong

From: acrn-users@... <acrn-users@...> On Behalf Of siming
Sent: Friday, July 31, 2020 2:10 PM
To: acrn-users@...
Subject: Re: [acrn-users] GPT ERROR when write preempt img to sata on NUC7i5BNB

 

thanks for the responds.I did the dd comond in the acrn boot. 

After I install the service VM with./acrn_quick_setup.sh ,I cannot boot into Clear-linux-native-5.5.11-922. The HDMI is nothing out when I choose this.

    Clear Linux OS(acrn)

    Clear Linux OS(Clear-linux-iot-lts2018-sos-4.19.97-104)

    Clear Linux OS(Clear-linux-native-5.5.11-922)

Did I miss something in the set up of the service vm?

thanks

 

2020-07-31 12:58:21"Liu, Fuzhong" <fuzhong.liu@...> 写道:

Hi

The dd issue is for acrn boot or native boot?

Please  boot into native and try it again.

Thanks!

 

BR.

Fuzhong

From: acrn-users@... <acrn-users@...> On Behalf Of siming
Sent: Friday, July 31, 2020 11:34 AM
To: acrn-users@...
Subject: [acrn-users] GPT ERROR when write preempt img to sata on NUC7i5BNB

 

Hi,

    My board is NUC7i5BNB, with two disks: an NVMe disk for the Clear Linux-based Service VM and a SATA disk for the RTVM.Accoring to https://projectacrn.github.io/1.6/getting-started/rt_industry.html#install-and-launch-the-preempt-rt-vmwhen I write preempt img to sata, there is always have gpt errors. I have chaged another sata disk, but it's the same error.

root@nuc-acrn /home/acrn # dd if=./preempt-rt-32680.img of=/dev/sda bs=4M oflag=sync status=progress iflag=fullblock seek=0 conv=notrunc
9122611200 bytes (9.1 GB, 8.5 GiB) copied, 124 s, 73.5 MB/s
2186+1 records in
2186+1 records out 
9169755648 bytes (9.2 GB, 8.5 GiB) copied, 126.281 s, 72.6 MB/s
[  171.967643] GPT:Primary header thinks Alt. header is not at the end of the disk.
[  171.967982] GPT:17909678 != 234441647
[  171.968146] GPT:Alternate GPT header not at the end of the disk.
[  171.968406] GPT:17909678 != 234441647
[  171.968616] GPT: Use GNU Parted to correct GPT errors.
[  171.968864]  sda: sda1 sda2 sda3

then I run the launch_hard_rt_vm.sh, it cannot create VM from Hypervisor.

root@nuc-acrn /home/acrn # ./launch_hard_rt_vm.sh
cpu1 online=1 
[ 1525.901370] smpboot: CPU 1 is now offline
[ 1525.902204] vhm: try to offline cpu 1 with lapicid 2
cpu2 online=1 
[ 1525.916019] smpboot: CPU 2 is now offline
[ 1525.917264] vhm: try to offline cpu 2 with lapicid 1
cpu3 online=1 
[ 1525.929538] smpboot: CPU 3 is now offline
[ 1525.930969] vhm: try to offline cpu 3 with lapicid 3
[ 1525.935378] ata1.00: disabled
[ 1525.938524] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[ 1525.939206] sd 0:0:0:0: [sda] Synchronize Cache(10) failed: Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1525.941643] sd 0:0:0:0: [sda] Stopping disk
[ 1525.941888] sd 0:0:0:0: [sda] Start/Stop Unit failed: Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1525.956762] pci-stub 0000:00:17.0: claimed by stub
pm by vuart node-index = 1 
SW_LOAD: get ovmf path /usr/share/acrn/bios/OVMF.fd, size 0x200000 
vm_create: hard_rtvm 
[ 1525.981345] vhm_dev_open: opening device node
VHM api version 1.0 
[ 1525.982333] vhm: failed to create VM from Hypervisor !
[ 1526.483047] vhm: failed to create VM from Hypervisor !
[ 1526.983377] vhm: failed to create VM from Hypervisor !
[ 1527.483702] vhm: failed to create VM from Hypervisor !
[ 1527.984028] vhm: failed to create VM from Hypervisor !
[ 1528.484363] vhm: failed to create VM from Hypervisor !
[ 1528.984686] vhm: failed to create VM from Hypervisor !
[ 1529.485021] vhm: failed to create VM from Hypervisor !
[ 1529.985346] vhm: failed to create VM from Hypervisor !
[ 1530.485672] vhm: failed to create VM from Hypervisor !
failed to create VM hard_rtvm 
vm_create failed
[ 1530.994415] vhm: freed vm

Thanks!

ZS

 

 

 

 

 

 



 


siming
 

Hi Fengwei,
I have tried two ways to boot preempt uos, but no success. There were error logs in the previous email.

<    -s 2,passthru,00/17/0 \

---

>    -s 2,virtio-blk,/dev/sda \


Best Regards.




At 2020-08-03 10:23:11, "Yin, Fengwei" <fengwei.yin@...> wrote:

Hi Siming,

I suppose you need passthru the SATA controller to your second VM. Not using virtio block

based /dev/sda.


Regards
Yin, Fengwei
------------------------------------

On 8/3/20 8:52 AM, siming wrote:
I have boot from sata by choose sata in the boot menu:
UEFI:SATA PORT 0 : OS Bootloader
the systen works well, system info :
root@clr-preempt-rt~#: uname -a
Linux clr-preempt-rt 4.19.94-20.iot-lts2018-preempt-rt #1 SMP PREEMPT RT Thu Jan 23 15:05:47 PST 2020 x86_64 GNU/Linux




在 2020-08-03 07:10:44,"Liu, Fuzhong" <fuzhong.liu@...> 写道:

Hi

Could you please double check if it can native boot from sda?

  1. set boot order to Built-in shell;
  2. type fs0: ENTER
  3. cd EFI/BOOT ENTER
  4. run BOOTX64.EFI

BR.

Fuzhong

 

 

From: acrn-users@... <acrn-users@...> On Behalf Of siming
Sent: Saturday, August 1, 2020 9:50 AM
To: acrn-users@...
Subject: Re: [acrn-users] GPT ERROR when write preempt img to sata on NUC7i5BNB

 

thanks for the direction, the dd commond works fine in the native boot, but the launch rt vm still failed (in acrn boot).

I tried two way to launch the vm, the difference is "-s 2 " of the acrn-dm.

# diff launch_hard_rt_vm1.sh launch_hard_rt_vm2.sh 

<    -s 2,passthru,00/17/0 \

---

>    -s 2,virtio-blk,/dev/sda \

 

launch_hard_rt_vm1.sh error log:

modify_bar_registration: bypass for pci-passthru 0:2.0

[   41.557774] Unknown IOCTL 0x43000055

pci passthru init failed

mngr_client_new: Failed to accept from fd 35, err: Invalid argument

Stop listening 35...

Stop polling 35...

Unable to init vdev (22)

 

launch_hard_rt_vm2.sh error log:

polling 35...

pci init hostbridge

pci init virtio-blk

acrn-dm: Could not open backing file: /dev/sdaListening 35...

: No such file or directory

Could not open backing filepci virtio-blk init failed

mngr_client_new: Failed to accept from fd 35, err: Invalid argument

Stop listening 35...

 

my sata info:

$ lsblk

NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT

sda           8:0    0 111.8G  0 disk 

├─sda1        8:1    0   510M  0 part 

├─sda2        8:2    0    33M  0 part 

└─sda3        8:3    0     8G  0 part 

nvme0n1     259:0    0 238.5G  0 disk 

├─nvme0n1p1 259:1    0   142M  0 part 

├─nvme0n1p2 259:2    0   244M  0 part [SWAP]

└─nvme0n1p3 259:3    0 238.1G  0 part /

$ lspci -nn | grep SATA

00:17.0 SATA controller [0106]: Intel Corporation Sunrise Point-LP SATA Controller [AHCI mode] [8086:9d03] (rev 21)

 

The attachment is the error logs and the launch script. 

 

Best Regards

 

2020-07-31 15:47:15"Liu, Fuzhong" <fuzhong.liu@...> 写道:

Please set boot order to Built-in shell;

then type fs1: ENTER

cd EFI/BOOT ENTER

run BOOTX64.EFI

It will boot from native.

 

BR.

Fuzhong

From: acrn-users@... <acrn-users@...> On Behalf Of siming
Sent: Friday, July 31, 2020 2:10 PM
To: acrn-users@...
Subject: Re: [acrn-users] GPT ERROR when write preempt img to sata on NUC7i5BNB

 

thanks for the responds.I did the dd comond in the acrn boot. 

After I install the service VM with./acrn_quick_setup.sh ,I cannot boot into Clear-linux-native-5.5.11-922. The HDMI is nothing out when I choose this.

    Clear Linux OS(acrn)

    Clear Linux OS(Clear-linux-iot-lts2018-sos-4.19.97-104)

    Clear Linux OS(Clear-linux-native-5.5.11-922)

Did I miss something in the set up of the service vm?

thanks

 

2020-07-31 12:58:21"Liu, Fuzhong" <fuzhong.liu@...> 写道:

Hi

The dd issue is for acrn boot or native boot?

Please  boot into native and try it again.

Thanks!

 

BR.

Fuzhong

From: acrn-users@... <acrn-users@...> On Behalf Of siming
Sent: Friday, July 31, 2020 11:34 AM
To: acrn-users@...
Subject: [acrn-users] GPT ERROR when write preempt img to sata on NUC7i5BNB

 

Hi,

    My board is NUC7i5BNB, with two disks: an NVMe disk for the Clear Linux-based Service VM and a SATA disk for the RTVM.Accoring to https://projectacrn.github.io/1.6/getting-started/rt_industry.html#install-and-launch-the-preempt-rt-vmwhen I write preempt img to sata, there is always have gpt errors. I have chaged another sata disk, but it's the same error.

root@nuc-acrn /home/acrn # dd if=./preempt-rt-32680.img of=/dev/sda bs=4M oflag=sync status=progress iflag=fullblock seek=0 conv=notrunc
9122611200 bytes (9.1 GB, 8.5 GiB) copied, 124 s, 73.5 MB/s
2186+1 records in
2186+1 records out 
9169755648 bytes (9.2 GB, 8.5 GiB) copied, 126.281 s, 72.6 MB/s
[  171.967643] GPT:Primary header thinks Alt. header is not at the end of the disk.
[  171.967982] GPT:17909678 != 234441647
[  171.968146] GPT:Alternate GPT header not at the end of the disk.
[  171.968406] GPT:17909678 != 234441647
[  171.968616] GPT: Use GNU Parted to correct GPT errors.
[  171.968864]  sda: sda1 sda2 sda3

then I run the launch_hard_rt_vm.sh, it cannot create VM from Hypervisor.

root@nuc-acrn /home/acrn # ./launch_hard_rt_vm.sh
cpu1 online=1 
[ 1525.901370] smpboot: CPU 1 is now offline
[ 1525.902204] vhm: try to offline cpu 1 with lapicid 2
cpu2 online=1 
[ 1525.916019] smpboot: CPU 2 is now offline
[ 1525.917264] vhm: try to offline cpu 2 with lapicid 1
cpu3 online=1 
[ 1525.929538] smpboot: CPU 3 is now offline
[ 1525.930969] vhm: try to offline cpu 3 with lapicid 3
[ 1525.935378] ata1.00: disabled
[ 1525.938524] sd 0:0:0:0: [sda] Synchronizing SCSI cache
[ 1525.939206] sd 0:0:0:0: [sda] Synchronize Cache(10) failed: Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1525.941643] sd 0:0:0:0: [sda] Stopping disk
[ 1525.941888] sd 0:0:0:0: [sda] Start/Stop Unit failed: Result: hostbyte=DID_BAD_TARGET driverbyte=DRIVER_OK
[ 1525.956762] pci-stub 0000:00:17.0: claimed by stub
pm by vuart node-index = 1 
SW_LOAD: get ovmf path /usr/share/acrn/bios/OVMF.fd, size 0x200000 
vm_create: hard_rtvm 
[ 1525.981345] vhm_dev_open: opening device node
VHM api version 1.0 
[ 1525.982333] vhm: failed to create VM from Hypervisor !
[ 1526.483047] vhm: failed to create VM from Hypervisor !
[ 1526.983377] vhm: failed to create VM from Hypervisor !
[ 1527.483702] vhm: failed to create VM from Hypervisor !
[ 1527.984028] vhm: failed to create VM from Hypervisor !
[ 1528.484363] vhm: failed to create VM from Hypervisor !
[ 1528.984686] vhm: failed to create VM from Hypervisor !
[ 1529.485021] vhm: failed to create VM from Hypervisor !
[ 1529.985346] vhm: failed to create VM from Hypervisor !
[ 1530.485672] vhm: failed to create VM from Hypervisor !
failed to create VM hard_rtvm 
vm_create failed
[ 1530.994415] vhm: freed vm

Thanks!

ZS

 

 

 

 

 

 



 


Yin, Fengwei <fengwei.yin@...>
 

Hi Siming,

On 8/3/2020 2:23 PM, siming wrote:
Hi Fengwei,
I have tried two ways to boot preempt uos, but no success. There were error logs in the previousemail.
So you saw "pci passthru fail" when you use your launch_hard_rt_vm1.sh?
Could you please share the whole launch_hard_rt_vm1.sh script?

Also the version of acrn hypervisor, acrn-dm and SOS kernel version
could help here. Thanks.


Regards
Yin, Fengwei


<    -s 2,*passthru*,00/17/0 \

---

>    -s 2*,virtio-blk*,/dev/sda \
Best Regards.
At 2020-08-03 10:23:11, "Yin, Fengwei" <fengwei.yin@intel.com> wrote:
Hi Siming,
I suppose you need passthru the SATA controller to your second VM.
Not using virtio block
based /dev/sda.
Regards
Yin, Fengwei
------------------------------------
On 8/3/20 8:52 AM, siming wrote:
I have boot from sata by choose sata in the boot menu:
UEFI:SATA PORT 0 : OS Bootloader
the systen works well, system info :
root@clr-preempt-rt~#: uname -a
Linux clr-preempt-rt 4.19.94-20.iot-lts2018-preempt-rt #1 SMP
PREEMPT RT Thu Jan 23 15:05:47 PST 2020 x86_64 GNU/Linux




在 2020-08-03 07:10:44,"Liu, Fuzhong" <fuzhong.liu@intel.com> 写道:

Hi

Could you please double check if it can native boot from sda?

1. set boot order to Built-in shell;
2. type fs0: ENTER
3. cd EFI/BOOT ENTER
4. run BOOTX64.EFI

BR.

Fuzhong

*From:*acrn-users@lists.projectacrn.org
<acrn-users@lists.projectacrn.org> *On Behalf Of *siming
*Sent:* Saturday, August 1, 2020 9:50 AM
*To:* acrn-users@lists.projectacrn.org
*Subject:* Re: [acrn-users] GPT ERROR when write preempt img
to sata on NUC7i5BNB

thanks for the direction, the dd commond works fine in the
native boot, but the launch rt vm still failed (in acrn boot).

I tried two way to launch the vm, the difference is "-s 2 " of
the acrn-dm.

# diff launch_hard_rt_vm1.sh launch_hard_rt_vm2.sh

<   -s 2,*passthru*,00/17/0 \

---

>   -s 2*,virtio-blk*,/dev/sda \

*launch_hard_rt_vm1.sh error log:*

modify_bar_registration: bypass for pci-passthru 0:2.0

[  41.557774] Unknown IOCTL 0x43000055

pci passthru init failed

mngr_client_new: Failed to accept from fd 35, err: Invalid
argument

Stop listening 35...

Stop polling 35...

Unable to init vdev (22)

*launch_hard_rt_vm2.sh error log:*

polling 35...

pci init hostbridge

pci init virtio-blk

acrn-dm: Could not open backing file: /dev/sdaListening 35...

: No such file or directory

Could not open backing filepci virtio-blk init failed

mngr_client_new: Failed to accept from fd 35, err: Invalid
argument

Stop listening 35...

my sata info:

$ lsblk

NAME       MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT

sda          8:0    0 111.8G  0 disk

├─sda1       8:1    0   510M  0 part

├─sda2       8:2    0    33M  0 part

└─sda3       8:3    0     8G  0 part

nvme0n1    259:0    0 238.5G  0 disk

├─nvme0n1p1 259:1    0   142M  0 part

├─nvme0n1p2 259:2    0   244M  0 part [SWAP]

└─nvme0n1p3 259:3    0 238.1G  0 part /

$ lspci -nn | grep SATA

00:17.0 SATA controller [0106]: Intel Corporation Sunrise
Point-LP SATA Controller [AHCI mode] [8086:9d03] (rev 21)

The attachment is the error logs and the launch script.

Best Regards

在2020-07-31 15:47:15,"Liu, Fuzhong" <fuzhong.liu@intel.com
<mailto:fuzhong.liu@intel.com>> 写道:

Please set boot order to Built-in shell;

then type fs1: ENTER

cd EFI/BOOT ENTER

run BOOTX64.EFI

It will boot from native.

BR.

Fuzhong

*From:*acrn-users@lists.projectacrn.org
<mailto:acrn-users@lists.projectacrn.org>
<acrn-users@lists.projectacrn.org
<mailto:acrn-users@lists.projectacrn.org>> *On Behalf Of
*siming
*Sent:* Friday, July 31, 2020 2:10 PM
*To:* acrn-users@lists.projectacrn.org
<mailto:acrn-users@lists.projectacrn.org>
*Subject:* Re: [acrn-users] GPT ERROR when write preempt
img to sata on NUC7i5BNB

thanks for the responds.I did the dd comond in the acrn boot.

After I install the service VM with./acrn_quick_setup.sh
,I cannot boot into /Clear-linux-native-5.5.11-922/. The
HDMI is nothing out when I choose this.

/  Clear Linux OS(acrn)/

/  Clear Linux OS(Clear-linux-iot-lts2018-sos-4.19.97-104)/

/  Clear Linux OS(Clear-linux-native-5.5.11-922)/

Did I miss something in the set up of the service vm?

thanks

在2020-07-31 12:58:21,"Liu, Fuzhong"
<fuzhong.liu@intel.com <mailto:fuzhong.liu@intel.com>> 写道:

Hi

The dd issue is for acrn boot or native boot?

Please  boot into native and try it again.

Thanks!

BR.

Fuzhong

*From:*acrn-users@lists.projectacrn.org
<mailto:acrn-users@lists.projectacrn.org>
<acrn-users@lists.projectacrn.org
<mailto:acrn-users@lists.projectacrn.org>> *On Behalf
Of *siming
*Sent:* Friday, July 31, 2020 11:34 AM
*To:* acrn-users@lists.projectacrn.org
<mailto:acrn-users@lists.projectacrn.org>
*Subject:* [acrn-users] GPT ERROR when write preempt
img to sata on NUC7i5BNB

Hi,

  My board is NUC7i5BNB, with two disks: an NVMe disk
for the Clear Linux-based Service VM and a SATA disk
for the RTVM.Accoring to
https://projectacrn.github.io/1.6/getting-started/rt_industry.html#install-and-launch-the-preempt-rt-vm,
when I write preempt img to sata, there is always have
gpt errors. I have chaged another sata disk, but it's
the same error.

|root@nuc-acrn /home/acrn # dd
if=./preempt-rt-32680.img of=/dev/sda bs=4M oflag=sync
status=progress iflag=fullblock seek=0 conv=notrunc|

|9122611200 bytes (9.1 GB, 8.5 GiB) copied, 124 s, 73.5
MB/s|

|2186+1 records in|

|2186+1 records out |

|9169755648 bytes (9.2 GB, 8.5 GiB) copied, 126.281 s,
72.6 MB/s|

|[  171.967643] GPT:Primary header thinks Alt. header
is not at the end of the disk.|

|[  171.967982] GPT:17909678 != 234441647|

|[  171.968146] GPT:Alternate GPT header not at the end
of the disk.|

|[  171.968406] GPT:17909678 != 234441647|

|[  171.968616] GPT: Use GNU Parted to correct GPT errors.|

|[  171.968864]  sda: sda1 sda2 sda3|

then I run the launch_hard_rt_vm.sh, it cannot create
VM from Hypervisor.

|root@nuc-acrn /home/acrn # ./launch_hard_rt_vm.sh|

|cpu1 online=1 |

|[ 1525.901370] smpboot: CPU 1 is now offline|

|[ 1525.902204] vhm: try to offline cpu 1 with lapicid 2|

|cpu2 online=1 |

|[ 1525.916019] smpboot: CPU 2 is now offline|

|[ 1525.917264] vhm: try to offline cpu 2 with lapicid 1|

|cpu3 online=1 |

|[ 1525.929538] smpboot: CPU 3 is now offline|

|[ 1525.930969] vhm: try to offline cpu 3 with lapicid 3|

|[ 1525.935378] ata1.00: disabled|

|[ 1525.938524] sd 0:0:0:0: [sda] Synchronizing SCSI cache|

|[ 1525.939206] sd 0:0:0:0: [sda] Synchronize Cache(10)
failed: Result: hostbyte=DID_BAD_TARGET
driverbyte=DRIVER_OK|

|[ 1525.941643] sd 0:0:0:0: [sda] Stopping disk|

|[ 1525.941888] sd 0:0:0:0: [sda] Start/Stop Unit
failed: Result: hostbyte=DID_BAD_TARGET
driverbyte=DRIVER_OK|

|[ 1525.956762] pci-stub 0000:00:17.0: claimed by stub|

|pm by vuart node-index = 1 |

|SW_LOAD: get ovmf path /usr/share/acrn/bios/OVMF.fd,
size 0x200000 |

|vm_create: hard_rtvm |

|[ 1525.981345] vhm_dev_open: opening device node|

|VHM api version 1.0 |

|[ 1525.982333] vhm: failed to create VM from Hypervisor !|

|[ 1526.483047] vhm: failed to create VM from Hypervisor !|

|[ 1526.983377] vhm: failed to create VM from Hypervisor !|

|[ 1527.483702] vhm: failed to create VM from Hypervisor !|

|[ 1527.984028] vhm: failed to create VM from Hypervisor !|

|[ 1528.484363] vhm: failed to create VM from Hypervisor !|

|[ 1528.984686] vhm: failed to create VM from Hypervisor !|

|[ 1529.485021] vhm: failed to create VM from Hypervisor !|

|[ 1529.985346] vhm: failed to create VM from Hypervisor !|

|[ 1530.485672] vhm: failed to create VM from Hypervisor !|

|failed to create VM hard_rtvm |

|vm_create failed|

|[ 1530.994415] vhm: freed vm|

Thanks!

ZS



siming
 

My environment is build according to the doc https://projectacrn.github.io/1.6/getting-started/rt_industry.html
Board NUC7i5BNB, with two disks: an NVMe disk and a SATA disk

# uname -a

Linux nuc-acrn 4.19.97-104.iot-lts2018-sos #1 SMP PREEMPT Wed Jan 22 14:37:18 PST 2020 x86_64 GNU/Linux

# cat /etc/os-release 
BUILD_ID=32680
# acrn-dm -v
DM version is: 1.6-unstable-2020w12.5.140000p_273 (daily tag:acrn-2020w12.5.140000p), build by mockbuild@2020-03-20 01:28:15
Thanks.

在 2020-08-03 14:43:42,"Yin, Fengwei" <fengwei.yin@...> 写道: >Hi Siming, > >On 8/3/2020 2:23 PM, siming wrote: >> Hi Fengwei, >> I have tried two ways to boot preempt uos, but no success. There were >> error logs in the previousemail. >So you saw "pci passthru fail" when you use your launch_hard_rt_vm1.sh? >Could you please share the whole launch_hard_rt_vm1.sh script? > >Also the version of acrn hypervisor, acrn-dm and SOS kernel version >could help here. Thanks. > > >Regards >Yin, Fengwei > >>> >>> <    -s 2,*passthru*,00/17/0 \ >>> >>> --- >>> >>> >    -s 2*,virtio-blk*,/dev/sda \ >>> >> >> Best Regards. >> >> >> >> >> At 2020-08-03 10:23:11, "Yin, Fengwei" <fengwei.yin@...> wrote: >> >> Hi Siming, >> >> I suppose you need passthru the SATA controller to your second VM. >> Not using virtio block >> >> based /dev/sda. >> >> >> Regards >> Yin, Fengwei >> ------------------------------------ >> >> On 8/3/20 8:52 AM, siming wrote: >>> I have boot from sata by choose sata in the boot menu: >>> UEFI:SATA PORT 0 : OS Bootloader >>> the systen works well, system info : >>> root@clr-preempt-rt~#: uname -a >>> Linux clr-preempt-rt 4.19.94-20.iot-lts2018-preempt-rt #1 SMP >>> PREEMPT RT Thu Jan 23 15:05:47 PST 2020 x86_64 GNU/Linux >>> >>> >>> >>> >>> 在 2020-08-03 07:10:44,"Liu, Fuzhong" <fuzhong.liu@...> 写道: >>> >>> Hi >>> >>> Could you please double check if it can native boot from sda? >>> >>> 1. set boot order to Built-in shell; >>> 2. type fs0: ENTER >>> 3. cd EFI/BOOT ENTER >>> 4. run BOOTX64.EFI >>> >>> BR. >>> >>> Fuzhong >>> >>> *From:*acrn-users@... >>> <acrn-users@...> *On Behalf Of *siming >>> *Sent:* Saturday, August 1, 2020 9:50 AM >>> *To:* acrn-users@... >>> *Subject:* Re: [acrn-users] GPT ERROR when write preempt img >>> to sata on NUC7i5BNB >>> >>> thanks for the direction, the dd commond works fine in the >>> native boot, but the launch rt vm still failed (in acrn boot). >>> >>> I tried two way to launch the vm, the difference is "-s 2 " of >>> the acrn-dm. >>> >>> # diff launch_hard_rt_vm1.sh launch_hard_rt_vm2.sh >>> >>> <   -s 2,*passthru*,00/17/0 \ >>> >>> --- >>> >>> >   -s 2*,virtio-blk*,/dev/sda \ >>> >>> *launch_hard_rt_vm1.sh error log:* >>> >>> modify_bar_registration: bypass for pci-passthru 0:2.0 >>> >>> [  41.557774] Unknown IOCTL 0x43000055 >>> >>> pci passthru init failed >>> >>> mngr_client_new: Failed to accept from fd 35, err: Invalid >>> argument >>> >>> Stop listening 35... >>> >>> Stop polling 35... >>> >>> Unable to init vdev (22) >>> >>> *launch_hard_rt_vm2.sh error log:* >>> >>> polling 35... >>> >>> pci init hostbridge >>> >>> pci init virtio-blk >>> >>> acrn-dm: Could not open backing file: /dev/sdaListening 35... >>> >>> : No such file or directory >>> >>> Could not open backing filepci virtio-blk init failed >>> >>> mngr_client_new: Failed to accept from fd 35, err: Invalid >>> argument >>> >>> Stop listening 35... >>> >>> my sata info: >>> >>> $ lsblk >>> >>> NAME       MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT >>> >>> sda          8:0    0 111.8G  0 disk >>> >>> ├─sda1       8:1    0   510M  0 part >>> >>> ├─sda2       8:2    0    33M  0 part >>> >>> └─sda3       8:3    0     8G  0 part >>> >>> nvme0n1    259:0    0 238.5G  0 disk >>> >>> ├─nvme0n1p1 259:1    0   142M  0 part >>> >>> ├─nvme0n1p2 259:2    0   244M  0 part [SWAP] >>> >>> └─nvme0n1p3 259:3    0 238.1G  0 part / >>> >>> $ lspci -nn | grep SATA >>> >>> 00:17.0 SATA controller [0106]: Intel Corporation Sunrise >>> Point-LP SATA Controller [AHCI mode] [8086:9d03] (rev 21) >>> >>> The attachment is the error logs and the launch script. >>> >>> Best Regards >>> >>> 在2020-07-31 15:47:15,"Liu, Fuzhong" <fuzhong.liu@... >>> <mailto:fuzhong.liu@...>> 写道: >>> >>> Please set boot order to Built-in shell; >>> >>> then type fs1: ENTER >>> >>> cd EFI/BOOT ENTER >>> >>> run BOOTX64.EFI >>> >>> It will boot from native. >>> >>> BR. >>> >>> Fuzhong >>> >>> *From:*acrn-users@... >>> <mailto:acrn-users@...> >>> <acrn-users@... >>> <mailto:acrn-users@...>> *On Behalf Of >>> *siming >>> *Sent:* Friday, July 31, 2020 2:10 PM >>> *To:* acrn-users@... >>> <mailto:acrn-users@...> >>> *Subject:* Re: [acrn-users] GPT ERROR when write preempt >>> img to sata on NUC7i5BNB >>> >>> thanks for the responds.I did the dd comond in the acrn boot. >>> >>> After I install the service VM with./acrn_quick_setup.sh >>> ,I cannot boot into /Clear-linux-native-5.5.11-922/. The >>> HDMI is nothing out when I choose this. >>> >>> /  Clear Linux OS(acrn)/ >>> >>> /  Clear Linux OS(Clear-linux-iot-lts2018-sos-4.19.97-104)/ >>> >>> /  Clear Linux OS(Clear-linux-native-5.5.11-922)/ >>> >>> Did I miss something in the set up of the service vm? >>> >>> thanks >>> >>> 在2020-07-31 12:58:21,"Liu, Fuzhong" >>> <fuzhong.liu@... <mailto:fuzhong.liu@...>> 写道: >>> >>> Hi >>> >>> The dd issue is for acrn boot or native boot? >>> >>> Please  boot into native and try it again. >>> >>> Thanks! >>> >>> BR. >>> >>> Fuzhong >>> >>> *From:*acrn-users@... >>> <mailto:acrn-users@...> >>> <acrn-users@... >>> <mailto:acrn-users@...>> *On Behalf >>> Of *siming >>> *Sent:* Friday, July 31, 2020 11:34 AM >>> *To:* acrn-users@... >>> <mailto:acrn-users@...> >>> *Subject:* [acrn-users] GPT ERROR when write preempt >>> img to sata on NUC7i5BNB >>> >>> Hi, >>> >>>   My board is NUC7i5BNB, with two disks: an NVMe disk >>> for the Clear Linux-based Service VM and a SATA disk >>> for the RTVM.Accoring to >>> https://projectacrn.github.io/1.6/getting-started/rt_industry.html#install-and-launch-the-preempt-rt-vm, >>> when I write preempt img to sata, there is always have >>> gpt errors. I have chaged another sata disk, but it's >>> the same error. >>> >>> |root@nuc-acrn /home/acrn # dd >>> if=./preempt-rt-32680.img of=/dev/sda bs=4M oflag=sync >>> status=progress iflag=fullblock seek=0 conv=notrunc| >>> >>> |9122611200 bytes (9.1 GB, 8.5 GiB) copied, 124 s, 73.5 >>> MB/s| >>> >>> |2186+1 records in| >>> >>> |2186+1 records out | >>> >>> |9169755648 bytes (9.2 GB, 8.5 GiB) copied, 126.281 s, >>> 72.6 MB/s| >>> >>> |[  171.967643] GPT:Primary header thinks Alt. header >>> is not at the end of the disk.| >>> >>> |[  171.967982] GPT:17909678 != 234441647| >>> >>> |[  171.968146] GPT:Alternate GPT header not at the end >>> of the disk.| >>> >>> |[  171.968406] GPT:17909678 != 234441647| >>> >>> |[  171.968616] GPT: Use GNU Parted to correct GPT errors.| >>> >>> |[  171.968864]  sda: sda1 sda2 sda3| >>> >>> then I run the launch_hard_rt_vm.sh, it cannot create >>> VM from Hypervisor. >>> >>> |root@nuc-acrn /home/acrn # ./launch_hard_rt_vm.sh| >>> >>> |cpu1 online=1 | >>> >>> |[ 1525.901370] smpboot: CPU 1 is now offline| >>> >>> |[ 1525.902204] vhm: try to offline cpu 1 with lapicid 2| >>> >>> |cpu2 online=1 | >>> >>> |[ 1525.916019] smpboot: CPU 2 is now offline| >>> >>> |[ 1525.917264] vhm: try to offline cpu 2 with lapicid 1| >>> >>> |cpu3 online=1 | >>> >>> |[ 1525.929538] smpboot: CPU 3 is now offline| >>> >>> |[ 1525.930969] vhm: try to offline cpu 3 with lapicid 3| >>> >>> |[ 1525.935378] ata1.00: disabled| >>> >>> |[ 1525.938524] sd 0:0:0:0: [sda] Synchronizing SCSI cache| >>> >>> |[ 1525.939206] sd 0:0:0:0: [sda] Synchronize Cache(10) >>> failed: Result: hostbyte=DID_BAD_TARGET >>> driverbyte=DRIVER_OK| >>> >>> |[ 1525.941643] sd 0:0:0:0: [sda] Stopping disk| >>> >>> |[ 1525.941888] sd 0:0:0:0: [sda] Start/Stop Unit >>> failed: Result: hostbyte=DID_BAD_TARGET >>> driverbyte=DRIVER_OK| >>> >>> |[ 1525.956762] pci-stub 0000:00:17.0: claimed by stub| >>> >>> |pm by vuart node-index = 1 | >>> >>> |SW_LOAD: get ovmf path /usr/share/acrn/bios/OVMF.fd, >>> size 0x200000 | >>> >>> |vm_create: hard_rtvm | >>> >>> |[ 1525.981345] vhm_dev_open: opening device node| >>> >>> |VHM api version 1.0 | >>> >>> |[ 1525.982333] vhm: failed to create VM from Hypervisor !| >>> >>> |[ 1526.483047] vhm: failed to create VM from Hypervisor !| >>> >>> |[ 1526.983377] vhm: failed to create VM from Hypervisor !| >>> >>> |[ 1527.483702] vhm: failed to create VM from Hypervisor !| >>> >>> |[ 1527.984028] vhm: failed to create VM from Hypervisor !| >>> >>> |[ 1528.484363] vhm: failed to create VM from Hypervisor !| >>> >>> |[ 1528.984686] vhm: failed to create VM from Hypervisor !| >>> >>> |[ 1529.485021] vhm: failed to create VM from Hypervisor !| >>> >>> |[ 1529.985346] vhm: failed to create VM from Hypervisor !| >>> >>> |[ 1530.485672] vhm: failed to create VM from Hypervisor !| >>> >>> |failed to create VM hard_rtvm | >>> >>> |vm_create failed| >>> >>> |[ 1530.994415] vhm: freed vm| >>> >>> Thanks! >>> >>> ZS >>> >>> >>> >> > >


Liu, Fuzhong
 

Hi Siming

Narrow down your issue here:  

As mentioned in below doc; please modify the script to use the virtio device.

https://projectacrn.github.io/1.6/getting-started/rt_industry.html#install-and-launch-the-preempt-rt-vm

5 Modify the script to use the virtio device.

# NVME pass-through

#echo ${passthru_vpid["nvme"]} > /sys/bus/pci/drivers/pci-stub/new_id

#echo ${passthru_bdf["nvme"]} > /sys/bus/pci/devices/${passthru_bdf["nvme"]}/driver/unbind

#echo ${passthru_bdf["nvme"]} > /sys/bus/pci/drivers/pci-stub/bind

/usr/bin/acrn-dm -A -m $mem_size -s 0:0,hostbridge \

   --lapic_pt \

   --rtvm \

   --virtio_poll 1000000 \

   -U 495ae2e5-2603-4d64-af76-d4bc5a8ec0e5 \

   -s 2,virtio-blk,/dev/sda \

   -s 3,virtio-console,@stdio:stdio_port \

   $pm_channel $pm_by_vuart \

   --ovmf /usr/share/acrn/bios/OVMF.fd \

   hard_rtvm

 

}

 

The reason about below error log for virtio-blk on your side is: your run sata passthrough script before; just reboot can fix it

>>>         acrn-dm: Could not open backing file: /dev/sdaListening 35...
>>> 
>>>         : No such file or directory

 

It is successful log on my side:

root@clr-sos/home/acrn # ./launch_hard_rt_vm.sh

cpu1 online=1

cpu2 online=1

cpu3 online=1

pm by vuart node-index = 1

SW_LOAD: get ovmf path /usr/share/acrn/bios/OVMF.fd, size 0x200000

vm_create: hard_rtvm

VHM api version 1.0

vm_setup_memory: size=0x40000000

open hugetlbfs file /run/hugepage/acrn/huge_lv1/hard_rtvm/495AE2E526034D64AF76D4BC5A8EC0E5

open hugetlbfs file /run/hugepage/acrn/huge_lv2/hard_rtvm/495AE2E526034D64AF76D4BC5A8EC0E5

level 0 free/need pages:0/1 page size:0x200000

level 1 free/need pages:0/1 page size:0x40000000

to reserve more free pages:

to reserve pages (+orig 0): echo 1 > /sys/kernel/mm/hugepages/hugepages-1048576kB/nr_hugepages

to reserve pages (+orig 0): echo 1 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages

now enough free pages are reserved!

 

try to setup hugepage with:

        level 0 - lowmem 0x0, biosmem 0x200000, highmem 0x0

        level 1 - lowmem 0x40000000, biosmem 0x0, highmem 0x0

total_size 0x180000000

 

mmap ptr 0x0x7f2717719000 -> baseaddr 0x0x7f2740000000

mmap 0x40000000@0x7f2740000000

touch 1 pages with pagesz 0x40000000

mmap 0x200000@0x7f283fe00000

touch 1 pages with pagesz 0x200000

 

really setup hugepage with:

        level 0 - lowmem 0x0, biosmem 0x200000, highmem 0x0

        level 1 - lowmem 0x40000000, biosmem 0x0, highmem 0x0

vm_init_vdevs

pm_by_vuart_init idx: 1, path: /dev/ttyS1

polling 35...

Listening 35...

pci init hostbridge

pci init virtio-blk

pci init virtio-console

tpm: init_vtpm2:Invalid socket path!

                                    /tmp/dm.XtXd2gw     24:     Device (PCI0)

                                                                             Warning  3073 -        Multiple types ^  (Device object requires either a _HID or _ADR, but not both)

 

                        /tmp/dm.XtXd2gw    110:     Processor (CPU0, 0x00, 0x00000000, 0x00) {}

                                                                                               Warning  3168 -                          ^ Legacy Processor() keyword detected. Use Device() keyword instead.

 

                                                  /tmp/dm.XtXd2gw    111:     Processor (CPU1, 0x01, 0x00000000, 0x00) {}

                                                                                                                         Warning  3168 -                          ^ Legacy Processor() keyword detected. Use Device() keyword instead.

 

                                                                            acrn_sw_load

                                                                                        SW_LOAD: partition blob /usr/share/acrn/bios/OVMF.fd size 2097152 copy to guest 0xffe00000

                        SW_LOAD: build e820 9 entries to addr: 0x7f27400ef008

SW_LOAD: entry[0]: addr 0x0000000000000000, size 0x00000000000a0000,  type 0x1

SW_LOAD: entry[1]: addr 0x00000000000a0000, size 0x0000000000060000,  type 0x2

SW_LOAD: entry[2]: addr 0x0000000000100000, size 0x000000003ff00000,  type 0x1

SW_LOAD: entry[3]: addr 0x0000000040000000, size 0x0000000040000000,  type 0x2

SW_LOAD: entry[4]: addr 0x0000000080000000, size 0x0000000008000000,  type 0x2

SW_LOAD: entry[5]: addr 0x00000000db000000, size 0x0000000004000000,  type 0x2

SW_LOAD: entry[6]: addr 0x00000000df000000, size 0x0000000001000000,  type 0x2

SW_LOAD: entry[7]: addr 0x00000000e0000000, size 0x0000000020000000,  type 0x2

SW_LOAD: entry[8]: addr 0x0000000100000000, size 0x0000000040000000,  type 0x2

SW_LOAD: ovmf_entry 0xfffffff0

                              add_cpu

                                     [    1.428076] Loaded X.509 cert 'Build time autogenerated kernel key: 7d0d4348a2d53344b884032935610ca63fc3911b'

[    1.429742] zswap: loaded using pool lzo/zbud

[    1.430841] Btrfs loaded, crc32c=crc32c-intel

[    1.431928] md: Skipping autodetection of RAID arrays. (raid=autodetect will force)

[    1.457635] EXT4-fs (vda3): mounted filesystem with ordered data mode. Opts: (null)

[    1.458872] VFS: Mounted root (ext4 filesystem) on device 253:3.

[    1.462339] devtmpfs: mounted

[    1.463642] Freeing unused kernel image memory: 1224K

[    1.464638] Write protecting the kernel read-only data: 24576k

[    1.467056] Freeing unused kernel image memory: 2008K

[    1.468548] Freeing unused kernel image memory: 1128K

[    1.469452] Run /sbin/init as init process

[    1.620880] systemd[1]: systemd 244 running in system mode. (+PAM +AUDIT -SELINUX +IMA -APPARMOR -SMACK -SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 -IDN -PCRE2 default-hierarchy=hybrid)

[    1.623862] systemd[1]: Detected virtualization acrn.

[    1.624544] systemd[1]: Detected architecture x86-64.

[    1.630657] systemd[1]: Set hostname to <clr-preempt-rt>.

[    1.822797] systemd[1]: Created slice system-getty.slice.

[    1.824261] systemd[1]: Created slice system-serial\x2dgetty.slice.

[    1.825647] systemd[1]: Created slice User and Session Slice.

[    1.826651] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.

[    1.827832] systemd[1]: Started Forward Password Requests to Wall Directory Watch.

[    1.829366] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.

[    1.830668] systemd[1]: Reached target Local Encrypted Volumes.

[    1.831537] systemd[1]: Reached target Remote File Systems.

[    1.832266] systemd[1]: Reached target Slices.

[    1.835095] systemd[1]: Listening on Process Core Dump Socket.

[    1.836157] systemd[1]: Listening on initctl Compatibility Named Pipe.

[    1.840333] systemd[1]: Condition check resulted in Journal Audit Socket being skipped.

[    1.841799] systemd[1]: Listening on Journal Socket (/dev/log).

[    1.843022] systemd[1]: Listening on Journal Socket.

[    1.843918] systemd[1]: Listening on Network Service Netlink Socket.

[    1.845108] systemd[1]: Listening on udev Control Socket.

[    1.845942] systemd[1]: Listening on udev Kernel Socket.

[    1.848537] systemd[1]: Starting Create list of static device nodes for the current kernel...

[    1.850115] systemd[1]: Condition check resulted in Set Up Additional Binary Formats being skipped.

[    1.857603] systemd[1]: Starting Journal Service...

[    1.858787] systemd[1]: Condition check resulted in Load Kernel Modules being skipped.

[    1.868541] systemd[1]: Starting Remount Root and Kernel File Systems...

[    1.874521] systemd[1]: Starting Apply Kernel Variables...

[    1.888076] systemd[1]: Starting udev Coldplug all Devices...

[    1.908507] systemd[1]: Starting udev Kernel Device Manager...

[    1.929253] systemd[1]: Started Create list of static device nodes for the current kernel.

[    1.947839] systemd[1]: Started Remount Root and Kernel File Systems.

[    1.950075] systemd[1]: Started Apply Kernel Variables.

[    1.954582] systemd[1]: Reached target Local File Systems (Pre).

[    1.965499] systemd[1]: Starting Load/Save Random Seed...

[    1.989257] systemd[1]: Started Load/Save Random Seed.

[    2.128280] systemd[1]: Started udev Coldplug all Devices.

[    2.792368] systemd[1]: Started Journal Service.

[    2.810609] systemd-journald[217]: Received client request to flush runtime journal.

[    3.369201] Adding 33788k swap on /dev/vda2.  Priority:-2 extents:1 across:33788k FS

 

clr-preempt-rt login: root

Password:

Last login: Tue Aug  4 09:29:38 on tty1

root@clr-preempt-rt ~ #

root@clr-preempt-rt ~ # uname -a

Linux clr-preempt-rt 4.19.94-20.iot-lts2018-preempt-rt #1 SMP PREEMPT RT Thu Jan 23 15:05:47 PST 2020 x86_64 GNU/Linux

root@clr-preempt-rt ~ #

 

If you really want to passthrough SATA SSDto RTVM, please use acrn-kernel:

https://github.com/projectacrn/acrn-kernel

 

BR.

Fuzhong

 

From: acrn-users@... <acrn-users@...> On Behalf Of siming
Sent: Monday, August 3, 2020 3:04 PM
To: acrn-users@...
Subject: Re: [acrn-users] GPT ERROR when write preempt img to sata on NUC7i5BNB

 

My environment is build according to the doc https://projectacrn.github.io/1.6/getting-started/rt_industry.html

Board NUC7i5BNB, with two disks: an NVMe disk and a SATA disk

# uname -a

Linux nuc-acrn 4.19.97-104.iot-lts2018-sos #1 SMP PREEMPT Wed Jan 22 14:37:18 PST 2020 x86_64 GNU/Linux

# cat /etc/os-release 

BUILD_ID=32680

# acrn-dm -v

DM version is: 1.6-unstable-2020w12.5.140000p_273 (daily tag:acrn-2020w12.5.140000p), build by mockbuild@2020-03-20 01:28:15

Thanks.

2020-08-03 14:43:42"Yin, Fengwei" <fengwei.yin@...> 写道:
>Hi Siming,
>On 8/3/2020 2:23 PM, siming wrote:
>> Hi Fengwei,
>> I have tried two ways to boot preempt uos, but no success. There were 
>> error logs in the previousemail.
>So you saw "pci passthru fail" when you use your launch_hard_rt_vm1.sh?
>Could you please share the whole launch_hard_rt_vm1.sh script?
>Also the version of acrn hypervisor, acrn-dm and SOS kernel version
>could help here. Thanks.
>Regards
>Yin, Fengwei
>>> 
>>>     <    -s 2,*passthru*,00/17/0 \
>>> 
>>>     ---
>>> 
>>>     >    -s 2*,virtio-blk*,/dev/sda \
>>> 
>> 
>> Best Regards.
>> 
>> 
>> 
>> 
>> At 2020-08-03 10:23:11, "Yin, Fengwei" <fengwei.yin@...> wrote:
>> 
>>     Hi Siming,
>> 
>>     I suppose you need passthru the SATA controller to your second VM.
>>     Not using virtio block
>> 
>>     based /dev/sda.
>> 
>> 
>>     Regards
>>     Yin, Fengwei
>>     ------------------------------------
>> 
>>     On 8/3/20 8:52 AM, siming wrote:
>>>     I have boot from sata by choose sata in the boot menu:
>>>     UEFI:SATA PORT 0 : OS Bootloader
>>>     the systen works well, system info :
>>>     root@clr-preempt-rt~#: uname -a
>>>     Linux clr-preempt-rt 4.19.94-20.iot-lts2018-preempt-rt #1 SMP
>>>     PREEMPT RT Thu Jan 23 15:05:47 PST 2020 x86_64 GNU/Linux
>>> 
>>> 
>>> 
>>> 
>>>      2020-08-03 07:10:44"Liu, Fuzhong" <fuzhong.liu@...> 写道:
>>> 
>>>         Hi
>>> 
>>>         Could you please double check if it can native boot from sda?
>>> 
>>>          1. set boot order to Built-in shell;
>>>          2. type fs0: ENTER
>>>          3. cd EFI/BOOT ENTER
>>>          4. run BOOTX64.EFI
>>> 
>>>         BR.
>>> 
>>>         Fuzhong
>>> 
>>>         *From:*acrn-users@...
>>>         <acrn-users@...> *On Behalf Of *siming
>>>         *Sent:* Saturday, August 1, 2020 9:50 AM
>>>         *To:* acrn-users@...
>>>         *Subject:* Re: [acrn-users] GPT ERROR when write preempt img
>>>         to sata on NUC7i5BNB
>>> 
>>>         thanks for the direction, the dd commond works fine in the
>>>         native boot, but the launch rt vm still failed (in acrn boot).
>>> 
>>>         I tried two way to launch the vm, the difference is "-s 2 " of
>>>         the acrn-dm.
>>> 
>>>         # diff launch_hard_rt_vm1.sh launch_hard_rt_vm2.sh
>>> 
>>>         <   -s 2,*passthru*,00/17/0 \
>>> 
>>>         ---
>>> 
>>>         >   -s 2*,virtio-blk*,/dev/sda \
>>> 
>>>         *launch_hard_rt_vm1.sh error log:*
>>> 
>>>         modify_bar_registration: bypass for pci-passthru 0:2.0
>>> 
>>>         [  41.557774] Unknown IOCTL 0x43000055
>>> 
>>>         pci passthru init failed
>>> 
>>>         mngr_client_new: Failed to accept from fd 35, err: Invalid
>>>         argument
>>> 
>>>         Stop listening 35...
>>> 
>>>         Stop polling 35...
>>> 
>>>         Unable to init vdev (22)
>>> 
>>>         *launch_hard_rt_vm2.sh error log:*
>>> 
>>>         polling 35...
>>> 
>>>         pci init hostbridge
>>> 
>>>         pci init virtio-blk
>>> 
>>>         acrn-dm: Could not open backing file: /dev/sdaListening 35...
>>> 
>>>         : No such file or directory
>>> 
>>>         Could not open backing filepci virtio-blk init failed
>>> 
>>>         mngr_client_new: Failed to accept from fd 35, err: Invalid
>>>         argument
>>> 
>>>         Stop listening 35...
>>> 
>>>         my sata info:
>>> 
>>>         $ lsblk
>>> 
>>>         NAME       MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
>>> 
>>>         sda          8:0    0 111.8G  0 disk
>>> 
>>>         ├─sda1       8:1    0   510M  0 part
>>> 
>>>         ├─sda2       8:2    0    33M  0 part
>>> 
>>>         └─sda3       8:3    0     8G  0 part
>>> 
>>>         nvme0n1    259:0    0 238.5G  0 disk
>>> 
>>>         ├─nvme0n1p1 259:1    0   142M  0 part
>>> 
>>>         ├─nvme0n1p2 259:2    0   244M  0 part [SWAP]
>>> 
>>>         └─nvme0n1p3 259:3    0 238.1G  0 part /
>>> 
>>>         $ lspci -nn | grep SATA
>>> 
>>>         00:17.0 SATA controller [0106]: Intel Corporation Sunrise
>>>         Point-LP SATA Controller [AHCI mode] [8086:9d03] (rev 21)
>>> 
>>>         The attachment is the error logs and the launch script.
>>> 
>>>         Best Regards
>>> 
>>>         2020-07-31 15:47:15"Liu, Fuzhong" <fuzhong.liu@...
>>>         <mailto:fuzhong.liu@...>> 写道:
>>> 
>>>             Please set boot order to Built-in shell;
>>> 
>>>             then type fs1: ENTER
>>> 
>>>             cd EFI/BOOT ENTER
>>> 
>>>             run BOOTX64.EFI
>>> 
>>>             It will boot from native.
>>> 
>>>             BR.
>>> 
>>>             Fuzhong
>>> 
>>>             *From:*acrn-users@...
>>>             <mailto:acrn-users@...>
>>>             <acrn-users@...
>>>             <mailto:acrn-users@...>> *On Behalf Of
>>>             *siming
>>>             *Sent:* Friday, July 31, 2020 2:10 PM
>>>             *To:* acrn-users@...
>>>             <mailto:acrn-users@...>
>>>             *Subject:* Re: [acrn-users] GPT ERROR when write preempt
>>>             img to sata on NUC7i5BNB
>>> 
>>>             thanks for the responds.I did the dd comond in the acrn boot.
>>> 
>>>             After I install the service VM with./acrn_quick_setup.sh
>>>             ,I cannot boot into /Clear-linux-native-5.5.11-922/. The
>>>             HDMI is nothing out when I choose this.
>>> 
>>>             /  Clear Linux OS(acrn)/
>>> 
>>>             /  Clear Linux OS(Clear-linux-iot-lts2018-sos-4.19.97-104)/
>>> 
>>>             /  Clear Linux OS(Clear-linux-native-5.5.11-922)/
>>> 
>>>             Did I miss something in the set up of the service vm?
>>> 
>>>             thanks
>>> 
>>>             2020-07-31 12:58:21"Liu, Fuzhong"
>>>             <fuzhong.liu@... <mailto:fuzhong.liu@...>> 写道:
>>> 
>>>                 Hi
>>> 
>>>                 The dd issue is for acrn boot or native boot?
>>> 
>>>                 Please  boot into native and try it again.
>>> 
>>>                 Thanks!
>>> 
>>>                 BR.
>>> 
>>>                 Fuzhong
>>> 
>>>                 *From:*acrn-users@...
>>>                 <mailto:acrn-users@...>
>>>                 <acrn-users@...
>>>                 <mailto:acrn-users@...>> *On Behalf
>>>                 Of *siming
>>>                 *Sent:* Friday, July 31, 2020 11:34 AM
>>>                 *To:* acrn-users@...
>>>                 <mailto:acrn-users@...>
>>>                 *Subject:* [acrn-users] GPT ERROR when write preempt
>>>                 img to sata on NUC7i5BNB
>>> 
>>>                 Hi,
>>> 
>>>                   My board is NUC7i5BNB, with two disks: an NVMe disk
>>>                 for the Clear Linux-based Service VM and a SATA disk
>>>                 for the RTVM.Accoring to
>>>                 https://projectacrn.github.io/1.6/getting-started/rt_industry.html#install-and-launch-the-preempt-rt-vm,
>>>                 when I write preempt img to sata, there is always have
>>>                 gpt errors. I have chaged another sata disk, but it's
>>>                 the same error.
>>> 
>>>                 |root@nuc-acrn /home/acrn # dd
>>>                 if=./preempt-rt-32680.img of=/dev/sda bs=4M oflag=sync
>>>                 status=progress iflag=fullblock seek=0 conv=notrunc|
>>> 
>>>                 |9122611200 bytes (9.1 GB, 8.5 GiB) copied, 124 s, 73.5
>>>                 MB/s|
>>> 
>>>                 |2186+1 records in|
>>> 
>>>                 |2186+1 records out |
>>> 
>>>                 |9169755648 bytes (9.2 GB, 8.5 GiB) copied, 126.281 s,
>>>                 72.6 MB/s|
>>> 
>>>                 |[  171.967643] GPT:Primary header thinks Alt. header
>>>                 is not at the end of the disk.|
>>> 
>>>                 |[  171.967982] GPT:17909678 != 234441647|
>>> 
>>>                 |[  171.968146] GPT:Alternate GPT header not at the end
>>>                 of the disk.|
>>> 
>>>                 |[  171.968406] GPT:17909678 != 234441647|
>>> 
>>>                 |[  171.968616] GPT: Use GNU Parted to correct GPT errors.|
>>> 
>>>                 |[  171.968864]  sda: sda1 sda2 sda3|
>>> 
>>>                 then I run the launch_hard_rt_vm.sh, it cannot create
>>>                 VM from Hypervisor.
>>> 
>>>                 |root@nuc-acrn /home/acrn # ./launch_hard_rt_vm.sh|
>>> 
>>>                 |cpu1 online=1 |
>>> 
>>>                 |[ 1525.901370] smpboot: CPU 1 is now offline|
>>> 
>>>                 |[ 1525.902204] vhm: try to offline cpu 1 with lapicid 2|
>>> 
>>>                 |cpu2 online=1 |
>>> 
>>>                 |[ 1525.916019] smpboot: CPU 2 is now offline|
>>> 
>>>                 |[ 1525.917264] vhm: try to offline cpu 2 with lapicid 1|
>>> 
>>>                 |cpu3 online=1 |
>>> 
>>>                 |[ 1525.929538] smpboot: CPU 3 is now offline|
>>> 
>>>                 |[ 1525.930969] vhm: try to offline cpu 3 with lapicid 3|
>>> 
>>>                 |[ 1525.935378] ata1.00: disabled|
>>> 
>>>                 |[ 1525.938524] sd 0:0:0:0: [sda] Synchronizing SCSI cache|
>>> 
>>>                 |[ 1525.939206] sd 0:0:0:0: [sda] Synchronize Cache(10)
>>>                 failed: Result: hostbyte=DID_BAD_TARGET
>>>                 driverbyte=DRIVER_OK|
>>> 
>>>                 |[ 1525.941643] sd 0:0:0:0: [sda] Stopping disk|
>>> 
>>>                 |[ 1525.941888] sd 0:0:0:0: [sda] Start/Stop Unit
>>>                 failed: Result: hostbyte=DID_BAD_TARGET
>>>                 driverbyte=DRIVER_OK|
>>> 
>>>                 |[ 1525.956762] pci-stub 0000:00:17.0: claimed by stub|
>>> 
>>>                 |pm by vuart node-index = 1 |
>>> 
>>>                 |SW_LOAD: get ovmf path /usr/share/acrn/bios/OVMF.fd,
>>>                 size 0x200000 |
>>> 
>>>                 |vm_create: hard_rtvm |
>>> 
>>>                 |[ 1525.981345] vhm_dev_open: opening device node|
>>> 
>>>                 |VHM api version 1.0 |
>>> 
>>>                 |[ 1525.982333] vhm: failed to create VM from Hypervisor !|
>>> 
>>>                 |[ 1526.483047] vhm: failed to create VM from Hypervisor !|
>>> 
>>>                 |[ 1526.983377] vhm: failed to create VM from Hypervisor !|
>>> 
>>>                 |[ 1527.483702] vhm: failed to create VM from Hypervisor !|
>>> 
>>>                 |[ 1527.984028] vhm: failed to create VM from Hypervisor !|
>>> 
>>>                 |[ 1528.484363] vhm: failed to create VM from Hypervisor !|
>>> 
>>>                 |[ 1528.984686] vhm: failed to create VM from Hypervisor !|
>>> 
>>>                 |[ 1529.485021] vhm: failed to create VM from Hypervisor !|
>>> 
>>>                 |[ 1529.985346] vhm: failed to create VM from Hypervisor !|
>>> 
>>>                 |[ 1530.485672] vhm: failed to create VM from Hypervisor !|
>>> 
>>>                 |failed to create VM hard_rtvm |
>>> 
>>>                 |vm_create failed|
>>> 
>>>                 |[ 1530.994415] vhm: freed vm|
>>> 
>>>                 Thanks!
>>> 
>>>                 ZS
>>> 
>>> 
>>> 
>> 


siming
 

Hi Fuzhong,
Thanks for the test.
I have update the Service VM with  Acrn Hypervisor 2.0 release and Acrn Kernel 2.0 release
# uname -a
Linux nuc-acrn 5.4.43-PKT-200203T060100Z #3 SMP PREEMPT Tue Aug 4 10:24:36 CST 2020 x86_64 GNU/Linux
 # acrn-dm -v
DM version is: 2.0-64896ac9 (daily tag:acrn-2020w25.7-180000p), build by acrn@2020-08-04 10:38:21


There is a new socket error,  does any help?

polling 35...
Listening 35...

initiate a connection on a socket error

create socket to connect life-cycle manager failed

pci init hostbridge
pci init virtio-blk
acrn-dm: Could not open backing file: /dev/sda: No such file or directory
Could not open backing filepci virtio-blk init failed
mngr_client_new: Failed to accept from fd 35, err: Invalid argument
Stop listening 35...
Stop polling 35...

Thanks!


在 2020-08-04 14:24:41,"Liu, Fuzhong" <fuzhong.liu@...> 写道:

Hi Siming

Narrow down your issue here:  

As mentioned in below doc; please modify the script to use the virtio device.

https://projectacrn.github.io/1.6/getting-started/rt_industry.html#install-and-launch-the-preempt-rt-vm

5 Modify the script to use the virtio device.

# NVME pass-through

#echo ${passthru_vpid["nvme"]} > /sys/bus/pci/drivers/pci-stub/new_id

#echo ${passthru_bdf["nvme"]} > /sys/bus/pci/devices/${passthru_bdf["nvme"]}/driver/unbind

#echo ${passthru_bdf["nvme"]} > /sys/bus/pci/drivers/pci-stub/bind

/usr/bin/acrn-dm -A -m $mem_size -s 0:0,hostbridge \

   --lapic_pt \

   --rtvm \

   --virtio_poll 1000000 \

   -U 495ae2e5-2603-4d64-af76-d4bc5a8ec0e5 \

   -s 2,virtio-blk,/dev/sda \

   -s 3,virtio-console,@stdio:stdio_port \

   $pm_channel $pm_by_vuart \

   --ovmf /usr/share/acrn/bios/OVMF.fd \

   hard_rtvm

 

}

 

The reason about below error log for virtio-blk on your side is: your run sata passthrough script before; just reboot can fix it

>>>         acrn-dm: Could not open backing file: /dev/sdaListening 35...
>>> 
>>>         : No such file or directory

 

It is successful log on my side:

root@clr-sos/home/acrn # ./launch_hard_rt_vm.sh

cpu1 online=1

cpu2 online=1

cpu3 online=1

pm by vuart node-index = 1

SW_LOAD: get ovmf path /usr/share/acrn/bios/OVMF.fd, size 0x200000

vm_create: hard_rtvm

VHM api version 1.0

vm_setup_memory: size=0x40000000

open hugetlbfs file /run/hugepage/acrn/huge_lv1/hard_rtvm/495AE2E526034D64AF76D4BC5A8EC0E5

open hugetlbfs file /run/hugepage/acrn/huge_lv2/hard_rtvm/495AE2E526034D64AF76D4BC5A8EC0E5

level 0 free/need pages:0/1 page size:0x200000

level 1 free/need pages:0/1 page size:0x40000000

to reserve more free pages:

to reserve pages (+orig 0): echo 1 > /sys/kernel/mm/hugepages/hugepages-1048576kB/nr_hugepages

to reserve pages (+orig 0): echo 1 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages

now enough free pages are reserved!

 

try to setup hugepage with:

        level 0 - lowmem 0x0, biosmem 0x200000, highmem 0x0

        level 1 - lowmem 0x40000000, biosmem 0x0, highmem 0x0

total_size 0x180000000

 

mmap ptr 0x0x7f2717719000 -> baseaddr 0x0x7f2740000000

mmap 0x40000000@0x7f2740000000

touch 1 pages with pagesz 0x40000000

mmap 0x200000@0x7f283fe00000

touch 1 pages with pagesz 0x200000

 

really setup hugepage with:

        level 0 - lowmem 0x0, biosmem 0x200000, highmem 0x0

        level 1 - lowmem 0x40000000, biosmem 0x0, highmem 0x0

vm_init_vdevs

pm_by_vuart_init idx: 1, path: /dev/ttyS1

polling 35...

Listening 35...

pci init hostbridge

pci init virtio-blk

pci init virtio-console

tpm: init_vtpm2:Invalid socket path!

                                    /tmp/dm.XtXd2gw     24:     Device (PCI0)

                                                                             Warning  3073 -        Multiple types ^  (Device object requires either a _HID or _ADR, but not both)

 

                        /tmp/dm.XtXd2gw    110:     Processor (CPU0, 0x00, 0x00000000, 0x00) {}

                                                                                               Warning  3168 -                          ^ Legacy Processor() keyword detected. Use Device() keyword instead.

 

                                                  /tmp/dm.XtXd2gw    111:     Processor (CPU1, 0x01, 0x00000000, 0x00) {}

                                                                                                                         Warning  3168 -                          ^ Legacy Processor() keyword detected. Use Device() keyword instead.

 

                                                                            acrn_sw_load

                                                                                        SW_LOAD: partition blob /usr/share/acrn/bios/OVMF.fd size 2097152 copy to guest 0xffe00000

                        SW_LOAD: build e820 9 entries to addr: 0x7f27400ef008

SW_LOAD: entry[0]: addr 0x0000000000000000, size 0x00000000000a0000,  type 0x1

SW_LOAD: entry[1]: addr 0x00000000000a0000, size 0x0000000000060000,  type 0x2

SW_LOAD: entry[2]: addr 0x0000000000100000, size 0x000000003ff00000,  type 0x1

SW_LOAD: entry[3]: addr 0x0000000040000000, size 0x0000000040000000,  type 0x2

SW_LOAD: entry[4]: addr 0x0000000080000000, size 0x0000000008000000,  type 0x2

SW_LOAD: entry[5]: addr 0x00000000db000000, size 0x0000000004000000,  type 0x2

SW_LOAD: entry[6]: addr 0x00000000df000000, size 0x0000000001000000,  type 0x2

SW_LOAD: entry[7]: addr 0x00000000e0000000, size 0x0000000020000000,  type 0x2

SW_LOAD: entry[8]: addr 0x0000000100000000, size 0x0000000040000000,  type 0x2

SW_LOAD: ovmf_entry 0xfffffff0

                              add_cpu

                                     [    1.428076] Loaded X.509 cert 'Build time autogenerated kernel key: 7d0d4348a2d53344b884032935610ca63fc3911b'

[    1.429742] zswap: loaded using pool lzo/zbud

[    1.430841] Btrfs loaded, crc32c=crc32c-intel

[    1.431928] md: Skipping autodetection of RAID arrays. (raid=autodetect will force)

[    1.457635] EXT4-fs (vda3): mounted filesystem with ordered data mode. Opts: (null)

[    1.458872] VFS: Mounted root (ext4 filesystem) on device 253:3.

[    1.462339] devtmpfs: mounted

[    1.463642] Freeing unused kernel image memory: 1224K

[    1.464638] Write protecting the kernel read-only data: 24576k

[    1.467056] Freeing unused kernel image memory: 2008K

[    1.468548] Freeing unused kernel image memory: 1128K

[    1.469452] Run /sbin/init as init process

[    1.620880] systemd[1]: systemd 244 running in system mode. (+PAM +AUDIT -SELINUX +IMA -APPARMOR -SMACK -SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 -IDN -PCRE2 default-hierarchy=hybrid)

[    1.623862] systemd[1]: Detected virtualization acrn.

[    1.624544] systemd[1]: Detected architecture x86-64.

[    1.630657] systemd[1]: Set hostname to <clr-preempt-rt>.

[    1.822797] systemd[1]: Created slice system-getty.slice.

[    1.824261] systemd[1]: Created slice system-serial\x2dgetty.slice.

[    1.825647] systemd[1]: Created slice User and Session Slice.

[    1.826651] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.

[    1.827832] systemd[1]: Started Forward Password Requests to Wall Directory Watch.

[    1.829366] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.

[    1.830668] systemd[1]: Reached target Local Encrypted Volumes.

[    1.831537] systemd[1]: Reached target Remote File Systems.

[    1.832266] systemd[1]: Reached target Slices.

[    1.835095] systemd[1]: Listening on Process Core Dump Socket.

[    1.836157] systemd[1]: Listening on initctl Compatibility Named Pipe.

[    1.840333] systemd[1]: Condition check resulted in Journal Audit Socket being skipped.

[    1.841799] systemd[1]: Listening on Journal Socket (/dev/log).

[    1.843022] systemd[1]: Listening on Journal Socket.

[    1.843918] systemd[1]: Listening on Network Service Netlink Socket.

[    1.845108] systemd[1]: Listening on udev Control Socket.

[    1.845942] systemd[1]: Listening on udev Kernel Socket.

[    1.848537] systemd[1]: Starting Create list of static device nodes for the current kernel...

[    1.850115] systemd[1]: Condition check resulted in Set Up Additional Binary Formats being skipped.

[    1.857603] systemd[1]: Starting Journal Service...

[    1.858787] systemd[1]: Condition check resulted in Load Kernel Modules being skipped.

[    1.868541] systemd[1]: Starting Remount Root and Kernel File Systems...

[    1.874521] systemd[1]: Starting Apply Kernel Variables...

[    1.888076] systemd[1]: Starting udev Coldplug all Devices...

[    1.908507] systemd[1]: Starting udev Kernel Device Manager...

[    1.929253] systemd[1]: Started Create list of static device nodes for the current kernel.

[    1.947839] systemd[1]: Started Remount Root and Kernel File Systems.

[    1.950075] systemd[1]: Started Apply Kernel Variables.

[    1.954582] systemd[1]: Reached target Local File Systems (Pre).

[    1.965499] systemd[1]: Starting Load/Save Random Seed...

[    1.989257] systemd[1]: Started Load/Save Random Seed.

[    2.128280] systemd[1]: Started udev Coldplug all Devices.

[    2.792368] systemd[1]: Started Journal Service.

[    2.810609] systemd-journald[217]: Received client request to flush runtime journal.

[    3.369201] Adding 33788k swap on /dev/vda2.  Priority:-2 extents:1 across:33788k FS

 

clr-preempt-rt login: root

Password:

Last login: Tue Aug  4 09:29:38 on tty1

root@clr-preempt-rt ~ #

root@clr-preempt-rt ~ # uname -a

Linux clr-preempt-rt 4.19.94-20.iot-lts2018-preempt-rt #1 SMP PREEMPT RT Thu Jan 23 15:05:47 PST 2020 x86_64 GNU/Linux

root@clr-preempt-rt ~ #

 

If you really want to passthrough SATA SSDto RTVM, please use acrn-kernel:

https://github.com/projectacrn/acrn-kernel

 

BR.

Fuzhong

 

From: acrn-users@... <acrn-users@...> On Behalf Of siming
Sent: Monday, August 3, 2020 3:04 PM
To: acrn-users@...
Subject: Re: [acrn-users] GPT ERROR when write preempt img to sata on NUC7i5BNB

 

My environment is build according to the doc https://projectacrn.github.io/1.6/getting-started/rt_industry.html

Board NUC7i5BNB, with two disks: an NVMe disk and a SATA disk

# uname -a

Linux nuc-acrn 4.19.97-104.iot-lts2018-sos #1 SMP PREEMPT Wed Jan 22 14:37:18 PST 2020 x86_64 GNU/Linux

# cat /etc/os-release 

BUILD_ID=32680

# acrn-dm -v

DM version is: 1.6-unstable-2020w12.5.140000p_273 (daily tag:acrn-2020w12.5.140000p), build by mockbuild@2020-03-20 01:28:15

Thanks.

2020-08-03 14:43:42"Yin, Fengwei" <fengwei.yin@...> 写道:
>Hi Siming,
>On 8/3/2020 2:23 PM, siming wrote:
>> Hi Fengwei,
>> I have tried two ways to boot preempt uos, but no success. There were 
>> error logs in the previousemail.
>So you saw "pci passthru fail" when you use your launch_hard_rt_vm1.sh?
>Could you please share the whole launch_hard_rt_vm1.sh script?
>Also the version of acrn hypervisor, acrn-dm and SOS kernel version
>could help here. Thanks.
>Regards
>Yin, Fengwei
>>> 
>>>     <    -s 2,*passthru*,00/17/0 \
>>> 
>>>     ---
>>> 
>>>     >    -s 2*,virtio-blk*,/dev/sda \
>>> 
>> 
>> Best Regards.
>> 
>> 
>> 
>> 
>> At 2020-08-03 10:23:11, "Yin, Fengwei" <fengwei.yin@...> wrote:
>> 
>>     Hi Siming,
>> 
>>     I suppose you need passthru the SATA controller to your second VM.
>>     Not using virtio block
>> 
>>     based /dev/sda.
>> 
>> 
>>     Regards
>>     Yin, Fengwei
>>     ------------------------------------
>> 
>>     On 8/3/20 8:52 AM, siming wrote:
>>>     I have boot from sata by choose sata in the boot menu:
>>>     UEFI:SATA PORT 0 : OS Bootloader
>>>     the systen works well, system info :
>>>     root@clr-preempt-rt~#: uname -a
>>>     Linux clr-preempt-rt 4.19.94-20.iot-lts2018-preempt-rt #1 SMP
>>>     PREEMPT RT Thu Jan 23 15:05:47 PST 2020 x86_64 GNU/Linux
>>> 
>>> 
>>> 
>>> 
>>>      2020-08-03 07:10:44"Liu, Fuzhong" <fuzhong.liu@...> 写道:
>>> 
>>>         Hi
>>> 
>>>         Could you please double check if it can native boot from sda?
>>> 
>>>          1. set boot order to Built-in shell;
>>>          2. type fs0: ENTER
>>>          3. cd EFI/BOOT ENTER
>>>          4. run BOOTX64.EFI
>>> 
>>>         BR.
>>> 
>>>         Fuzhong
>>> 
>>>         *From:*acrn-users@...
>>>         <acrn-users@...> *On Behalf Of *siming
>>>         *Sent:* Saturday, August 1, 2020 9:50 AM
>>>         *To:* acrn-users@...
>>>         *Subject:* Re: [acrn-users] GPT ERROR when write preempt img
>>>         to sata on NUC7i5BNB
>>> 
>>>         thanks for the direction, the dd commond works fine in the
>>>         native boot, but the launch rt vm still failed (in acrn boot).
>>> 
>>>         I tried two way to launch the vm, the difference is "-s 2 " of
>>>         the acrn-dm.
>>> 
>>>         # diff launch_hard_rt_vm1.sh launch_hard_rt_vm2.sh
>>> 
>>>         <   -s 2,*passthru*,00/17/0 \
>>> 
>>>         ---
>>> 
>>>         >   -s 2*,virtio-blk*,/dev/sda \
>>> 
>>>         *launch_hard_rt_vm1.sh error log:*
>>> 
>>>         modify_bar_registration: bypass for pci-passthru 0:2.0
>>> 
>>>         [  41.557774] Unknown IOCTL 0x43000055
>>> 
>>>         pci passthru init failed
>>> 
>>>         mngr_client_new: Failed to accept from fd 35, err: Invalid
>>>         argument
>>> 
>>>         Stop listening 35...
>>> 
>>>         Stop polling 35...
>>> 
>>>         Unable to init vdev (22)
>>> 
>>>         *launch_hard_rt_vm2.sh error log:*
>>> 
>>>         polling 35...
>>> 
>>>         pci init hostbridge
>>> 
>>>         pci init virtio-blk
>>> 
>>>         acrn-dm: Could not open backing file: /dev/sdaListening 35...
>>> 
>>>         : No such file or directory
>>> 
>>>         Could not open backing filepci virtio-blk init failed
>>> 
>>>         mngr_client_new: Failed to accept from fd 35, err: Invalid
>>>         argument
>>> 
>>>         Stop listening 35...
>>> 
>>>         my sata info:
>>> 
>>>         $ lsblk
>>> 
>>>         NAME       MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
>>> 
>>>         sda          8:0    0 111.8G  0 disk
>>> 
>>>         ├─sda1       8:1    0   510M  0 part
>>> 
>>>         ├─sda2       8:2    0    33M  0 part
>>> 
>>>         └─sda3       8:3    0     8G  0 part
>>> 
>>>         nvme0n1    259:0    0 238.5G  0 disk
>>> 
>>>         ├─nvme0n1p1 259:1    0   142M  0 part
>>> 
>>>         ├─nvme0n1p2 259:2    0   244M  0 part [SWAP]
>>> 
>>>         └─nvme0n1p3 259:3    0 238.1G  0 part /
>>> 
>>>         $ lspci -nn | grep SATA
>>> 
>>>         00:17.0 SATA controller [0106]: Intel Corporation Sunrise
>>>         Point-LP SATA Controller [AHCI mode] [8086:9d03] (rev 21)
>>> 
>>>         The attachment is the error logs and the launch script.
>>> 
>>>         Best Regards
>>> 
>>>         2020-07-31 15:47:15"Liu, Fuzhong" <fuzhong.liu@...
>>>         <mailto:fuzhong.liu@...>> 写道:
>>> 
>>>             Please set boot order to Built-in shell;
>>> 
>>>             then type fs1: ENTER
>>> 
>>>             cd EFI/BOOT ENTER
>>> 
>>>             run BOOTX64.EFI
>>> 
>>>             It will boot from native.
>>> 
>>>             BR.
>>> 
>>>             Fuzhong
>>> 
>>>             *From:*acrn-users@...
>>>             <mailto:acrn-users@...>
>>>             <acrn-users@...
>>>             <mailto:acrn-users@...>> *On Behalf Of
>>>             *siming
>>>             *Sent:* Friday, July 31, 2020 2:10 PM
>>>             *To:* acrn-users@...
>>>             <mailto:acrn-users@...>
>>>             *Subject:* Re: [acrn-users] GPT ERROR when write preempt
>>>             img to sata on NUC7i5BNB
>>> 
>>>             thanks for the responds.I did the dd comond in the acrn boot.
>>> 
>>>             After I install the service VM with./acrn_quick_setup.sh
>>>             ,I cannot boot into /Clear-linux-native-5.5.11-922/. The
>>>             HDMI is nothing out when I choose this.
>>> 
>>>             /  Clear Linux OS(acrn)/
>>> 
>>>             /  Clear Linux OS(Clear-linux-iot-lts2018-sos-4.19.97-104)/
>>> 
>>>             /  Clear Linux OS(Clear-linux-native-5.5.11-922)/
>>> 
>>>             Did I miss something in the set up of the service vm?
>>> 
>>>             thanks
>>> 
>>>             2020-07-31 12:58:21"Liu, Fuzhong"
>>>             <fuzhong.liu@... <mailto:fuzhong.liu@...>> 写道:
>>> 
>>>                 Hi
>>> 
>>>                 The dd issue is for acrn boot or native boot?
>>> 
>>>                 Please  boot into native and try it again.
>>> 
>>>                 Thanks!
>>> 
>>>                 BR.
>>> 
>>>                 Fuzhong
>>> 
>>>                 *From:*acrn-users@...
>>>                 <mailto:acrn-users@...>
>>>                 <acrn-users@...
>>>                 <mailto:acrn-users@...>> *On Behalf
>>>                 Of *siming
>>>                 *Sent:* Friday, July 31, 2020 11:34 AM
>>>                 *To:* acrn-users@...
>>>                 <mailto:acrn-users@...>
>>>                 *Subject:* [acrn-users] GPT ERROR when write preempt
>>>                 img to sata on NUC7i5BNB
>>> 
>>>                 Hi,
>>> 
>>>                   My board is NUC7i5BNB, with two disks: an NVMe disk
>>>                 for the Clear Linux-based Service VM and a SATA disk
>>>                 for the RTVM.Accoring to
>>>                 https://projectacrn.github.io/1.6/getting-started/rt_industry.html#install-and-launch-the-preempt-rt-vm,
>>>                 when I write preempt img to sata, there is always have
>>>                 gpt errors. I have chaged another sata disk, but it's
>>>                 the same error.
>>> 
>>>                 |root@nuc-acrn /home/acrn # dd
>>>                 if=./preempt-rt-32680.img of=/dev/sda bs=4M oflag=sync
>>>                 status=progress iflag=fullblock seek=0 conv=notrunc|
>>> 
>>>                 |9122611200 bytes (9.1 GB, 8.5 GiB) copied, 124 s, 73.5
>>>                 MB/s|
>>> 
>>>                 |2186+1 records in|
>>> 
>>>                 |2186+1 records out |
>>> 
>>>                 |9169755648 bytes (9.2 GB, 8.5 GiB) copied, 126.281 s,
>>>                 72.6 MB/s|
>>> 
>>>                 |[  171.967643] GPT:Primary header thinks Alt. header
>>>                 is not at the end of the disk.|
>>> 
>>>                 |[  171.967982] GPT:17909678 != 234441647|
>>> 
>>>                 |[  171.968146] GPT:Alternate GPT header not at the end
>>>                 of the disk.|
>>> 
>>>                 |[  171.968406] GPT:17909678 != 234441647|
>>> 
>>>                 |[  171.968616] GPT: Use GNU Parted to correct GPT errors.|
>>> 
>>>                 |[  171.968864]  sda: sda1 sda2 sda3|
>>> 
>>>                 then I run the launch_hard_rt_vm.sh, it cannot create
>>>                 VM from Hypervisor.
>>> 
>>>                 |root@nuc-acrn /home/acrn # ./launch_hard_rt_vm.sh|
>>> 
>>>                 |cpu1 online=1 |
>>> 
>>>                 |[ 1525.901370] smpboot: CPU 1 is now offline|
>>> 
>>>                 |[ 1525.902204] vhm: try to offline cpu 1 with lapicid 2|
>>> 
>>>                 |cpu2 online=1 |
>>> 
>>>                 |[ 1525.916019] smpboot: CPU 2 is now offline|
>>> 
>>>                 |[ 1525.917264] vhm: try to offline cpu 2 with lapicid 1|
>>> 
>>>                 |cpu3 online=1 |
>>> 
>>>                 |[ 1525.929538] smpboot: CPU 3 is now offline|
>>> 
>>>                 |[ 1525.930969] vhm: try to offline cpu 3 with lapicid 3|
>>> 
>>>                 |[ 1525.935378] ata1.00: disabled|
>>> 
>>>                 |[ 1525.938524] sd 0:0:0:0: [sda] Synchronizing SCSI cache|
>>> 
>>>                 |[ 1525.939206] sd 0:0:0:0: [sda] Synchronize Cache(10)
>>>                 failed: Result: hostbyte=DID_BAD_TARGET
>>>                 driverbyte=DRIVER_OK|
>>> 
>>>                 |[ 1525.941643] sd 0:0:0:0: [sda] Stopping disk|
>>> 
>>>                 |[ 1525.941888] sd 0:0:0:0: [sda] Start/Stop Unit
>>>                 failed: Result: hostbyte=DID_BAD_TARGET
>>>                 driverbyte=DRIVER_OK|
>>> 
>>>                 |[ 1525.956762] pci-stub 0000:00:17.0: claimed by stub|
>>> 
>>>                 |pm by vuart node-index = 1 |
>>> 
>>>                 |SW_LOAD: get ovmf path /usr/share/acrn/bios/OVMF.fd,
>>>                 size 0x200000 |
>>> 
>>>                 |vm_create: hard_rtvm |
>>> 
>>>                 |[ 1525.981345] vhm_dev_open: opening device node|
>>> 
>>>                 |VHM api version 1.0 |
>>> 
>>>                 |[ 1525.982333] vhm: failed to create VM from Hypervisor !|
>>> 
>>>                 |[ 1526.483047] vhm: failed to create VM from Hypervisor !|
>>> 
>>>                 |[ 1526.983377] vhm: failed to create VM from Hypervisor !|
>>> 
>>>                 |[ 1527.483702] vhm: failed to create VM from Hypervisor !|
>>> 
>>>                 |[ 1527.984028] vhm: failed to create VM from Hypervisor !|
>>> 
>>>                 |[ 1528.484363] vhm: failed to create VM from Hypervisor !|
>>> 
>>>                 |[ 1528.984686] vhm: failed to create VM from Hypervisor !|
>>> 
>>>                 |[ 1529.485021] vhm: failed to create VM from Hypervisor !|
>>> 
>>>                 |[ 1529.985346] vhm: failed to create VM from Hypervisor !|
>>> 
>>>                 |[ 1530.485672] vhm: failed to create VM from Hypervisor !|
>>> 
>>>                 |failed to create VM hard_rtvm |
>>> 
>>>                 |vm_create failed|
>>> 
>>>                 |[ 1530.994415] vhm: freed vm|
>>> 
>>>                 Thanks!
>>> 
>>>                 ZS
>>> 
>>> 
>>> 
>> 


Liu, Fuzhong
 

Hi Siming

Please share your launch script and  run “lsblk” in sos console to check if sda is available.

 

BR.

Fuzhong

 

 

From: acrn-users@... <acrn-users@...> On Behalf Of siming
Sent: Tuesday, August 4, 2020 4:13 PM
To: acrn-users@...
Subject: Re: [acrn-users] GPT ERROR when write preempt img to sata on NUC7i5BNB

 

Hi Fuzhong,

Thanks for the test.

I have update the Service VM with  Acrn Hypervisor 2.0 release and Acrn Kernel 2.0 release

# uname -a

Linux nuc-acrn 5.4.43-PKT-200203T060100Z #3 SMP PREEMPT Tue Aug 4 10:24:36 CST 2020 x86_64 GNU/Linux

 # acrn-dm -v

DM version is: 2.0-64896ac9 (daily tag:acrn-2020w25.7-180000p), build by acrn@2020-08-04 10:38:21

 

There is a new socket error,  does any help?

 

polling 35...

Listening 35...

initiate a connection on a socket error

create socket to connect life-cycle manager failed

pci init hostbridge

pci init virtio-blk

acrn-dm: Could not open backing file: /dev/sda: No such file or directory

Could not open backing filepci virtio-blk init failed

mngr_client_new: Failed to accept from fd 35, err: Invalid argument

Stop listening 35...

Stop polling 35...

 

Thanks!

 

 

2020-08-04 14:24:41"Liu, Fuzhong" <fuzhong.liu@...> 写道:

Hi Siming

Narrow down your issue here:  

As mentioned in below doc; please modify the script to use the virtio device.

https://projectacrn.github.io/1.6/getting-started/rt_industry.html#install-and-launch-the-preempt-rt-vm

5 Modify the script to use the virtio device.

# NVME pass-through

#echo ${passthru_vpid["nvme"]} > /sys/bus/pci/drivers/pci-stub/new_id

#echo ${passthru_bdf["nvme"]} > /sys/bus/pci/devices/${passthru_bdf["nvme"]}/driver/unbind

#echo ${passthru_bdf["nvme"]} > /sys/bus/pci/drivers/pci-stub/bind

/usr/bin/acrn-dm -A -m $mem_size -s 0:0,hostbridge \

   --lapic_pt \

   --rtvm \

   --virtio_poll 1000000 \

   -U 495ae2e5-2603-4d64-af76-d4bc5a8ec0e5 \

   -s 2,virtio-blk,/dev/sda \

   -s 3,virtio-console,@stdio:stdio_port \

   $pm_channel $pm_by_vuart \

   --ovmf /usr/share/acrn/bios/OVMF.fd \

   hard_rtvm

 

}

 

The reason about below error log for virtio-blk on your side is: your run sata passthrough script before; just reboot can fix it

>>>         acrn-dm: Could not open backing file: /dev/sdaListening 35...
>>> 
>>>         : No such file or directory

 

It is successful log on my side:

root@clr-sos/home/acrn # ./launch_hard_rt_vm.sh

cpu1 online=1

cpu2 online=1

cpu3 online=1

pm by vuart node-index = 1

SW_LOAD: get ovmf path /usr/share/acrn/bios/OVMF.fd, size 0x200000

vm_create: hard_rtvm

VHM api version 1.0

vm_setup_memory: size=0x40000000

open hugetlbfs file /run/hugepage/acrn/huge_lv1/hard_rtvm/495AE2E526034D64AF76D4BC5A8EC0E5

open hugetlbfs file /run/hugepage/acrn/huge_lv2/hard_rtvm/495AE2E526034D64AF76D4BC5A8EC0E5

level 0 free/need pages:0/1 page size:0x200000

level 1 free/need pages:0/1 page size:0x40000000

to reserve more free pages:

to reserve pages (+orig 0): echo 1 > /sys/kernel/mm/hugepages/hugepages-1048576kB/nr_hugepages

to reserve pages (+orig 0): echo 1 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages

now enough free pages are reserved!

 

try to setup hugepage with:

        level 0 - lowmem 0x0, biosmem 0x200000, highmem 0x0

        level 1 - lowmem 0x40000000, biosmem 0x0, highmem 0x0

total_size 0x180000000

 

mmap ptr 0x0x7f2717719000 -> baseaddr 0x0x7f2740000000

mmap 0x40000000@0x7f2740000000

touch 1 pages with pagesz 0x40000000

mmap 0x200000@0x7f283fe00000

touch 1 pages with pagesz 0x200000

 

really setup hugepage with:

        level 0 - lowmem 0x0, biosmem 0x200000, highmem 0x0

        level 1 - lowmem 0x40000000, biosmem 0x0, highmem 0x0

vm_init_vdevs

pm_by_vuart_init idx: 1, path: /dev/ttyS1

polling 35...

Listening 35...

pci init hostbridge

pci init virtio-blk

pci init virtio-console

tpm: init_vtpm2:Invalid socket path!

                                    /tmp/dm.XtXd2gw     24:     Device (PCI0)

                                                                             Warning  3073 -        Multiple types ^  (Device object requires either a _HID or _ADR, but not both)

 

                        /tmp/dm.XtXd2gw    110:     Processor (CPU0, 0x00, 0x00000000, 0x00) {}

                                                                                               Warning  3168 -                          ^ Legacy Processor() keyword detected. Use Device() keyword instead.

 

                                                  /tmp/dm.XtXd2gw    111:     Processor (CPU1, 0x01, 0x00000000, 0x00) {}

                                                                                                                         Warning  3168 -                          ^ Legacy Processor() keyword detected. Use Device() keyword instead.

 

                                                                            acrn_sw_load

                                                                                        SW_LOAD: partition blob /usr/share/acrn/bios/OVMF.fd size 2097152 copy to guest 0xffe00000

                        SW_LOAD: build e820 9 entries to addr: 0x7f27400ef008

SW_LOAD: entry[0]: addr 0x0000000000000000, size 0x00000000000a0000,  type 0x1

SW_LOAD: entry[1]: addr 0x00000000000a0000, size 0x0000000000060000,  type 0x2

SW_LOAD: entry[2]: addr 0x0000000000100000, size 0x000000003ff00000,  type 0x1

SW_LOAD: entry[3]: addr 0x0000000040000000, size 0x0000000040000000,  type 0x2

SW_LOAD: entry[4]: addr 0x0000000080000000, size 0x0000000008000000,  type 0x2

SW_LOAD: entry[5]: addr 0x00000000db000000, size 0x0000000004000000,  type 0x2

SW_LOAD: entry[6]: addr 0x00000000df000000, size 0x0000000001000000,  type 0x2

SW_LOAD: entry[7]: addr 0x00000000e0000000, size 0x0000000020000000,  type 0x2

SW_LOAD: entry[8]: addr 0x0000000100000000, size 0x0000000040000000,  type 0x2

SW_LOAD: ovmf_entry 0xfffffff0

                              add_cpu

                                     [    1.428076] Loaded X.509 cert 'Build time autogenerated kernel key: 7d0d4348a2d53344b884032935610ca63fc3911b'

[    1.429742] zswap: loaded using pool lzo/zbud

[    1.430841] Btrfs loaded, crc32c=crc32c-intel

[    1.431928] md: Skipping autodetection of RAID arrays. (raid=autodetect will force)

[    1.457635] EXT4-fs (vda3): mounted filesystem with ordered data mode. Opts: (null)

[    1.458872] VFS: Mounted root (ext4 filesystem) on device 253:3.

[    1.462339] devtmpfs: mounted

[    1.463642] Freeing unused kernel image memory: 1224K

[    1.464638] Write protecting the kernel read-only data: 24576k

[    1.467056] Freeing unused kernel image memory: 2008K

[    1.468548] Freeing unused kernel image memory: 1128K

[    1.469452] Run /sbin/init as init process

[    1.620880] systemd[1]: systemd 244 running in system mode. (+PAM +AUDIT -SELINUX +IMA -APPARMOR -SMACK -SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 -IDN -PCRE2 default-hierarchy=hybrid)

[    1.623862] systemd[1]: Detected virtualization acrn.

[    1.624544] systemd[1]: Detected architecture x86-64.

[    1.630657] systemd[1]: Set hostname to <clr-preempt-rt>.

[    1.822797] systemd[1]: Created slice system-getty.slice.

[    1.824261] systemd[1]: Created slice system-serial\x2dgetty.slice.

[    1.825647] systemd[1]: Created slice User and Session Slice.

[    1.826651] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.

[    1.827832] systemd[1]: Started Forward Password Requests to Wall Directory Watch.

[    1.829366] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.

[    1.830668] systemd[1]: Reached target Local Encrypted Volumes.

[    1.831537] systemd[1]: Reached target Remote File Systems.

[    1.832266] systemd[1]: Reached target Slices.

[    1.835095] systemd[1]: Listening on Process Core Dump Socket.

[    1.836157] systemd[1]: Listening on initctl Compatibility Named Pipe.

[    1.840333] systemd[1]: Condition check resulted in Journal Audit Socket being skipped.

[    1.841799] systemd[1]: Listening on Journal Socket (/dev/log).

[    1.843022] systemd[1]: Listening on Journal Socket.

[    1.843918] systemd[1]: Listening on Network Service Netlink Socket.

[    1.845108] systemd[1]: Listening on udev Control Socket.

[    1.845942] systemd[1]: Listening on udev Kernel Socket.

[    1.848537] systemd[1]: Starting Create list of static device nodes for the current kernel...

[    1.850115] systemd[1]: Condition check resulted in Set Up Additional Binary Formats being skipped.

[    1.857603] systemd[1]: Starting Journal Service...

[    1.858787] systemd[1]: Condition check resulted in Load Kernel Modules being skipped.

[    1.868541] systemd[1]: Starting Remount Root and Kernel File Systems...

[    1.874521] systemd[1]: Starting Apply Kernel Variables...

[    1.888076] systemd[1]: Starting udev Coldplug all Devices...

[    1.908507] systemd[1]: Starting udev Kernel Device Manager...

[    1.929253] systemd[1]: Started Create list of static device nodes for the current kernel.

[    1.947839] systemd[1]: Started Remount Root and Kernel File Systems.

[    1.950075] systemd[1]: Started Apply Kernel Variables.

[    1.954582] systemd[1]: Reached target Local File Systems (Pre).

[    1.965499] systemd[1]: Starting Load/Save Random Seed...

[    1.989257] systemd[1]: Started Load/Save Random Seed.

[    2.128280] systemd[1]: Started udev Coldplug all Devices.

[    2.792368] systemd[1]: Started Journal Service.

[    2.810609] systemd-journald[217]: Received client request to flush runtime journal.

[    3.369201] Adding 33788k swap on /dev/vda2.  Priority:-2 extents:1 across:33788k FS

 

clr-preempt-rt login: root

Password:

Last login: Tue Aug  4 09:29:38 on tty1

root@clr-preempt-rt ~ #

root@clr-preempt-rt ~ # uname -a

Linux clr-preempt-rt 4.19.94-20.iot-lts2018-preempt-rt #1 SMP PREEMPT RT Thu Jan 23 15:05:47 PST 2020 x86_64 GNU/Linux

root@clr-preempt-rt ~ #

 

If you really want to passthrough SATA SSDto RTVM, please use acrn-kernel:

https://github.com/projectacrn/acrn-kernel

 

BR.

Fuzhong

 

From: acrn-users@... <acrn-users@...> On Behalf Of siming
Sent: Monday, August 3, 2020 3:04 PM
To: acrn-users@...
Subject: Re: [acrn-users] GPT ERROR when write preempt img to sata on NUC7i5BNB

 

My environment is build according to the doc https://projectacrn.github.io/1.6/getting-started/rt_industry.html

Board NUC7i5BNB, with two disks: an NVMe disk and a SATA disk

# uname -a

Linux nuc-acrn 4.19.97-104.iot-lts2018-sos #1 SMP PREEMPT Wed Jan 22 14:37:18 PST 2020 x86_64 GNU/Linux

# cat /etc/os-release 

BUILD_ID=32680

# acrn-dm -v

DM version is: 1.6-unstable-2020w12.5.140000p_273 (daily tag:acrn-2020w12.5.140000p), build by mockbuild@2020-03-20 01:28:15

Thanks.

2020-08-03 14:43:42"Yin, Fengwei" <fengwei.yin@...> 写道:
>Hi Siming,
>On 8/3/2020 2:23 PM, siming wrote:
>> Hi Fengwei,
>> I have tried two ways to boot preempt uos, but no success. There were 
>> error logs in the previousemail.
>So you saw "pci passthru fail" when you use your launch_hard_rt_vm1.sh?
>Could you please share the whole launch_hard_rt_vm1.sh script?
>Also the version of acrn hypervisor, acrn-dm and SOS kernel version
>could help here. Thanks.
>Regards
>Yin, Fengwei
>>> 
>>>     <    -s 2,*passthru*,00/17/0 \
>>> 
>>>     ---
>>> 
>>>     >    -s 2*,virtio-blk*,/dev/sda \
>>> 
>> 
>> Best Regards.
>> 
>> 
>> 
>> 
>> At 2020-08-03 10:23:11, "Yin, Fengwei" <fengwei.yin@...> wrote:
>> 
>>     Hi Siming,
>> 
>>     I suppose you need passthru the SATA controller to your second VM.
>>     Not using virtio block
>> 
>>     based /dev/sda.
>> 
>> 
>>     Regards
>>     Yin, Fengwei
>>     ------------------------------------
>> 
>>     On 8/3/20 8:52 AM, siming wrote:
>>>     I have boot from sata by choose sata in the boot menu:
>>>     UEFI:SATA PORT 0 : OS Bootloader
>>>     the systen works well, system info :
>>>     root@clr-preempt-rt~#: uname -a
>>>     Linux clr-preempt-rt 4.19.94-20.iot-lts2018-preempt-rt #1 SMP
>>>     PREEMPT RT Thu Jan 23 15:05:47 PST 2020 x86_64 GNU/Linux
>>> 
>>> 
>>> 
>>> 
>>>      2020-08-03 07:10:44"Liu, Fuzhong" <fuzhong.liu@...> 写道:
>>> 
>>>         Hi
>>> 
>>>         Could you please double check if it can native boot from sda?
>>> 
>>>          1. set boot order to Built-in shell;
>>>          2. type fs0: ENTER
>>>          3. cd EFI/BOOT ENTER
>>>          4. run BOOTX64.EFI
>>> 
>>>         BR.
>>> 
>>>         Fuzhong
>>> 
>>>         *From:*acrn-users@...
>>>         <acrn-users@...> *On Behalf Of *siming
>>>         *Sent:* Saturday, August 1, 2020 9:50 AM
>>>         *To:* acrn-users@...
>>>         *Subject:* Re: [acrn-users] GPT ERROR when write preempt img
>>>         to sata on NUC7i5BNB
>>> 
>>>         thanks for the direction, the dd commond works fine in the
>>>         native boot, but the launch rt vm still failed (in acrn boot).
>>> 
>>>         I tried two way to launch the vm, the difference is "-s 2 " of
>>>         the acrn-dm.
>>> 
>>>         # diff launch_hard_rt_vm1.sh launch_hard_rt_vm2.sh
>>> 
>>>         <   -s 2,*passthru*,00/17/0 \
>>> 
>>>         ---
>>> 
>>>         >   -s 2*,virtio-blk*,/dev/sda \
>>> 
>>>         *launch_hard_rt_vm1.sh error log:*
>>> 
>>>         modify_bar_registration: bypass for pci-passthru 0:2.0
>>> 
>>>         [  41.557774] Unknown IOCTL 0x43000055
>>> 
>>>         pci passthru init failed
>>> 
>>>         mngr_client_new: Failed to accept from fd 35, err: Invalid
>>>         argument
>>> 
>>>         Stop listening 35...
>>> 
>>>         Stop polling 35...
>>> 
>>>         Unable to init vdev (22)
>>> 
>>>         *launch_hard_rt_vm2.sh error log:*
>>> 
>>>         polling 35...
>>> 
>>>         pci init hostbridge
>>> 
>>>         pci init virtio-blk
>>> 
>>>         acrn-dm: Could not open backing file: /dev/sdaListening 35...
>>> 
>>>         : No such file or directory
>>> 
>>>         Could not open backing filepci virtio-blk init failed
>>> 
>>>         mngr_client_new: Failed to accept from fd 35, err: Invalid
>>>         argument
>>> 
>>>         Stop listening 35...
>>> 
>>>         my sata info:
>>> 
>>>         $ lsblk
>>> 
>>>         NAME       MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
>>> 
>>>         sda          8:0    0 111.8G  0 disk
>>> 
>>>         ├─sda1       8:1    0   510M  0 part
>>> 
>>>         ├─sda2       8:2    0    33M  0 part
>>> 
>>>         └─sda3       8:3    0     8G  0 part
>>> 
>>>         nvme0n1    259:0    0 238.5G  0 disk
>>> 
>>>         ├─nvme0n1p1 259:1    0   142M  0 part
>>> 
>>>         ├─nvme0n1p2 259:2    0   244M  0 part [SWAP]
>>> 
>>>         └─nvme0n1p3 259:3    0 238.1G  0 part /
>>> 
>>>         $ lspci -nn | grep SATA
>>> 
>>>         00:17.0 SATA controller [0106]: Intel Corporation Sunrise
>>>         Point-LP SATA Controller [AHCI mode] [8086:9d03] (rev 21)
>>> 
>>>         The attachment is the error logs and the launch script.
>>> 
>>>         Best Regards
>>> 
>>>         2020-07-31 15:47:15"Liu, Fuzhong" <fuzhong.liu@...
>>>         <mailto:fuzhong.liu@...>> 写道:
>>> 
>>>             Please set boot order to Built-in shell;
>>> 
>>>             then type fs1: ENTER
>>> 
>>>             cd EFI/BOOT ENTER
>>> 
>>>             run BOOTX64.EFI
>>> 
>>>             It will boot from native.
>>> 
>>>             BR.
>>> 
>>>             Fuzhong
>>> 
>>>             *From:*acrn-users@...
>>>             <mailto:acrn-users@...>
>>>             <acrn-users@...
>>>             <mailto:acrn-users@...>> *On Behalf Of
>>>             *siming
>>>             *Sent:* Friday, July 31, 2020 2:10 PM
>>>             *To:* acrn-users@...
>>>             <mailto:acrn-users@...>
>>>             *Subject:* Re: [acrn-users] GPT ERROR when write preempt
>>>             img to sata on NUC7i5BNB
>>> 
>>>             thanks for the responds.I did the dd comond in the acrn boot.
>>> 
>>>             After I install the service VM with./acrn_quick_setup.sh
>>>             ,I cannot boot into /Clear-linux-native-5.5.11-922/. The
>>>             HDMI is nothing out when I choose this.
>>> 
>>>             /  Clear Linux OS(acrn)/
>>> 
>>>             /  Clear Linux OS(Clear-linux-iot-lts2018-sos-4.19.97-104)/
>>> 
>>>             /  Clear Linux OS(Clear-linux-native-5.5.11-922)/
>>> 
>>>             Did I miss something in the set up of the service vm?
>>> 
>>>             thanks
>>> 
>>>             2020-07-31 12:58:21"Liu, Fuzhong"
>>>             <fuzhong.liu@... <mailto:fuzhong.liu@...>> 写道:
>>> 
>>>                 Hi
>>> 
>>>                 The dd issue is for acrn boot or native boot?
>>> 
>>>                 Please  boot into native and try it again.
>>> 
>>>                 Thanks!
>>> 
>>>                 BR.
>>> 
>>>                 Fuzhong
>>> 
>>>                 *From:*acrn-users@...
>>>                 <mailto:acrn-users@...>
>>>                 <acrn-users@...
>>>                 <mailto:acrn-users@...>> *On Behalf
>>>                 Of *siming
>>>                 *Sent:* Friday, July 31, 2020 11:34 AM
>>>                 *To:* acrn-users@...
>>>                 <mailto:acrn-users@...>
>>>                 *Subject:* [acrn-users] GPT ERROR when write preempt
>>>                 img to sata on NUC7i5BNB
>>> 
>>>                 Hi,
>>> 
>>>                   My board is NUC7i5BNB, with two disks: an NVMe disk
>>>                 for the Clear Linux-based Service VM and a SATA disk
>>>                 for the RTVM.Accoring to
>>>                 https://projectacrn.github.io/1.6/getting-started/rt_industry.html#install-and-launch-the-preempt-rt-vm,
>>>                 when I write preempt img to sata, there is always have
>>>                 gpt errors. I have chaged another sata disk, but it's
>>>                 the same error.
>>> 
>>>                 |root@nuc-acrn /home/acrn # dd
>>>                 if=./preempt-rt-32680.img of=/dev/sda bs=4M oflag=sync
>>>                 status=progress iflag=fullblock seek=0 conv=notrunc|
>>> 
>>>                 |9122611200 bytes (9.1 GB, 8.5 GiB) copied, 124 s, 73.5
>>>                 MB/s|
>>> 
>>>                 |2186+1 records in|
>>> 
>>>                 |2186+1 records out |
>>> 
>>>                 |9169755648 bytes (9.2 GB, 8.5 GiB) copied, 126.281 s,
>>>                 72.6 MB/s|
>>> 
>>>                 |[  171.967643] GPT:Primary header thinks Alt. header
>>>                 is not at the end of the disk.|
>>> 
>>>                 |[  171.967982] GPT:17909678 != 234441647|
>>> 
>>>                 |[  171.968146] GPT:Alternate GPT header not at the end
>>>                 of the disk.|
>>> 
>>>                 |[  171.968406] GPT:17909678 != 234441647|
>>> 
>>>                 |[  171.968616] GPT: Use GNU Parted to correct GPT errors.|
>>> 
>>>                 |[  171.968864]  sda: sda1 sda2 sda3|
>>> 
>>>                 then I run the launch_hard_rt_vm.sh, it cannot create
>>>                 VM from Hypervisor.
>>> 
>>>                 |root@nuc-acrn /home/acrn # ./launch_hard_rt_vm.sh|
>>> 
>>>                 |cpu1 online=1 |
>>> 
>>>                 |[ 1525.901370] smpboot: CPU 1 is now offline|
>>> 
>>>                 |[ 1525.902204] vhm: try to offline cpu 1 with lapicid 2|
>>> 
>>>                 |cpu2 online=1 |
>>> 
>>>                 |[ 1525.916019] smpboot: CPU 2 is now offline|
>>> 
>>>                 |[ 1525.917264] vhm: try to offline cpu 2 with lapicid 1|
>>> 
>>>                 |cpu3 online=1 |
>>> 
>>>                 |[ 1525.929538] smpboot: CPU 3 is now offline|
>>> 
>>>                 |[ 1525.930969] vhm: try to offline cpu 3 with lapicid 3|
>>> 
>>>                 |[ 1525.935378] ata1.00: disabled|
>>> 
>>>                 |[ 1525.938524] sd 0:0:0:0: [sda] Synchronizing SCSI cache|
>>> 
>>>                 |[ 1525.939206] sd 0:0:0:0: [sda] Synchronize Cache(10)
>>>                 failed: Result: hostbyte=DID_BAD_TARGET
>>>                 driverbyte=DRIVER_OK|
>>> 
>>>                 |[ 1525.941643] sd 0:0:0:0: [sda] Stopping disk|
>>> 
>>>                 |[ 1525.941888] sd 0:0:0:0: [sda] Start/Stop Unit
>>>                 failed: Result: hostbyte=DID_BAD_TARGET
>>>                 driverbyte=DRIVER_OK|
>>> 
>>>                 |[ 1525.956762] pci-stub 0000:00:17.0: claimed by stub|
>>> 
>>>                 |pm by vuart node-index = 1 |
>>> 
>>>                 |SW_LOAD: get ovmf path /usr/share/acrn/bios/OVMF.fd,
>>>                 size 0x200000 |
>>> 
>>>                 |vm_create: hard_rtvm |
>>> 
>>>                 |[ 1525.981345] vhm_dev_open: opening device node|
>>> 
>>>                 |VHM api version 1.0 |
>>> 
>>>                 |[ 1525.982333] vhm: failed to create VM from Hypervisor !|
>>> 
>>>                 |[ 1526.483047] vhm: failed to create VM from Hypervisor !|
>>> 
>>>                 |[ 1526.983377] vhm: failed to create VM from Hypervisor !|
>>> 
>>>                 |[ 1527.483702] vhm: failed to create VM from Hypervisor !|
>>> 
>>>                 |[ 1527.984028] vhm: failed to create VM from Hypervisor !|
>>> 
>>>                 |[ 1528.484363] vhm: failed to create VM from Hypervisor !|
>>> 
>>>                 |[ 1528.984686] vhm: failed to create VM from Hypervisor !|
>>> 
>>>                 |[ 1529.485021] vhm: failed to create VM from Hypervisor !|
>>> 
>>>                 |[ 1529.985346] vhm: failed to create VM from Hypervisor !|
>>> 
>>>                 |[ 1530.485672] vhm: failed to create VM from Hypervisor !|
>>> 
>>>                 |failed to create VM hard_rtvm |
>>> 
>>>                 |vm_create failed|
>>> 
>>>                 |[ 1530.994415] vhm: freed vm|
>>> 
>>>                 Thanks!
>>> 
>>>                 ZS
>>> 
>>> 
>>> 
>> 


siming
 

The sda is available before run the script. 
 The launch script is  launch_hard_rt_vm2.sh which atteched before.
$ lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda           8:0    0 111.8G  0 disk 
├─sda1        8:1    0   510M  0 part 
├─sda2        8:2    0    33M  0 part 
└─sda3        8:3    0     8G  0 part 
nvme0n1     259:0    0 238.5G  0 disk 
├─nvme0n1p1 259:1    0   142M  0 part 
├─nvme0n1p2 259:2    0   244M  0 part [SWAP]
└─nvme0n1p3 259:3    0 238.1G  0 part /


After running the script, the sda is unavaliable.
$ lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
nvme0n1     259:0    0 238.5G  0 disk 
├─nvme0n1p1 259:1    0   142M  0 part 
├─nvme0n1p2 259:2    0   244M  0 part [SWAP]
└─nvme0n1p3 259:3    0 238.1G  0 part /





在 2020-08-04 16:21:47,"Liu, Fuzhong" <fuzhong.liu@...> 写道:

Hi Siming

Please share your launch script and  run “lsblk” in sos console to check if sda is available.

 

BR.

Fuzhong

 

 

From: acrn-users@... <acrn-users@...> On Behalf Of siming
Sent: Tuesday, August 4, 2020 4:13 PM
To: acrn-users@...
Subject: Re: [acrn-users] GPT ERROR when write preempt img to sata on NUC7i5BNB

 

Hi Fuzhong,

Thanks for the test.

I have update the Service VM with  Acrn Hypervisor 2.0 release and Acrn Kernel 2.0 release

# uname -a

Linux nuc-acrn 5.4.43-PKT-200203T060100Z #3 SMP PREEMPT Tue Aug 4 10:24:36 CST 2020 x86_64 GNU/Linux

 # acrn-dm -v

DM version is: 2.0-64896ac9 (daily tag:acrn-2020w25.7-180000p), build by acrn@2020-08-04 10:38:21

 

There is a new socket error,  does any help?

 

polling 35...

Listening 35...

initiate a connection on a socket error

create socket to connect life-cycle manager failed

pci init hostbridge

pci init virtio-blk

acrn-dm: Could not open backing file: /dev/sda: No such file or directory

Could not open backing filepci virtio-blk init failed

mngr_client_new: Failed to accept from fd 35, err: Invalid argument

Stop listening 35...

Stop polling 35...

 

Thanks!

 

 

2020-08-04 14:24:41"Liu, Fuzhong" <fuzhong.liu@...> 写道:

Hi Siming

Narrow down your issue here:  

As mentioned in below doc; please modify the script to use the virtio device.

https://projectacrn.github.io/1.6/getting-started/rt_industry.html#install-and-launch-the-preempt-rt-vm

5 Modify the script to use the virtio device.

# NVME pass-through

#echo ${passthru_vpid["nvme"]} > /sys/bus/pci/drivers/pci-stub/new_id

#echo ${passthru_bdf["nvme"]} > /sys/bus/pci/devices/${passthru_bdf["nvme"]}/driver/unbind

#echo ${passthru_bdf["nvme"]} > /sys/bus/pci/drivers/pci-stub/bind

/usr/bin/acrn-dm -A -m $mem_size -s 0:0,hostbridge \

   --lapic_pt \

   --rtvm \

   --virtio_poll 1000000 \

   -U 495ae2e5-2603-4d64-af76-d4bc5a8ec0e5 \

   -s 2,virtio-blk,/dev/sda \

   -s 3,virtio-console,@stdio:stdio_port \

   $pm_channel $pm_by_vuart \

   --ovmf /usr/share/acrn/bios/OVMF.fd \

   hard_rtvm

 

}

 

The reason about below error log for virtio-blk on your side is: your run sata passthrough script before; just reboot can fix it

>>>         acrn-dm: Could not open backing file: /dev/sdaListening 35...
>>> 
>>>         : No such file or directory

 

It is successful log on my side:

root@clr-sos/home/acrn # ./launch_hard_rt_vm.sh

cpu1 online=1

cpu2 online=1

cpu3 online=1

pm by vuart node-index = 1

SW_LOAD: get ovmf path /usr/share/acrn/bios/OVMF.fd, size 0x200000

vm_create: hard_rtvm

VHM api version 1.0

vm_setup_memory: size=0x40000000

open hugetlbfs file /run/hugepage/acrn/huge_lv1/hard_rtvm/495AE2E526034D64AF76D4BC5A8EC0E5

open hugetlbfs file /run/hugepage/acrn/huge_lv2/hard_rtvm/495AE2E526034D64AF76D4BC5A8EC0E5

level 0 free/need pages:0/1 page size:0x200000

level 1 free/need pages:0/1 page size:0x40000000

to reserve more free pages:

to reserve pages (+orig 0): echo 1 > /sys/kernel/mm/hugepages/hugepages-1048576kB/nr_hugepages

to reserve pages (+orig 0): echo 1 > /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages

now enough free pages are reserved!

 

try to setup hugepage with:

        level 0 - lowmem 0x0, biosmem 0x200000, highmem 0x0

        level 1 - lowmem 0x40000000, biosmem 0x0, highmem 0x0

total_size 0x180000000

 

mmap ptr 0x0x7f2717719000 -> baseaddr 0x0x7f2740000000

mmap 0x40000000@0x7f2740000000

touch 1 pages with pagesz 0x40000000

mmap 0x200000@0x7f283fe00000

touch 1 pages with pagesz 0x200000

 

really setup hugepage with:

        level 0 - lowmem 0x0, biosmem 0x200000, highmem 0x0

        level 1 - lowmem 0x40000000, biosmem 0x0, highmem 0x0

vm_init_vdevs

pm_by_vuart_init idx: 1, path: /dev/ttyS1

polling 35...

Listening 35...

pci init hostbridge

pci init virtio-blk

pci init virtio-console

tpm: init_vtpm2:Invalid socket path!

                                    /tmp/dm.XtXd2gw     24:     Device (PCI0)

                                                                             Warning  3073 -        Multiple types ^  (Device object requires either a _HID or _ADR, but not both)

 

                        /tmp/dm.XtXd2gw    110:     Processor (CPU0, 0x00, 0x00000000, 0x00) {}

                                                                                               Warning  3168 -                          ^ Legacy Processor() keyword detected. Use Device() keyword instead.

 

                                                  /tmp/dm.XtXd2gw    111:     Processor (CPU1, 0x01, 0x00000000, 0x00) {}

                                                                                                                         Warning  3168 -                          ^ Legacy Processor() keyword detected. Use Device() keyword instead.

 

                                                                            acrn_sw_load

                                                                                        SW_LOAD: partition blob /usr/share/acrn/bios/OVMF.fd size 2097152 copy to guest 0xffe00000

                        SW_LOAD: build e820 9 entries to addr: 0x7f27400ef008

SW_LOAD: entry[0]: addr 0x0000000000000000, size 0x00000000000a0000,  type 0x1

SW_LOAD: entry[1]: addr 0x00000000000a0000, size 0x0000000000060000,  type 0x2

SW_LOAD: entry[2]: addr 0x0000000000100000, size 0x000000003ff00000,  type 0x1

SW_LOAD: entry[3]: addr 0x0000000040000000, size 0x0000000040000000,  type 0x2

SW_LOAD: entry[4]: addr 0x0000000080000000, size 0x0000000008000000,  type 0x2

SW_LOAD: entry[5]: addr 0x00000000db000000, size 0x0000000004000000,  type 0x2

SW_LOAD: entry[6]: addr 0x00000000df000000, size 0x0000000001000000,  type 0x2

SW_LOAD: entry[7]: addr 0x00000000e0000000, size 0x0000000020000000,  type 0x2

SW_LOAD: entry[8]: addr 0x0000000100000000, size 0x0000000040000000,  type 0x2

SW_LOAD: ovmf_entry 0xfffffff0

                              add_cpu

                                     [    1.428076] Loaded X.509 cert 'Build time autogenerated kernel key: 7d0d4348a2d53344b884032935610ca63fc3911b'

[    1.429742] zswap: loaded using pool lzo/zbud

[    1.430841] Btrfs loaded, crc32c=crc32c-intel

[    1.431928] md: Skipping autodetection of RAID arrays. (raid=autodetect will force)

[    1.457635] EXT4-fs (vda3): mounted filesystem with ordered data mode. Opts: (null)

[    1.458872] VFS: Mounted root (ext4 filesystem) on device 253:3.

[    1.462339] devtmpfs: mounted

[    1.463642] Freeing unused kernel image memory: 1224K

[    1.464638] Write protecting the kernel read-only data: 24576k

[    1.467056] Freeing unused kernel image memory: 2008K

[    1.468548] Freeing unused kernel image memory: 1128K

[    1.469452] Run /sbin/init as init process

[    1.620880] systemd[1]: systemd 244 running in system mode. (+PAM +AUDIT -SELINUX +IMA -APPARMOR -SMACK -SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 -IDN -PCRE2 default-hierarchy=hybrid)

[    1.623862] systemd[1]: Detected virtualization acrn.

[    1.624544] systemd[1]: Detected architecture x86-64.

[    1.630657] systemd[1]: Set hostname to <clr-preempt-rt>.

[    1.822797] systemd[1]: Created slice system-getty.slice.

[    1.824261] systemd[1]: Created slice system-serial\x2dgetty.slice.

[    1.825647] systemd[1]: Created slice User and Session Slice.

[    1.826651] systemd[1]: Started Dispatch Password Requests to Console Directory Watch.

[    1.827832] systemd[1]: Started Forward Password Requests to Wall Directory Watch.

[    1.829366] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.

[    1.830668] systemd[1]: Reached target Local Encrypted Volumes.

[    1.831537] systemd[1]: Reached target Remote File Systems.

[    1.832266] systemd[1]: Reached target Slices.

[    1.835095] systemd[1]: Listening on Process Core Dump Socket.

[    1.836157] systemd[1]: Listening on initctl Compatibility Named Pipe.

[    1.840333] systemd[1]: Condition check resulted in Journal Audit Socket being skipped.

[    1.841799] systemd[1]: Listening on Journal Socket (/dev/log).

[    1.843022] systemd[1]: Listening on Journal Socket.

[    1.843918] systemd[1]: Listening on Network Service Netlink Socket.

[    1.845108] systemd[1]: Listening on udev Control Socket.

[    1.845942] systemd[1]: Listening on udev Kernel Socket.

[    1.848537] systemd[1]: Starting Create list of static device nodes for the current kernel...

[    1.850115] systemd[1]: Condition check resulted in Set Up Additional Binary Formats being skipped.

[    1.857603] systemd[1]: Starting Journal Service...

[    1.858787] systemd[1]: Condition check resulted in Load Kernel Modules being skipped.

[    1.868541] systemd[1]: Starting Remount Root and Kernel File Systems...

[    1.874521] systemd[1]: Starting Apply Kernel Variables...

[    1.888076] systemd[1]: Starting udev Coldplug all Devices...

[    1.908507] systemd[1]: Starting udev Kernel Device Manager...

[    1.929253] systemd[1]: Started Create list of static device nodes for the current kernel.

[    1.947839] systemd[1]: Started Remount Root and Kernel File Systems.

[    1.950075] systemd[1]: Started Apply Kernel Variables.

[    1.954582] systemd[1]: Reached target Local File Systems (Pre).

[    1.965499] systemd[1]: Starting Load/Save Random Seed...

[    1.989257] systemd[1]: Started Load/Save Random Seed.

[    2.128280] systemd[1]: Started udev Coldplug all Devices.

[    2.792368] systemd[1]: Started Journal Service.

[    2.810609] systemd-journald[217]: Received client request to flush runtime journal.

[    3.369201] Adding 33788k swap on /dev/vda2.  Priority:-2 extents:1 across:33788k FS

 

clr-preempt-rt login: root

Password:

Last login: Tue Aug  4 09:29:38 on tty1

root@clr-preempt-rt ~ #

root@clr-preempt-rt ~ # uname -a

Linux clr-preempt-rt 4.19.94-20.iot-lts2018-preempt-rt #1 SMP PREEMPT RT Thu Jan 23 15:05:47 PST 2020 x86_64 GNU/Linux

root@clr-preempt-rt ~ #

 

If you really want to passthrough SATA SSDto RTVM, please use acrn-kernel:

https://github.com/projectacrn/acrn-kernel

 

BR.

Fuzhong

 

From: acrn-users@... <acrn-users@...> On Behalf Of siming
Sent: Monday, August 3, 2020 3:04 PM
To: acrn-users@...
Subject: Re: [acrn-users] GPT ERROR when write preempt img to sata on NUC7i5BNB

 

My environment is build according to the doc https://projectacrn.github.io/1.6/getting-started/rt_industry.html

Board NUC7i5BNB, with two disks: an NVMe disk and a SATA disk

# uname -a

Linux nuc-acrn 4.19.97-104.iot-lts2018-sos #1 SMP PREEMPT Wed Jan 22 14:37:18 PST 2020 x86_64 GNU/Linux

# cat /etc/os-release 

BUILD_ID=32680

# acrn-dm -v

DM version is: 1.6-unstable-2020w12.5.140000p_273 (daily tag:acrn-2020w12.5.140000p), build by mockbuild@2020-03-20 01:28:15

Thanks.

2020-08-03 14:43:42"Yin, Fengwei" <fengwei.yin@...> 写道:
>Hi Siming,
>On 8/3/2020 2:23 PM, siming wrote:
>> Hi Fengwei,
>> I have tried two ways to boot preempt uos, but no success. There were 
>> error logs in the previousemail.
>So you saw "pci passthru fail" when you use your launch_hard_rt_vm1.sh?
>Could you please share the whole launch_hard_rt_vm1.sh script?
>Also the version of acrn hypervisor, acrn-dm and SOS kernel version
>could help here. Thanks.
>Regards
>Yin, Fengwei
>>> 
>>>     <    -s 2,*passthru*,00/17/0 \
>>> 
>>>     ---
>>> 
>>>     >    -s 2*,virtio-blk*,/dev/sda \
>>> 
>> 
>> Best Regards.
>> 
>> 
>> 
>> 
>> At 2020-08-03 10:23:11, "Yin, Fengwei" <fengwei.yin@...> wrote:
>> 
>>     Hi Siming,
>> 
>>     I suppose you need passthru the SATA controller to your second VM.
>>     Not using virtio block
>> 
>>     based /dev/sda.
>> 
>> 
>>     Regards
>>     Yin, Fengwei
>>     ------------------------------------
>> 
>>     On 8/3/20 8:52 AM, siming wrote:
>>>     I have boot from sata by choose sata in the boot menu:
>>>     UEFI:SATA PORT 0 : OS Bootloader
>>>     the systen works well, system info :
>>>     root@clr-preempt-rt~#: uname -a
>>>     Linux clr-preempt-rt 4.19.94-20.iot-lts2018-preempt-rt #1 SMP
>>>     PREEMPT RT Thu Jan 23 15:05:47 PST 2020 x86_64 GNU/Linux
>>> 
>>> 
>>> 
>>> 
>>>      2020-08-03 07:10:44"Liu, Fuzhong" <fuzhong.liu@...> 写道:
>>> 
>>>         Hi
>>> 
>>>         Could you please double check if it can native boot from sda?
>>> 
>>>          1. set boot order to Built-in shell;
>>>          2. type fs0: ENTER
>>>          3. cd EFI/BOOT ENTER
>>>          4. run BOOTX64.EFI
>>> 
>>>         BR.
>>> 
>>>         Fuzhong
>>> 
>>>         *From:*acrn-users@...
>>>         <acrn-users@...> *On Behalf Of *siming
>>>         *Sent:* Saturday, August 1, 2020 9:50 AM
>>>         *To:* acrn-users@...
>>>         *Subject:* Re: [acrn-users] GPT ERROR when write preempt img
>>>         to sata on NUC7i5BNB
>>> 
>>>         thanks for the direction, the dd commond works fine in the
>>>         native boot, but the launch rt vm still failed (in acrn boot).
>>> 
>>>         I tried two way to launch the vm, the difference is "-s 2 " of
>>>         the acrn-dm.
>>> 
>>>         # diff launch_hard_rt_vm1.sh launch_hard_rt_vm2.sh
>>> 
>>>         <   -s 2,*passthru*,00/17/0 \
>>> 
>>>         ---
>>> 
>>>         >   -s 2*,virtio-blk*,/dev/sda \
>>> 
>>>         *launch_hard_rt_vm1.sh error log:*
>>> 
>>>         modify_bar_registration: bypass for pci-passthru 0:2.0
>>> 
>>>         [  41.557774] Unknown IOCTL 0x43000055
>>> 
>>>         pci passthru init failed
>>> 
>>>         mngr_client_new: Failed to accept from fd 35, err: Invalid
>>>         argument
>>> 
>>>         Stop listening 35...
>>> 
>>>         Stop polling 35...
>>> 
>>>         Unable to init vdev (22)
>>> 
>>>         *launch_hard_rt_vm2.sh error log:*
>>> 
>>>         polling 35...
>>> 
>>>         pci init hostbridge
>>> 
>>>         pci init virtio-blk
>>> 
>>>         acrn-dm: Could not open backing file: /dev/sdaListening 35...
>>> 
>>>         : No such file or directory
>>> 
>>>         Could not open backing filepci virtio-blk init failed
>>> 
>>>         mngr_client_new: Failed to accept from fd 35, err: Invalid
>>>         argument
>>> 
>>>         Stop listening 35...
>>> 
>>>         my sata info:
>>> 
>>>         $ lsblk
>>> 
>>>         NAME       MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
>>> 
>>>         sda          8:0    0 111.8G  0 disk
>>> 
>>>         ├─sda1       8:1    0   510M  0 part
>>> 
>>>         ├─sda2       8:2    0    33M  0 part
>>> 
>>>         └─sda3       8:3    0     8G  0 part
>>> 
>>>         nvme0n1    259:0    0 238.5G  0 disk
>>> 
>>>         ├─nvme0n1p1 259:1    0   142M  0 part
>>> 
>>>         ├─nvme0n1p2 259:2    0   244M  0 part [SWAP]
>>> 
>>>         └─nvme0n1p3 259:3    0 238.1G  0 part /
>>> 
>>>         $ lspci -nn | grep SATA
>>> 
>>>         00:17.0 SATA controller [0106]: Intel Corporation Sunrise
>>>         Point-LP SATA Controller [AHCI mode] [8086:9d03] (rev 21)
>>> 
>>>         The attachment is the error logs and the launch script.
>>> 
>>>         Best Regards
>>> 
>>>         2020-07-31 15:47:15"Liu, Fuzhong" <fuzhong.liu@...
>>>         <mailto:fuzhong.liu@...>> 写道:
>>> 
>>>             Please set boot order to Built-in shell;
>>> 
>>>             then type fs1: ENTER
>>> 
>>>             cd EFI/BOOT ENTER
>>> 
>>>             run BOOTX64.EFI
>>> 
>>>             It will boot from native.
>>> 
>>>             BR.
>>> 
>>>             Fuzhong
>>> 
>>>             *From:*acrn-users@...
>>>             <mailto:acrn-users@...>
>>>             <acrn-users@...
>>>             <mailto:acrn-users@...>> *On Behalf Of
>>>             *siming
>>>             *Sent:* Friday, July 31, 2020 2:10 PM
>>>             *To:* acrn-users@...
>>>             <mailto:acrn-users@...>
>>>             *Subject:* Re: [acrn-users] GPT ERROR when write preempt
>>>             img to sata on NUC7i5BNB
>>> 
>>>             thanks for the responds.I did the dd comond in the acrn boot.
>>> 
>>>             After I install the service VM with./acrn_quick_setup.sh
>>>             ,I cannot boot into /Clear-linux-native-5.5.11-922/. The
>>>             HDMI is nothing out when I choose this.
>>> 
>>>             /  Clear Linux OS(acrn)/
>>> 
>>>             /  Clear Linux OS(Clear-linux-iot-lts2018-sos-4.19.97-104)/
>>> 
>>>             /  Clear Linux OS(Clear-linux-native-5.5.11-922)/
>>> 
>>>             Did I miss something in the set up of the service vm?
>>> 
>>>             thanks
>>> 
>>>             2020-07-31 12:58:21"Liu, Fuzhong"
>>>             <fuzhong.liu@... <mailto:fuzhong.liu@...>> 写道:
>>> 
>>>                 Hi
>>> 
>>>                 The dd issue is for acrn boot or native boot?
>>> 
>>>                 Please  boot into native and try it again.
>>> 
>>>                 Thanks!
>>> 
>>>                 BR.
>>> 
>>>                 Fuzhong
>>> 
>>>                 *From:*acrn-users@...
>>>                 <mailto:acrn-users@...>
>>>                 <acrn-users@...
>>>                 <mailto:acrn-users@...>> *On Behalf
>>>                 Of *siming
>>>                 *Sent:* Friday, July 31, 2020 11:34 AM
>>>                 *To:* acrn-users@...
>>>                 <mailto:acrn-users@...>
>>>                 *Subject:* [acrn-users] GPT ERROR when write preempt
>>>                 img to sata on NUC7i5BNB
>>> 
>>>                 Hi,
>>> 
>>>                   My board is NUC7i5BNB, with two disks: an NVMe disk
>>>                 for the Clear Linux-based Service VM and a SATA disk
>>>                 for the RTVM.Accoring to
>>>                 https://projectacrn.github.io/1.6/getting-started/rt_industry.html#install-and-launch-the-preempt-rt-vm,
>>>                 when I write preempt img to sata, there is always have
>>>                 gpt errors. I have chaged another sata disk, but it's
>>>                 the same error.
>>> 
>>>                 |root@nuc-acrn /home/acrn # dd
>>>                 if=./preempt-rt-32680.img of=/dev/sda bs=4M oflag=sync
>>>                 status=progress iflag=fullblock seek=0 conv=notrunc|
>>> 
>>>                 |9122611200 bytes (9.1 GB, 8.5 GiB) copied, 124 s, 73.5
>>>                 MB/s|
>>> 
>>>                 |2186+1 records in|
>>> 
>>>                 |2186+1 records out |
>>> 
>>>                 |9169755648 bytes (9.2 GB, 8.5 GiB) copied, 126.281 s,
>>>                 72.6 MB/s|
>>> 
>>>                 |[  171.967643] GPT:Primary header thinks Alt. header
>>>                 is not at the end of the disk.|
>>> 
>>>                 |[  171.967982] GPT:17909678 != 234441647|
>>> 
>>>                 |[  171.968146] GPT:Alternate GPT header not at the end
>>>                 of the disk.|
>>> 
>>>                 |[  171.968406] GPT:17909678 != 234441647|
>>> 
>>>                 |[  171.968616] GPT: Use GNU Parted to correct GPT errors.|
>>> 
>>>                 |[  171.968864]  sda: sda1 sda2 sda3|
>>> 
>>>                 then I run the launch_hard_rt_vm.sh, it cannot create
>>>                 VM from Hypervisor.
>>> 
>>>                 |root@nuc-acrn /home/acrn # ./launch_hard_rt_vm.sh|
>>> 
>>>                 |cpu1 online=1 |
>>> 
>>>                 |[ 1525.901370] smpboot: CPU 1 is now offline|
>>> 
>>>                 |[ 1525.902204] vhm: try to offline cpu 1 with lapicid 2|
>>> 
>>>                 |cpu2 online=1 |
>>> 
>>>                 |[ 1525.916019] smpboot: CPU 2 is now offline|
>>> 
>>>                 |[ 1525.917264] vhm: try to offline cpu 2 with lapicid 1|
>>> 
>>>                 |cpu3 online=1 |
>>> 
>>>                 |[ 1525.929538] smpboot: CPU 3 is now offline|
>>> 
>>>                 |[ 1525.930969] vhm: try to offline cpu 3 with lapicid 3|
>>> 
>>>                 |[ 1525.935378] ata1.00: disabled|
>>> 
>>>                 |[ 1525.938524] sd 0:0:0:0: [sda] Synchronizing SCSI cache|
>>> 
>>>                 |[ 1525.939206] sd 0:0:0:0: [sda] Synchronize Cache(10)
>>>                 failed: Result: hostbyte=DID_BAD_TARGET
>>>                 driverbyte=DRIVER_OK|
>>> 
>>>                 |[ 1525.941643] sd 0:0:0:0: [sda] Stopping disk|
>>> 
>>>                 |[ 1525.941888] sd 0:0:0:0: [sda] Start/Stop Unit
>>>                 failed: Result: hostbyte=DID_BAD_TARGET
>>>                 driverbyte=DRIVER_OK|
>>> 
>>>                 |[ 1525.956762] pci-stub 0000:00:17.0: claimed by stub|
>>> 
>>>                 |pm by vuart node-index = 1 |
>>> 
>>>                 |SW_LOAD: get ovmf path /usr/share/acrn/bios/OVMF.fd,
>>>                 size 0x200000 |
>>> 
>>>                 |vm_create: hard_rtvm |
>>> 
>>>                 |[ 1525.981345] vhm_dev_open: opening device node|
>>> 
>>>                 |VHM api version 1.0 |
>>> 
>>>                 |[ 1525.982333] vhm: failed to create VM from Hypervisor !|
>>> 
>>>                 |[ 1526.483047] vhm: failed to create VM from Hypervisor !|
>>> 
>>>                 |[ 1526.983377] vhm: failed to create VM from Hypervisor !|
>>> 
>>>                 |[ 1527.483702] vhm: failed to create VM from Hypervisor !|
>>> 
>>>                 |[ 1527.984028] vhm: failed to create VM from Hypervisor !|
>>> 
>>>                 |[ 1528.484363] vhm: failed to create VM from Hypervisor !|
>>> 
>>>                 |[ 1528.984686] vhm: failed to create VM from Hypervisor !|
>>> 
>>>                 |[ 1529.485021] vhm: failed to create VM from Hypervisor !|
>>> 
>>>                 |[ 1529.985346] vhm: failed to create VM from Hypervisor !|
>>> 
>>>                 |[ 1530.485672] vhm: failed to create VM from Hypervisor !|
>>> 
>>>                 |failed to create VM hard_rtvm |
>>> 
>>>                 |vm_create failed|
>>> 
>>>                 |[ 1530.994415] vhm: freed vm|
>>> 
>>>                 Thanks!
>>> 
>>>                 ZS
>>> 
>>> 
>>> 
>> 


Yin, Fengwei <fengwei.yin@...>
 

Hi Siming,

On 8/4/2020 4:35 PM, siming wrote:
The sda is available before run the script.
 The launch script is  launch_hard_rt_vm2.sh which atteched before.
$ lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda           8:0    0 111.8G  0 disk
├─sda1        8:1    0   510M  0 part
├─sda2        8:2    0    33M  0 part
└─sda3        8:3    0     8G  0 part
nvme0n1     259:0    0 238.5G  0 disk
├─nvme0n1p1 259:1    0   142M  0 part
├─nvme0n1p2 259:2    0   244M  0 part [SWAP]
└─nvme0n1p3 259:3    0 238.1G  0 part /
After running the script, the sda is unavaliable.
$ lsblk
NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
nvme0n1     259:0    0 238.5G  0 disk
├─nvme0n1p1 259:1    0   142M  0 part
├─nvme0n1p2 259:2    0   244M  0 part [SWAP]
└─nvme0n1p3 259:3    0 238.1G  0 part /
You need to update your launch_hard_rt_vm2.sh:
echo ${passthru_vpid["sata"]} > /sys/bus/pci/drivers/pci-stub/new_id
echo ${passthru_bdf["sata"]} > /sys/bus/pci/devices/${passthru_bdf["sata"]}/driver/unbind
echo ${passthru_bdf["sata"]} > /sys/bus/pci/drivers/pci-stub/bind

->
#echo ${passthru_vpid["sata"]} > /sys/bus/pci/drivers/pci-stub/new_id
#echo ${passthru_bdf["sata"]} > /sys/bus/pci/devices/${passthru_bdf["sata"]}/driver/unbind
#echo ${passthru_bdf["sata"]} > /sys/bus/pci/drivers/pci-stub/bind


Regards
Yin, Fengwei

在 2020-08-04 16:21:47,"Liu, Fuzhong" <fuzhong.liu@intel.com> 写道:
Hi Siming
Please share your launch script and  run “lsblk” in sos console to
check if sda is available.
BR.
Fuzhong
*From:*acrn-users@lists.projectacrn.org
<acrn-users@lists.projectacrn.org> *On Behalf Of *siming
*Sent:* Tuesday, August 4, 2020 4:13 PM
*To:* acrn-users@lists.projectacrn.org
*Subject:* Re: [acrn-users] GPT ERROR when write preempt img to sata
on NUC7i5BNB
Hi Fuzhong,
Thanks for the test.
I have update the Service VM with  Acrn Hypervisor 2.0 release and
Acrn Kernel 2.0 release
# uname -a
Linux nuc-acrn 5.4.43-PKT-200203T060100Z #3 SMP PREEMPT Tue Aug 4
10:24:36 CST 2020 x86_64 GNU/Linux
 # acrn-dm -v
DM version is: 2.0-64896ac9 (daily tag:acrn-2020w25.7-180000p),
build by acrn@2020-08-04 10:38:21
There is a new socket error,  does any help?
polling 35...
Listening 35...
*initiate a connection on a socket error*
*create socket to connect life-cycle manager failed*
pci init hostbridge
pci init virtio-blk
acrn-dm: Could not open backing file: /dev/sda: No such file or
directory
Could not open backing filepci virtio-blk init failed
mngr_client_new: Failed to accept from fd 35, err: Invalid argument
Stop listening 35...
Stop polling 35...
Thanks!
在2020-08-04 14:24:41,"Liu, Fuzhong" <fuzhong.liu@intel.com
<mailto:fuzhong.liu@intel.com>> 写道:
Hi Siming
Narrow down your issue here:
As mentioned in below doc; please modify the script to use the
virtio device.
https://projectacrn.github.io/1.6/getting-started/rt_industry.html#install-and-launch-the-preempt-rt-vm
5 Modify the script to use the virtio device.
# NVME pass-through
#echo ${passthru_vpid["nvme"]} >
/sys/bus/pci/drivers/pci-stub/new_id
#echo ${passthru_bdf["nvme"]} >
/sys/bus/pci/devices/${passthru_bdf["nvme"]}/driver/unbind
#echo ${passthru_bdf["nvme"]} > /sys/bus/pci/drivers/pci-stub/bind
/usr/bin/acrn-dm -A -m $mem_size -s 0:0,hostbridge \
   --lapic_pt \
   --rtvm \
   --virtio_poll 1000000 \
   -U 495ae2e5-2603-4d64-af76-d4bc5a8ec0e5 \
   -s 2,virtio-blk,/dev/sda \
   -s 3,virtio-console,@stdio:stdio_port \
   $pm_channel $pm_by_vuart \
   --ovmf /usr/share/acrn/bios/OVMF.fd \
   hard_rtvm
}
The reason about below error log for virtio-blk on your side is:
your run sata passthrough script before; just reboot can fix it

>>>         acrn-dm: Could not open backing file: /dev/sdaListening 35...

>>>

>>>         : No such file or directory
It is successful log on my side:
root@clr-sos/home/acrn # ./launch_hard_rt_vm.sh
cpu1 online=1
cpu2 online=1
cpu3 online=1
pm by vuart node-index = 1
SW_LOAD: get ovmf path /usr/share/acrn/bios/OVMF.fd, size 0x200000
vm_create: hard_rtvm
VHM api version 1.0
vm_setup_memory: size=0x40000000
open hugetlbfs file
/run/hugepage/acrn/huge_lv1/hard_rtvm/495AE2E526034D64AF76D4BC5A8EC0E5
open hugetlbfs file
/run/hugepage/acrn/huge_lv2/hard_rtvm/495AE2E526034D64AF76D4BC5A8EC0E5
level 0 free/need pages:0/1 page size:0x200000
level 1 free/need pages:0/1 page size:0x40000000
to reserve more free pages:
to reserve pages (+orig 0): echo 1 >
/sys/kernel/mm/hugepages/hugepages-1048576kB/nr_hugepages
to reserve pages (+orig 0): echo 1 >
/sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages
now enough free pages are reserved!
try to setup hugepage with:
        level 0 - lowmem 0x0, biosmem 0x200000, highmem 0x0
        level 1 - lowmem 0x40000000, biosmem 0x0, highmem 0x0
total_size 0x180000000
mmap ptr 0x0x7f2717719000 -> baseaddr 0x0x7f2740000000
mmap 0x40000000@0x7f2740000000
touch 1 pages with pagesz 0x40000000
mmap 0x200000@0x7f283fe00000
touch 1 pages with pagesz 0x200000
really setup hugepage with:
        level 0 - lowmem 0x0, biosmem 0x200000, highmem 0x0
        level 1 - lowmem 0x40000000, biosmem 0x0, highmem 0x0
vm_init_vdevs
pm_by_vuart_init idx: 1, path: /dev/ttyS1
polling 35...
Listening 35...
pci init hostbridge
pci init virtio-blk
pci init virtio-console
tpm: init_vtpm2:Invalid socket path!
                                    /tmp/dm.XtXd2gw     24: Device (PCI0)
                                                                             Warning  3073 -        Multiple types ^  (Device object requires either a _HID or _ADR, but not both)
                        /tmp/dm.XtXd2gw    110:     Processor
(CPU0, 0x00, 0x00000000, 0x00) {}
                                                                                               Warning 3168 -                          ^ Legacy Processor() keyword detected. Use Device() keyword instead.
/tmp/dm.XtXd2gw    111:     Processor (CPU1, 0x01, 0x00000000,
0x00) {}
                                                                                        Warning 3168 -                          ^ Legacy Processor() keyword detected. Use Device() keyword instead.
                   acrn_sw_load
                                                                                        SW_LOAD: partition blob /usr/share/acrn/bios/OVMF.fd size 2097152 copy to guest 0xffe00000
                        SW_LOAD: build e820 9 entries to addr:
0x7f27400ef008
SW_LOAD: entry[0]: addr 0x0000000000000000, size
0x00000000000a0000,  type 0x1
SW_LOAD: entry[1]: addr 0x00000000000a0000, size
0x0000000000060000,  type 0x2
SW_LOAD: entry[2]: addr 0x0000000000100000, size
0x000000003ff00000,  type 0x1
SW_LOAD: entry[3]: addr 0x0000000040000000, size
0x0000000040000000,  type 0x2
SW_LOAD: entry[4]: addr 0x0000000080000000, size
0x0000000008000000,  type 0x2
SW_LOAD: entry[5]: addr 0x00000000db000000, size
0x0000000004000000,  type 0x2
SW_LOAD: entry[6]: addr 0x00000000df000000, size
0x0000000001000000,  type 0x2
SW_LOAD: entry[7]: addr 0x00000000e0000000, size
0x0000000020000000,  type 0x2
SW_LOAD: entry[8]: addr 0x0000000100000000, size
0x0000000040000000,  type 0x2
SW_LOAD: ovmf_entry 0xfffffff0
                              add_cpu
                                     [    1.428076] Loaded
X.509 cert 'Build time autogenerated kernel key:
7d0d4348a2d53344b884032935610ca63fc3911b'
[    1.429742] zswap: loaded using pool lzo/zbud
[    1.430841] Btrfs loaded, crc32c=crc32c-intel
[    1.431928] md: Skipping autodetection of RAID arrays.
(raid=autodetect will force)
[    1.457635] EXT4-fs (vda3): mounted filesystem with ordered
data mode. Opts: (null)
[    1.458872] VFS: Mounted root (ext4 filesystem) on device 253:3.
[    1.462339] devtmpfs: mounted
[    1.463642] Freeing unused kernel image memory: 1224K
[    1.464638] Write protecting the kernel read-only data: 24576k
[    1.467056] Freeing unused kernel image memory: 2008K
[    1.468548] Freeing unused kernel image memory: 1128K
[    1.469452] Run /sbin/init as init process
[    1.620880] systemd[1]: systemd 244 running in system mode.
(+PAM +AUDIT -SELINUX +IMA -APPARMOR -SMACK -SYSVINIT +UTMP
+LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID
+ELFUTILS +KMOD -IDN2 -IDN -PCRE2 default-hierarchy=hybrid)
[    1.623862] systemd[1]: Detected virtualization acrn.
[    1.624544] systemd[1]: Detected architecture x86-64.
[    1.630657] systemd[1]: Set hostname to <clr-preempt-rt>.
[    1.822797] systemd[1]: Created slice system-getty.slice.
[    1.824261] systemd[1]: Created slice
system-serial\x2dgetty.slice.
[    1.825647] systemd[1]: Created slice User and Session Slice.
[    1.826651] systemd[1]: Started Dispatch Password Requests to
Console Directory Watch.
[    1.827832] systemd[1]: Started Forward Password Requests to
Wall Directory Watch.
[    1.829366] systemd[1]: Set up automount Arbitrary Executable
File Formats File System Automount Point.
[    1.830668] systemd[1]: Reached target Local Encrypted Volumes.
[    1.831537] systemd[1]: Reached target Remote File Systems.
[    1.832266] systemd[1]: Reached target Slices.
[    1.835095] systemd[1]: Listening on Process Core Dump Socket.
[    1.836157] systemd[1]: Listening on initctl Compatibility
Named Pipe.
[    1.840333] systemd[1]: Condition check resulted in Journal
Audit Socket being skipped.
[    1.841799] systemd[1]: Listening on Journal Socket (/dev/log).
[    1.843022] systemd[1]: Listening on Journal Socket.
[    1.843918] systemd[1]: Listening on Network Service Netlink
Socket.
[    1.845108] systemd[1]: Listening on udev Control Socket.
[    1.845942] systemd[1]: Listening on udev Kernel Socket.
[    1.848537] systemd[1]: Starting Create list of static device
nodes for the current kernel...
[    1.850115] systemd[1]: Condition check resulted in Set Up
Additional Binary Formats being skipped.
[    1.857603] systemd[1]: Starting Journal Service...
[    1.858787] systemd[1]: Condition check resulted in Load
Kernel Modules being skipped.
[    1.868541] systemd[1]: Starting Remount Root and Kernel File
Systems...
[    1.874521] systemd[1]: Starting Apply Kernel Variables...
[    1.888076] systemd[1]: Starting udev Coldplug all Devices...
[    1.908507] systemd[1]: Starting udev Kernel Device Manager...
[    1.929253] systemd[1]: Started Create list of static device
nodes for the current kernel.
[    1.947839] systemd[1]: Started Remount Root and Kernel File
Systems.
[    1.950075] systemd[1]: Started Apply Kernel Variables.
[    1.954582] systemd[1]: Reached target Local File Systems (Pre).
[    1.965499] systemd[1]: Starting Load/Save Random Seed...
[    1.989257] systemd[1]: Started Load/Save Random Seed.
[    2.128280] systemd[1]: Started udev Coldplug all Devices.
[    2.792368] systemd[1]: Started Journal Service.
[    2.810609] systemd-journald[217]: Received client request to
flush runtime journal.
[    3.369201] Adding 33788k swap on /dev/vda2.  Priority:-2
extents:1 across:33788k FS
clr-preempt-rt login: root
Password:
Last login: Tue Aug  4 09:29:38 on tty1
root@clr-preempt-rt ~ #
root@clr-preempt-rt ~ # uname -a
Linux clr-preempt-rt 4.19.94-20.iot-lts2018-preempt-rt #1 SMP
PREEMPT RT Thu Jan 23 15:05:47 PST 2020 x86_64 GNU/Linux
root@clr-preempt-rt ~ #
If you really want to passthrough SATA SSDto RTVM, please use
acrn-kernel:
https://github.com/projectacrn/acrn-kernel
BR.
Fuzhong
*From:*acrn-users@lists.projectacrn.org
<mailto:acrn-users@lists.projectacrn.org>
<acrn-users@lists.projectacrn.org
<mailto:acrn-users@lists.projectacrn.org>> *On Behalf Of *siming
*Sent:* Monday, August 3, 2020 3:04 PM
*To:* acrn-users@lists.projectacrn.org
<mailto:acrn-users@lists.projectacrn.org>
*Subject:* Re: [acrn-users] GPT ERROR when write preempt img to
sata on NUC7i5BNB
My environment is build according to the doc
https://projectacrn.github.io/1.6/getting-started/rt_industry.html
Board NUC7i5BNB, with two disks: an NVMe disk and a SATA disk
# uname -a
Linux nuc-acrn 4.19.97-104.iot-lts2018-sos #1 SMP PREEMPT Wed
Jan 22 14:37:18 PST 2020 x86_64 GNU/Linux
# cat /etc/os-release
BUILD_ID=32680
# acrn-dm -v
DM version is: 1.6-unstable-2020w12.5.140000p_273 (daily
tag:acrn-2020w12.5.140000p), build by mockbuild@2020-03-20 01:28:15
Thanks.
在 2020-08-03 14:43:42,"Yin, Fengwei" <fengwei.yin@intel.com
<mailto:fengwei.yin@intel.com>> 写道:

>Hi Siming,

>

>On 8/3/2020 2:23 PM, siming wrote:

>> Hi Fengwei,

>> I have tried two ways to boot preempt uos, but no success. There were

>> error logs in the previousemail.

>So you saw "pci passthru fail" when you use your launch_hard_rt_vm1.sh?

>Could you please share the whole launch_hard_rt_vm1.sh script?

>

>Also the version of acrn hypervisor, acrn-dm and SOS kernel version

>could help here. Thanks.

>

>

>Regards

>Yin, Fengwei

>

>>>

>>>     <    -s 2,*passthru*,00/17/0 \

>>>

>>>     ---

>>>

>>>     >    -s 2*,virtio-blk*,/dev/sda \

>>>

>>

>> Best Regards.

>>

>>

>>

>>

>> At 2020-08-03 10:23:11, "Yin, Fengwei" <fengwei.yin@intel.com <mailto:fengwei.yin@intel.com>> wrote:

>>

>>     Hi Siming,

>>

>>     I suppose you need passthru the SATA controller to your second VM.

>>     Not using virtio block

>>

>>     based /dev/sda.

>>

>>

>>     Regards

>>     Yin, Fengwei

>>     ------------------------------------

>>

>>     On 8/3/20 8:52 AM, siming wrote:

>>>     I have boot from sata by choose sata in the boot menu:

>>>     UEFI:SATA PORT 0 : OS Bootloader

>>>     the systen works well, system info :

>>>     root@clr-preempt-rt~#: uname -a

>>>     Linux clr-preempt-rt 4.19.94-20.iot-lts2018-preempt-rt #1 SMP

>>>     PREEMPT RT Thu Jan 23 15:05:47 PST 2020 x86_64 GNU/Linux

>>>

>>>

>>>

>>>

>>> 在 2020-08-03 07:10:44,"Liu, Fuzhong" <fuzhong.liu@intel.com
<mailto:fuzhong.liu@intel.com>> 写道:

>>>

>>>         Hi

>>>

>>>         Could you please double check if it can native boot from sda?

>>>

>>>          1. set boot order to Built-in shell;

>>>          2. type fs0: ENTER

>>>          3. cd EFI/BOOT ENTER

>>>          4. run BOOTX64.EFI

>>>

>>>         BR.

>>>

>>>         Fuzhong

>>>

>>>         *From:*acrn-users@lists.projectacrn.org

>>>         <acrn-users@lists.projectacrn.org
<mailto:acrn-users@lists.projectacrn.org>> *On Behalf Of *siming

>>>         *Sent:* Saturday, August 1, 2020 9:50 AM

>>>         *To:* acrn-users@lists.projectacrn.org
<mailto:acrn-users@lists.projectacrn.org>

>>>         *Subject:* Re: [acrn-users] GPT ERROR when write preempt img

>>>         to sata on NUC7i5BNB

>>>

>>>         thanks for the direction, the dd commond works fine in the

>>>         native boot, but the launch rt vm still failed (in acrn boot).

>>>

>>>         I tried two way to launch the vm, the difference is "-s 2 " of

>>>         the acrn-dm.

>>>

>>>         # diff launch_hard_rt_vm1.sh launch_hard_rt_vm2.sh

>>>

>>>         <   -s 2,*passthru*,00/17/0 \

>>>

>>>         ---

>>>

>>>         >   -s 2*,virtio-blk*,/dev/sda \

>>>

>>>         *launch_hard_rt_vm1.sh error log:*

>>>

>>>         modify_bar_registration: bypass for pci-passthru 0:2.0

>>>

>>>         [  41.557774] Unknown IOCTL 0x43000055

>>>

>>>         pci passthru init failed

>>>

>>>         mngr_client_new: Failed to accept from fd 35, err: Invalid

>>>         argument

>>>

>>>         Stop listening 35...

>>>

>>>         Stop polling 35...

>>>

>>>         Unable to init vdev (22)

>>>

>>>         *launch_hard_rt_vm2.sh error log:*

>>>

>>>         polling 35...

>>>

>>>         pci init hostbridge

>>>

>>>         pci init virtio-blk

>>>

>>>         acrn-dm: Could not open backing file: /dev/sdaListening 35...

>>>

>>>         : No such file or directory

>>>

>>>         Could not open backing filepci virtio-blk init failed

>>>

>>>         mngr_client_new: Failed to accept from fd 35, err: Invalid

>>>         argument

>>>

>>>         Stop listening 35...

>>>

>>>         my sata info:

>>>

>>>         $ lsblk

>>>

>>>         NAME       MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT

>>>

>>>         sda          8:0    0 111.8G  0 disk

>>>

>>>         ├─sda1       8:1    0   510M  0 part

>>>

>>>         ├─sda2       8:2    0    33M  0 part

>>>

>>>         └─sda3       8:3    0     8G  0 part

>>>

>>>         nvme0n1    259:0    0 238.5G  0 disk

>>>

>>>         ├─nvme0n1p1 259:1    0   142M  0 part

>>>

>>>         ├─nvme0n1p2 259:2    0   244M  0 part [SWAP]

>>>

>>>         └─nvme0n1p3 259:3    0 238.1G  0 part /

>>>

>>>         $ lspci -nn | grep SATA

>>>

>>>         00:17.0 SATA controller [0106]: Intel Corporation Sunrise

>>>         Point-LP SATA Controller [AHCI mode] [8086:9d03] (rev 21)

>>>

>>>         The attachment is the error logs and the launch script.

>>>

>>>         Best Regards

>>>

>>> 在2020-07-31 15:47:15,"Liu, Fuzhong" <fuzhong.liu@intel.com

>>>         <mailto:fuzhong.liu@intel.com>> 写道:

>>>

>>>             Please set boot order to Built-in shell;

>>>

>>>             then type fs1: ENTER

>>>

>>>             cd EFI/BOOT ENTER

>>>

>>>             run BOOTX64.EFI

>>>

>>>             It will boot from native.

>>>

>>>             BR.

>>>

>>>             Fuzhong

>>>

>>>             *From:*acrn-users@lists.projectacrn.org

>>>             <mailto:acrn-users@lists.projectacrn.org>

>>>             <acrn-users@lists.projectacrn.org

>>>             <mailto:acrn-users@lists.projectacrn.org>> *On Behalf Of

>>>             *siming

>>>             *Sent:* Friday, July 31, 2020 2:10 PM

>>>             *To:* acrn-users@lists.projectacrn.org
<mailto:acrn-users@lists.projectacrn.org>

>>>             <mailto:acrn-users@lists.projectacrn.org>

>>>             *Subject:* Re: [acrn-users] GPT ERROR when write preempt

>>>             img to sata on NUC7i5BNB

>>>

>>>             thanks for the responds.I did the dd comond in the acrn boot.

>>>

>>>             After I install the service VM with./acrn_quick_setup.sh

>>>             ,I cannot boot into /Clear-linux-native-5.5.11-922/. The

>>>             HDMI is nothing out when I choose this.

>>>

>>>             /  Clear Linux OS(acrn)/

>>>

>>>             /  Clear Linux OS(Clear-linux-iot-lts2018-sos-4.19.97-104)/

>>>

>>>             /  Clear Linux OS(Clear-linux-native-5.5.11-922)/

>>>

>>>             Did I miss something in the set up of the service vm?

>>>

>>>             thanks

>>>

>>> 在2020-07-31 12:58:21,"Liu, Fuzhong"

>>>             <fuzhong.liu@intel.com <mailto:fuzhong.liu@intel.com
<mailto:fuzhong.liu@intel.com%20%3cmailto:fuzhong.liu@intel.com>>>
写道:

>>>

>>>                 Hi

>>>

>>>                 The dd issue is for acrn boot or native boot?

>>>

>>>                 Please  boot into native and try it again.

>>>

>>>                 Thanks!

>>>

>>>                 BR.

>>>

>>>                 Fuzhong

>>>

>>>                 *From:*acrn-users@lists.projectacrn.org

>>>                 <mailto:acrn-users@lists.projectacrn.org>

>>>                 <acrn-users@lists.projectacrn.org

>>>                 <mailto:acrn-users@lists.projectacrn.org>> *On Behalf

>>>                 Of *siming

>>>                 *Sent:* Friday, July 31, 2020 11:34 AM

>>>                 *To:* acrn-users@lists.projectacrn.org
<mailto:acrn-users@lists.projectacrn.org>

>>>                 <mailto:acrn-users@lists.projectacrn.org>

>>>                 *Subject:* [acrn-users] GPT ERROR when write preempt

>>>                 img to sata on NUC7i5BNB

>>>

>>>                 Hi,

>>>

>>>                   My board is NUC7i5BNB, with two disks: an NVMe disk

>>>                 for the Clear Linux-based Service VM and a SATA disk

>>>                 for the RTVM.Accoring to

>>> https://projectacrn.github.io/1.6/getting-started/rt_industry.html#install-and-launch-the-preempt-rt-vm,

>>>                 when I write preempt img to sata, there is always have

>>>                 gpt errors. I have chaged another sata disk, but it's

>>>                 the same error.

>>>

>>>                 |root@nuc-acrn /home/acrn # dd

>>>                 if=./preempt-rt-32680.img of=/dev/sda bs=4M oflag=sync

>>>                 status=progress iflag=fullblock seek=0 conv=notrunc|

>>>

>>>                 |9122611200 bytes (9.1 GB, 8.5 GiB) copied, 124 s, 73.5

>>>                 MB/s|

>>>

>>>                 |2186+1 records in|

>>>

>>>                 |2186+1 records out |

>>>

>>>                 |9169755648 bytes (9.2 GB, 8.5 GiB) copied, 126.281 s,

>>>                 72.6 MB/s|

>>>

>>>                 |[  171.967643] GPT:Primary header thinks Alt. header

>>>                 is not at the end of the disk.|

>>>

>>>                 |[  171.967982] GPT:17909678 != 234441647|

>>>

>>>                 |[  171.968146] GPT:Alternate GPT header not at the end

>>>                 of the disk.|

>>>

>>>                 |[  171.968406] GPT:17909678 != 234441647|

>>>

>>>                 |[  171.968616] GPT: Use GNU Parted to correct GPT errors.|

>>>

>>>                 |[  171.968864]  sda: sda1 sda2 sda3|

>>>

>>>                 then I run the launch_hard_rt_vm.sh, it cannot create

>>>                 VM from Hypervisor.

>>>

>>>                 |root@nuc-acrn /home/acrn # ./launch_hard_rt_vm.sh|

>>>

>>>                 |cpu1 online=1 |

>>>

>>>                 |[ 1525.901370] smpboot: CPU 1 is now offline|

>>>

>>>                 |[ 1525.902204] vhm: try to offline cpu 1 with lapicid 2|

>>>

>>>                 |cpu2 online=1 |

>>>

>>>                 |[ 1525.916019] smpboot: CPU 2 is now offline|

>>>

>>>                 |[ 1525.917264] vhm: try to offline cpu 2 with lapicid 1|

>>>

>>>                 |cpu3 online=1 |

>>>

>>>                 |[ 1525.929538] smpboot: CPU 3 is now offline|

>>>

>>>                 |[ 1525.930969] vhm: try to offline cpu 3 with lapicid 3|

>>>

>>>                 |[ 1525.935378] ata1.00: disabled|

>>>

>>>                 |[ 1525.938524] sd 0:0:0:0: [sda] Synchronizing SCSI cache|

>>>

>>>                 |[ 1525.939206] sd 0:0:0:0: [sda] Synchronize Cache(10)

>>>                 failed: Result: hostbyte=DID_BAD_TARGET

>>>                 driverbyte=DRIVER_OK|

>>>

>>>                 |[ 1525.941643] sd 0:0:0:0: [sda] Stopping disk|

>>>

>>>                 |[ 1525.941888] sd 0:0:0:0: [sda] Start/Stop Unit

>>>                 failed: Result: hostbyte=DID_BAD_TARGET

>>>                 driverbyte=DRIVER_OK|

>>>

>>>                 |[ 1525.956762] pci-stub 0000:00:17.0: claimed by stub|

>>>

>>>                 |pm by vuart node-index = 1 |

>>>

>>>                 |SW_LOAD: get ovmf path /usr/share/acrn/bios/OVMF.fd,

>>>                 size 0x200000 |

>>>

>>>                 |vm_create: hard_rtvm |

>>>

>>>                 |[ 1525.981345] vhm_dev_open: opening device node|

>>>

>>>                 |VHM api version 1.0 |

>>>

>>>                 |[ 1525.982333] vhm: failed to create VM from Hypervisor !|

>>>

>>>                 |[ 1526.483047] vhm: failed to create VM from Hypervisor !|

>>>

>>>                 |[ 1526.983377] vhm: failed to create VM from Hypervisor !|

>>>

>>>                 |[ 1527.483702] vhm: failed to create VM from Hypervisor !|

>>>

>>>                 |[ 1527.984028] vhm: failed to create VM from Hypervisor !|

>>>

>>>                 |[ 1528.484363] vhm: failed to create VM from Hypervisor !|

>>>

>>>                 |[ 1528.984686] vhm: failed to create VM from Hypervisor !|

>>>

>>>                 |[ 1529.485021] vhm: failed to create VM from Hypervisor !|

>>>

>>>                 |[ 1529.985346] vhm: failed to create VM from Hypervisor !|

>>>

>>>                 |[ 1530.485672] vhm: failed to create VM from Hypervisor !|

>>>

>>>                 |failed to create VM hard_rtvm |

>>>

>>>                 |vm_create failed|

>>>

>>>                 |[ 1530.994415] vhm: freed vm|

>>>

>>>                 Thanks!

>>>

>>>                 ZS

>>>

>>>

>>>

>>

>

>


siming
 

Yes, It's my script error. The preempt is running. 

Thank you very much. 



在 2020-08-04 16:42:45,"Yin, Fengwei" <fengwei.yin@...> 写道: >Hi Siming, > >On 8/4/2020 4:35 PM, siming wrote: >> The sda is available before run the script. >>  The launch script is  launch_hard_rt_vm2.sh which atteched before. >> $ lsblk >> NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT >> sda           8:0    0 111.8G  0 disk >> ├─sda1        8:1    0   510M  0 part >> ├─sda2        8:2    0    33M  0 part >> └─sda3        8:3    0     8G  0 part >> nvme0n1     259:0    0 238.5G  0 disk >> ├─nvme0n1p1 259:1    0   142M  0 part >> ├─nvme0n1p2 259:2    0   244M  0 part [SWAP] >> └─nvme0n1p3 259:3    0 238.1G  0 part / >> >> >> After running the script, the sda is unavaliable. >> $ lsblk >> NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT >> nvme0n1     259:0    0 238.5G  0 disk >> ├─nvme0n1p1 259:1    0   142M  0 part >> ├─nvme0n1p2 259:2    0   244M  0 part [SWAP] >> └─nvme0n1p3 259:3    0 238.1G  0 part / >> >You need to update your launch_hard_rt_vm2.sh: >echo ${passthru_vpid["sata"]} > /sys/bus/pci/drivers/pci-stub/new_id >echo ${passthru_bdf["sata"]} > >/sys/bus/pci/devices/${passthru_bdf["sata"]}/driver/unbind >echo ${passthru_bdf["sata"]} > /sys/bus/pci/drivers/pci-stub/bind > >-> >#echo ${passthru_vpid["sata"]} > /sys/bus/pci/drivers/pci-stub/new_id >#echo ${passthru_bdf["sata"]} > >/sys/bus/pci/devices/${passthru_bdf["sata"]}/driver/unbind >#echo ${passthru_bdf["sata"]} > /sys/bus/pci/drivers/pci-stub/bind > > >Regards >Yin, Fengwei > >> >> >> >> >> 在 2020-08-04 16:21:47,"Liu, Fuzhong" <fuzhong.liu@...> 写道: >> >> Hi Siming >> >> Please share your launch script and  run “lsblk” in sos console to >> check if sda is available. >> >> BR. >> >> Fuzhong >> >> *From:*acrn-users@... >> <acrn-users@...> *On Behalf Of *siming >> *Sent:* Tuesday, August 4, 2020 4:13 PM >> *To:* acrn-users@... >> *Subject:* Re: [acrn-users] GPT ERROR when write preempt img to sata >> on NUC7i5BNB >> >> Hi Fuzhong, >> >> Thanks for the test. >> >> I have update the Service VM with  Acrn Hypervisor 2.0 release and >> Acrn Kernel 2.0 release >> >> # uname -a >> >> Linux nuc-acrn 5.4.43-PKT-200203T060100Z #3 SMP PREEMPT Tue Aug 4 >> 10:24:36 CST 2020 x86_64 GNU/Linux >> >>  # acrn-dm -v >> >> DM version is: 2.0-64896ac9 (daily tag:acrn-2020w25.7-180000p), >> build by acrn@2020-08-04 10:38:21 >> >> There is a new socket error,  does any help? >> >> polling 35... >> >> Listening 35... >> >> *initiate a connection on a socket error* >> >> *create socket to connect life-cycle manager failed* >> >> pci init hostbridge >> >> pci init virtio-blk >> >> acrn-dm: Could not open backing file: /dev/sda: No such file or >> directory >> >> Could not open backing filepci virtio-blk init failed >> >> mngr_client_new: Failed to accept from fd 35, err: Invalid argument >> >> Stop listening 35... >> >> Stop polling 35... >> >> Thanks! >> >> 在2020-08-04 14:24:41,"Liu, Fuzhong" <fuzhong.liu@... >> <mailto:fuzhong.liu@...>> 写道: >> >> Hi Siming >> >> Narrow down your issue here: >> >> As mentioned in below doc; please modify the script to use the >> virtio device. >> >> https://projectacrn.github.io/1.6/getting-started/rt_industry.html#install-and-launch-the-preempt-rt-vm >> >> 5 Modify the script to use the virtio device. >> >> # NVME pass-through >> >> #echo ${passthru_vpid["nvme"]} > >> /sys/bus/pci/drivers/pci-stub/new_id >> >> #echo ${passthru_bdf["nvme"]} > >> /sys/bus/pci/devices/${passthru_bdf["nvme"]}/driver/unbind >> >> #echo ${passthru_bdf["nvme"]} > /sys/bus/pci/drivers/pci-stub/bind >> >> /usr/bin/acrn-dm -A -m $mem_size -s 0:0,hostbridge \ >> >>    --lapic_pt \ >> >>    --rtvm \ >> >>    --virtio_poll 1000000 \ >> >>    -U 495ae2e5-2603-4d64-af76-d4bc5a8ec0e5 \ >> >>    -s 2,virtio-blk,/dev/sda \ >> >>    -s 3,virtio-console,@stdio:stdio_port \ >> >>    $pm_channel $pm_by_vuart \ >> >>    --ovmf /usr/share/acrn/bios/OVMF.fd \ >> >>    hard_rtvm >> >> } >> >> The reason about below error log for virtio-blk on your side is: >> your run sata passthrough script before; just reboot can fix it >> >> >>>         acrn-dm: Could not open backing file: /dev/sdaListening 35... >> >> >>> >> >> >>>         : No such file or directory >> >> It is successful log on my side: >> >> root@clr-sos/home/acrn # ./launch_hard_rt_vm.sh >> >> cpu1 online=1 >> >> cpu2 online=1 >> >> cpu3 online=1 >> >> pm by vuart node-index = 1 >> >> SW_LOAD: get ovmf path /usr/share/acrn/bios/OVMF.fd, size 0x200000 >> >> vm_create: hard_rtvm >> >> VHM api version 1.0 >> >> vm_setup_memory: size=0x40000000 >> >> open hugetlbfs file >> /run/hugepage/acrn/huge_lv1/hard_rtvm/495AE2E526034D64AF76D4BC5A8EC0E5 >> >> open hugetlbfs file >> /run/hugepage/acrn/huge_lv2/hard_rtvm/495AE2E526034D64AF76D4BC5A8EC0E5 >> >> level 0 free/need pages:0/1 page size:0x200000 >> >> level 1 free/need pages:0/1 page size:0x40000000 >> >> to reserve more free pages: >> >> to reserve pages (+orig 0): echo 1 > >> /sys/kernel/mm/hugepages/hugepages-1048576kB/nr_hugepages >> >> to reserve pages (+orig 0): echo 1 > >> /sys/kernel/mm/hugepages/hugepages-2048kB/nr_hugepages >> >> now enough free pages are reserved! >> >> try to setup hugepage with: >> >>         level 0 - lowmem 0x0, biosmem 0x200000, highmem 0x0 >> >>         level 1 - lowmem 0x40000000, biosmem 0x0, highmem 0x0 >> >> total_size 0x180000000 >> >> mmap ptr 0x0x7f2717719000 -> baseaddr 0x0x7f2740000000 >> >> mmap 0x40000000@0x7f2740000000 >> >> touch 1 pages with pagesz 0x40000000 >> >> mmap 0x200000@0x7f283fe00000 >> >> touch 1 pages with pagesz 0x200000 >> >> really setup hugepage with: >> >>         level 0 - lowmem 0x0, biosmem 0x200000, highmem 0x0 >> >>         level 1 - lowmem 0x40000000, biosmem 0x0, highmem 0x0 >> >> vm_init_vdevs >> >> pm_by_vuart_init idx: 1, path: /dev/ttyS1 >> >> polling 35... >> >> Listening 35... >> >> pci init hostbridge >> >> pci init virtio-blk >> >> pci init virtio-console >> >> tpm: init_vtpm2:Invalid socket path! >> >>                                     /tmp/dm.XtXd2gw     24: >> Device (PCI0) >> >>                                                                              Warning  3073 -        Multiple types ^  (Device object requires either a _HID or _ADR, but not both) >> >>                         /tmp/dm.XtXd2gw    110:     Processor >> (CPU0, 0x00, 0x00000000, 0x00) {} >> >>                                                                                                Warning 3168 -                          ^ Legacy Processor() keyword detected. Use Device() keyword instead. >> >> >> /tmp/dm.XtXd2gw    111:     Processor (CPU1, 0x01, 0x00000000, >> 0x00) {} >> >> >>                                                                                         Warning 3168 -                          ^ Legacy Processor() keyword detected. Use Device() keyword instead. >> >> >>                    acrn_sw_load >> >>                                                                                         SW_LOAD: partition blob /usr/share/acrn/bios/OVMF.fd size 2097152 copy to guest 0xffe00000 >> >>                         SW_LOAD: build e820 9 entries to addr: >> 0x7f27400ef008 >> >> SW_LOAD: entry[0]: addr 0x0000000000000000, size >> 0x00000000000a0000,  type 0x1 >> >> SW_LOAD: entry[1]: addr 0x00000000000a0000, size >> 0x0000000000060000,  type 0x2 >> >> SW_LOAD: entry[2]: addr 0x0000000000100000, size >> 0x000000003ff00000,  type 0x1 >> >> SW_LOAD: entry[3]: addr 0x0000000040000000, size >> 0x0000000040000000,  type 0x2 >> >> SW_LOAD: entry[4]: addr 0x0000000080000000, size >> 0x0000000008000000,  type 0x2 >> >> SW_LOAD: entry[5]: addr 0x00000000db000000, size >> 0x0000000004000000,  type 0x2 >> >> SW_LOAD: entry[6]: addr 0x00000000df000000, size >> 0x0000000001000000,  type 0x2 >> >> SW_LOAD: entry[7]: addr 0x00000000e0000000, size >> 0x0000000020000000,  type 0x2 >> >> SW_LOAD: entry[8]: addr 0x0000000100000000, size >> 0x0000000040000000,  type 0x2 >> >> SW_LOAD: ovmf_entry 0xfffffff0 >> >>                               add_cpu >> >>                                      [    1.428076] Loaded >> X.509 cert 'Build time autogenerated kernel key: >> 7d0d4348a2d53344b884032935610ca63fc3911b' >> >> [    1.429742] zswap: loaded using pool lzo/zbud >> >> [    1.430841] Btrfs loaded, crc32c=crc32c-intel >> >> [    1.431928] md: Skipping autodetection of RAID arrays. >> (raid=autodetect will force) >> >> [    1.457635] EXT4-fs (vda3): mounted filesystem with ordered >> data mode. Opts: (null) >> >> [    1.458872] VFS: Mounted root (ext4 filesystem) on device 253:3. >> >> [    1.462339] devtmpfs: mounted >> >> [    1.463642] Freeing unused kernel image memory: 1224K >> >> [    1.464638] Write protecting the kernel read-only data: 24576k >> >> [    1.467056] Freeing unused kernel image memory: 2008K >> >> [    1.468548] Freeing unused kernel image memory: 1128K >> >> [    1.469452] Run /sbin/init as init process >> >> [    1.620880] systemd[1]: systemd 244 running in system mode. >> (+PAM +AUDIT -SELINUX +IMA -APPARMOR -SMACK -SYSVINIT +UTMP >> +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID >> +ELFUTILS +KMOD -IDN2 -IDN -PCRE2 default-hierarchy=hybrid) >> >> [    1.623862] systemd[1]: Detected virtualization acrn. >> >> [    1.624544] systemd[1]: Detected architecture x86-64. >> >> [    1.630657] systemd[1]: Set hostname to <clr-preempt-rt>. >> >> [    1.822797] systemd[1]: Created slice system-getty.slice. >> >> [    1.824261] systemd[1]: Created slice >> system-serial\x2dgetty.slice. >> >> [    1.825647] systemd[1]: Created slice User and Session Slice. >> >> [    1.826651] systemd[1]: Started Dispatch Password Requests to >> Console Directory Watch. >> >> [    1.827832] systemd[1]: Started Forward Password Requests to >> Wall Directory Watch. >> >> [    1.829366] systemd[1]: Set up automount Arbitrary Executable >> File Formats File System Automount Point. >> >> [    1.830668] systemd[1]: Reached target Local Encrypted Volumes. >> >> [    1.831537] systemd[1]: Reached target Remote File Systems. >> >> [    1.832266] systemd[1]: Reached target Slices. >> >> [    1.835095] systemd[1]: Listening on Process Core Dump Socket. >> >> [    1.836157] systemd[1]: Listening on initctl Compatibility >> Named Pipe. >> >> [    1.840333] systemd[1]: Condition check resulted in Journal >> Audit Socket being skipped. >> >> [    1.841799] systemd[1]: Listening on Journal Socket (/dev/log). >> >> [    1.843022] systemd[1]: Listening on Journal Socket. >> >> [    1.843918] systemd[1]: Listening on Network Service Netlink >> Socket. >> >> [    1.845108] systemd[1]: Listening on udev Control Socket. >> >> [    1.845942] systemd[1]: Listening on udev Kernel Socket. >> >> [    1.848537] systemd[1]: Starting Create list of static device >> nodes for the current kernel... >> >> [    1.850115] systemd[1]: Condition check resulted in Set Up >> Additional Binary Formats being skipped. >> >> [    1.857603] systemd[1]: Starting Journal Service... >> >> [    1.858787] systemd[1]: Condition check resulted in Load >> Kernel Modules being skipped. >> >> [    1.868541] systemd[1]: Starting Remount Root and Kernel File >> Systems... >> >> [    1.874521] systemd[1]: Starting Apply Kernel Variables... >> >> [    1.888076] systemd[1]: Starting udev Coldplug all Devices... >> >> [    1.908507] systemd[1]: Starting udev Kernel Device Manager... >> >> [    1.929253] systemd[1]: Started Create list of static device >> nodes for the current kernel. >> >> [    1.947839] systemd[1]: Started Remount Root and Kernel File >> Systems. >> >> [    1.950075] systemd[1]: Started Apply Kernel Variables. >> >> [    1.954582] systemd[1]: Reached target Local File Systems (Pre). >> >> [    1.965499] systemd[1]: Starting Load/Save Random Seed... >> >> [    1.989257] systemd[1]: Started Load/Save Random Seed. >> >> [    2.128280] systemd[1]: Started udev Coldplug all Devices. >> >> [    2.792368] systemd[1]: Started Journal Service. >> >> [    2.810609] systemd-journald[217]: Received client request to >> flush runtime journal. >> >> [    3.369201] Adding 33788k swap on /dev/vda2.  Priority:-2 >> extents:1 across:33788k FS >> >> clr-preempt-rt login: root >> >> Password: >> >> Last login: Tue Aug  4 09:29:38 on tty1 >> >> root@clr-preempt-rt ~ # >> >> root@clr-preempt-rt ~ # uname -a >> >> Linux clr-preempt-rt 4.19.94-20.iot-lts2018-preempt-rt #1 SMP >> PREEMPT RT Thu Jan 23 15:05:47 PST 2020 x86_64 GNU/Linux >> >> root@clr-preempt-rt ~ # >> >> If you really want to passthrough SATA SSDto RTVM, please use >> acrn-kernel: >> >> https://github.com/projectacrn/acrn-kernel >> >> BR. >> >> Fuzhong >> >> *From:*acrn-users@... >> <mailto:acrn-users@...> >> <acrn-users@... >> <mailto:acrn-users@...>> *On Behalf Of *siming >> *Sent:* Monday, August 3, 2020 3:04 PM >> *To:* acrn-users@... >> <mailto:acrn-users@...> >> *Subject:* Re: [acrn-users] GPT ERROR when write preempt img to >> sata on NUC7i5BNB >> >> My environment is build according to the doc >> https://projectacrn.github.io/1.6/getting-started/rt_industry.html >> >> Board NUC7i5BNB, with two disks: an NVMe disk and a SATA disk >> >> # uname -a >> >> Linux nuc-acrn 4.19.97-104.iot-lts2018-sos #1 SMP PREEMPT Wed >> Jan 22 14:37:18 PST 2020 x86_64 GNU/Linux >> >> # cat /etc/os-release >> >> BUILD_ID=32680 >> >> # acrn-dm -v >> >> DM version is: 1.6-unstable-2020w12.5.140000p_273 (daily >> tag:acrn-2020w12.5.140000p), build by mockbuild@2020-03-20 01:28:15 >> >> Thanks. >> >> >> 在 2020-08-03 14:43:42,"Yin, Fengwei" <fengwei.yin@... >> <mailto:fengwei.yin@...>> 写道: >> >> >Hi Siming, >> >> > >> >> >On 8/3/2020 2:23 PM, siming wrote: >> >> >> Hi Fengwei, >> >> >> I have tried two ways to boot preempt uos, but no success. There were >> >> >> error logs in the previousemail. >> >> >So you saw "pci passthru fail" when you use your launch_hard_rt_vm1.sh? >> >> >Could you please share the whole launch_hard_rt_vm1.sh script? >> >> > >> >> >Also the version of acrn hypervisor, acrn-dm and SOS kernel version >> >> >could help here. Thanks. >> >> > >> >> > >> >> >Regards >> >> >Yin, Fengwei >> >> > >> >> >>> >> >> >>>     <    -s 2,*passthru*,00/17/0 \ >> >> >>> >> >> >>>     --- >> >> >>> >> >> >>>     >    -s 2*,virtio-blk*,/dev/sda \ >> >> >>> >> >> >> >> >> >> Best Regards. >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> At 2020-08-03 10:23:11, "Yin, Fengwei" <fengwei.yin@... <mailto:fengwei.yin@...>> wrote: >> >> >> >> >> >>     Hi Siming, >> >> >> >> >> >>     I suppose you need passthru the SATA controller to your second VM. >> >> >>     Not using virtio block >> >> >> >> >> >>     based /dev/sda. >> >> >> >> >> >> >> >> >>     Regards >> >> >>     Yin, Fengwei >> >> >>     ------------------------------------ >> >> >> >> >> >>     On 8/3/20 8:52 AM, siming wrote: >> >> >>>     I have boot from sata by choose sata in the boot menu: >> >> >>>     UEFI:SATA PORT 0 : OS Bootloader >> >> >>>     the systen works well, system info : >> >> >>>     root@clr-preempt-rt~#: uname -a >> >> >>>     Linux clr-preempt-rt 4.19.94-20.iot-lts2018-preempt-rt #1 SMP >> >> >>>     PREEMPT RT Thu Jan 23 15:05:47 PST 2020 x86_64 GNU/Linux >> >> >>> >> >> >>> >> >> >>> >> >> >>> >> >> >>> 在 2020-08-03 07:10:44,"Liu, Fuzhong" <fuzhong.liu@... >> <mailto:fuzhong.liu@...>> 写道: >> >> >>> >> >> >>>         Hi >> >> >>> >> >> >>>         Could you please double check if it can native boot from sda? >> >> >>> >> >> >>>          1. set boot order to Built-in shell; >> >> >>>          2. type fs0: ENTER >> >> >>>          3. cd EFI/BOOT ENTER >> >> >>>          4. run BOOTX64.EFI >> >> >>> >> >> >>>         BR. >> >> >>> >> >> >>>         Fuzhong >> >> >>> >> >> >>>         *From:*acrn-users@... >> >> >>>         <acrn-users@... >> <mailto:acrn-users@...>> *On Behalf Of *siming >> >> >>>         *Sent:* Saturday, August 1, 2020 9:50 AM >> >> >>>         *To:* acrn-users@... >> <mailto:acrn-users@...> >> >> >>>         *Subject:* Re: [acrn-users] GPT ERROR when write preempt img >> >> >>>         to sata on NUC7i5BNB >> >> >>> >> >> >>>         thanks for the direction, the dd commond works fine in the >> >> >>>         native boot, but the launch rt vm still failed (in acrn boot). >> >> >>> >> >> >>>         I tried two way to launch the vm, the difference is "-s 2 " of >> >> >>>         the acrn-dm. >> >> >>> >> >> >>>         # diff launch_hard_rt_vm1.sh launch_hard_rt_vm2.sh >> >> >>> >> >> >>>         <   -s 2,*passthru*,00/17/0 \ >> >> >>> >> >> >>>         --- >> >> >>> >> >> >>>         >   -s 2*,virtio-blk*,/dev/sda \ >> >> >>> >> >> >>>         *launch_hard_rt_vm1.sh error log:* >> >> >>> >> >> >>>         modify_bar_registration: bypass for pci-passthru 0:2.0 >> >> >>> >> >> >>>         [  41.557774] Unknown IOCTL 0x43000055 >> >> >>> >> >> >>>         pci passthru init failed >> >> >>> >> >> >>>         mngr_client_new: Failed to accept from fd 35, err: Invalid >> >> >>>         argument >> >> >>> >> >> >>>         Stop listening 35... >> >> >>> >> >> >>>         Stop polling 35... >> >> >>> >> >> >>>         Unable to init vdev (22) >> >> >>> >> >> >>>         *launch_hard_rt_vm2.sh error log:* >> >> >>> >> >> >>>         polling 35... >> >> >>> >> >> >>>         pci init hostbridge >> >> >>> >> >> >>>         pci init virtio-blk >> >> >>> >> >> >>>         acrn-dm: Could not open backing file: /dev/sdaListening 35... >> >> >>> >> >> >>>         : No such file or directory >> >> >>> >> >> >>>         Could not open backing filepci virtio-blk init failed >> >> >>> >> >> >>>         mngr_client_new: Failed to accept from fd 35, err: Invalid >> >> >>>         argument >> >> >>> >> >> >>>         Stop listening 35... >> >> >>> >> >> >>>         my sata info: >> >> >>> >> >> >>>         $ lsblk >> >> >>> >> >> >>>         NAME       MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT >> >> >>> >> >> >>>         sda          8:0    0 111.8G  0 disk >> >> >>> >> >> >>>         ├─sda1       8:1    0   510M  0 part >> >> >>> >> >> >>>         ├─sda2       8:2    0    33M  0 part >> >> >>> >> >> >>>         └─sda3       8:3    0     8G  0 part >> >> >>> >> >> >>>         nvme0n1    259:0    0 238.5G  0 disk >> >> >>> >> >> >>>         ├─nvme0n1p1 259:1    0   142M  0 part >> >> >>> >> >> >>>         ├─nvme0n1p2 259:2    0   244M  0 part [SWAP] >> >> >>> >> >> >>>         └─nvme0n1p3 259:3    0 238.1G  0 part / >> >> >>> >> >> >>>         $ lspci -nn | grep SATA >> >> >>> >> >> >>>         00:17.0 SATA controller [0106]: Intel Corporation Sunrise >> >> >>>         Point-LP SATA Controller [AHCI mode] [8086:9d03] (rev 21) >> >> >>> >> >> >>>         The attachment is the error logs and the launch script. >> >> >>> >> >> >>>         Best Regards >> >> >>> >> >> >>> 在2020-07-31 15:47:15,"Liu, Fuzhong" <fuzhong.liu@... >> >> >>>         <mailto:fuzhong.liu@...>> 写道: >> >> >>> >> >> >>>             Please set boot order to Built-in shell; >> >> >>> >> >> >>>             then type fs1: ENTER >> >> >>> >> >> >>>             cd EFI/BOOT ENTER >> >> >>> >> >> >>>             run BOOTX64.EFI >> >> >>> >> >> >>>             It will boot from native. >> >> >>> >> >> >>>             BR. >> >> >>> >> >> >>>             Fuzhong >> >> >>> >> >> >>>             *From:*acrn-users@... >> >> >>>             <mailto:acrn-users@...> >> >> >>>             <acrn-users@... >> >> >>>             <mailto:acrn-users@...>> *On Behalf Of >> >> >>>             *siming >> >> >>>             *Sent:* Friday, July 31, 2020 2:10 PM >> >> >>>             *To:* acrn-users@... >> <mailto:acrn-users@...> >> >> >>>             <mailto:acrn-users@...> >> >> >>>             *Subject:* Re: [acrn-users] GPT ERROR when write preempt >> >> >>>             img to sata on NUC7i5BNB >> >> >>> >> >> >>>             thanks for the responds.I did the dd comond in the acrn boot. >> >> >>> >> >> >>>             After I install the service VM with./acrn_quick_setup.sh >> >> >>>             ,I cannot boot into /Clear-linux-native-5.5.11-922/. The >> >> >>>             HDMI is nothing out when I choose this. >> >> >>> >> >> >>>             /  Clear Linux OS(acrn)/ >> >> >>> >> >> >>>             /  Clear Linux OS(Clear-linux-iot-lts2018-sos-4.19.97-104)/ >> >> >>> >> >> >>>             /  Clear Linux OS(Clear-linux-native-5.5.11-922)/ >> >> >>> >> >> >>>             Did I miss something in the set up of the service vm? >> >> >>> >> >> >>>             thanks >> >> >>> >> >> >>> 在2020-07-31 12:58:21,"Liu, Fuzhong" >> >> >>>             <fuzhong.liu@... <mailto:fuzhong.liu@... >> <mailto:fuzhong.liu@...%20%3cmailto:fuzhong.liu@...>>> >> 写道: >> >> >>> >> >> >>>                 Hi >> >> >>> >> >> >>>                 The dd issue is for acrn boot or native boot? >> >> >>> >> >> >>>                 Please  boot into native and try it again. >> >> >>> >> >> >>>                 Thanks! >> >> >>> >> >> >>>                 BR. >> >> >>> >> >> >>>                 Fuzhong >> >> >>> >> >> >>>                 *From:*acrn-users@... >> >> >>>                 <mailto:acrn-users@...> >> >> >>>                 <acrn-users@... >> >> >>>                 <mailto:acrn-users@...>> *On Behalf >> >> >>>                 Of *siming >> >> >>>                 *Sent:* Friday, July 31, 2020 11:34 AM >> >> >>>                 *To:* acrn-users@... >> <mailto:acrn-users@...> >> >> >>>                 <mailto:acrn-users@...> >> >> >>>                 *Subject:* [acrn-users] GPT ERROR when write preempt >> >> >>>                 img to sata on NUC7i5BNB >> >> >>> >> >> >>>                 Hi, >> >> >>> >> >> >>>                   My board is NUC7i5BNB, with two disks: an NVMe disk >> >> >>>                 for the Clear Linux-based Service VM and a SATA disk >> >> >>>                 for the RTVM.Accoring to >> >> >>> https://projectacrn.github.io/1.6/getting-started/rt_industry.html#install-and-launch-the-preempt-rt-vm, >> >> >>>                 when I write preempt img to sata, there is always have >> >> >>>                 gpt errors. I have chaged another sata disk, but it's >> >> >>>                 the same error. >> >> >>> >> >> >>>                 |root@nuc-acrn /home/acrn # dd >> >> >>>                 if=./preempt-rt-32680.img of=/dev/sda bs=4M oflag=sync >> >> >>>                 status=progress iflag=fullblock seek=0 conv=notrunc| >> >> >>> >> >> >>>                 |9122611200 bytes (9.1 GB, 8.5 GiB) copied, 124 s, 73.5 >> >> >>>                 MB/s| >> >> >>> >> >> >>>                 |2186+1 records in| >> >> >>> >> >> >>>                 |2186+1 records out | >> >> >>> >> >> >>>                 |9169755648 bytes (9.2 GB, 8.5 GiB) copied, 126.281 s, >> >> >>>                 72.6 MB/s| >> >> >>> >> >> >>>                 |[  171.967643] GPT:Primary header thinks Alt. header >> >> >>>                 is not at the end of the disk.| >> >> >>> >> >> >>>                 |[  171.967982] GPT:17909678 != 234441647| >> >> >>> >> >> >>>                 |[  171.968146] GPT:Alternate GPT header not at the end >> >> >>>                 of the disk.| >> >> >>> >> >> >>>                 |[  171.968406] GPT:17909678 != 234441647| >> >> >>> >> >> >>>                 |[  171.968616] GPT: Use GNU Parted to correct GPT errors.| >> >> >>> >> >> >>>                 |[  171.968864]  sda: sda1 sda2 sda3| >> >> >>> >> >> >>>                 then I run the launch_hard_rt_vm.sh, it cannot create >> >> >>>                 VM from Hypervisor. >> >> >>> >> >> >>>                 |root@nuc-acrn /home/acrn # ./launch_hard_rt_vm.sh| >> >> >>> >> >> >>>                 |cpu1 online=1 | >> >> >>> >> >> >>>                 |[ 1525.901370] smpboot: CPU 1 is now offline| >> >> >>> >> >> >>>                 |[ 1525.902204] vhm: try to offline cpu 1 with lapicid 2| >> >> >>> >> >> >>>                 |cpu2 online=1 | >> >> >>> >> >> >>>                 |[ 1525.916019] smpboot: CPU 2 is now offline| >> >> >>> >> >> >>>                 |[ 1525.917264] vhm: try to offline cpu 2 with lapicid 1| >> >> >>> >> >> >>>                 |cpu3 online=1 | >> >> >>> >> >> >>>                 |[ 1525.929538] smpboot: CPU 3 is now offline| >> >> >>> >> >> >>>                 |[ 1525.930969] vhm: try to offline cpu 3 with lapicid 3| >> >> >>> >> >> >>>                 |[ 1525.935378] ata1.00: disabled| >> >> >>> >> >> >>>                 |[ 1525.938524] sd 0:0:0:0: [sda] Synchronizing SCSI cache| >> >> >>> >> >> >>>                 |[ 1525.939206] sd 0:0:0:0: [sda] Synchronize Cache(10) >> >> >>>                 failed: Result: hostbyte=DID_BAD_TARGET >> >> >>>                 driverbyte=DRIVER_OK| >> >> >>> >> >> >>>                 |[ 1525.941643] sd 0:0:0:0: [sda] Stopping disk| >> >> >>> >> >> >>>                 |[ 1525.941888] sd 0:0:0:0: [sda] Start/Stop Unit >> >> >>>                 failed: Result: hostbyte=DID_BAD_TARGET >> >> >>>                 driverbyte=DRIVER_OK| >> >> >>> >> >> >>>                 |[ 1525.956762] pci-stub 0000:00:17.0: claimed by stub| >> >> >>> >> >> >>>                 |pm by vuart node-index = 1 | >> >> >>> >> >> >>>                 |SW_LOAD: get ovmf path /usr/share/acrn/bios/OVMF.fd, >> >> >>>                 size 0x200000 | >> >> >>> >> >> >>>                 |vm_create: hard_rtvm | >> >> >>> >> >> >>>                 |[ 1525.981345] vhm_dev_open: opening device node| >> >> >>> >> >> >>>                 |VHM api version 1.0 | >> >> >>> >> >> >>>                 |[ 1525.982333] vhm: failed to create VM from Hypervisor !| >> >> >>> >> >> >>>                 |[ 1526.483047] vhm: failed to create VM from Hypervisor !| >> >> >>> >> >> >>>                 |[ 1526.983377] vhm: failed to create VM from Hypervisor !| >> >> >>> >> >> >>>                 |[ 1527.483702] vhm: failed to create VM from Hypervisor !| >> >> >>> >> >> >>>                 |[ 1527.984028] vhm: failed to create VM from Hypervisor !| >> >> >>> >> >> >>>                 |[ 1528.484363] vhm: failed to create VM from Hypervisor !| >> >> >>> >> >> >>>                 |[ 1528.984686] vhm: failed to create VM from Hypervisor !| >> >> >>> >> >> >>>                 |[ 1529.485021] vhm: failed to create VM from Hypervisor !| >> >> >>> >> >> >>>                 |[ 1529.985346] vhm: failed to create VM from Hypervisor !| >> >> >>> >> >> >>>                 |[ 1530.485672] vhm: failed to create VM from Hypervisor !| >> >> >>> >> >> >>>                 |failed to create VM hard_rtvm | >> >> >>> >> >> >>>                 |vm_create failed| >> >> >>> >> >> >>>                 |[ 1530.994415] vhm: freed vm| >> >> >>> >> >> >>>                 Thanks! >> >> >>> >> >> >>>                 ZS >> >> >>> >> >> >>> >> >> >>> >> >> >> >> >> > >> >> > >> >> > >