XRT
XRT copied to clipboard
CR-1129630 Print warning if Versal device is using its backup boot
Problem solved by the commit
https://jira.xilinx.com/browse/CR-1129630 The B image is considered a backup image that only support basic functionality rather than providing full XRT services.
Bug / issue (if any) fixed, which PR introduced the bug, how it was discovered
New feature
How problem was solved, alternative solutions (if any) and why they were rejected
The problem was solved by passing the vmr status information into the userspace via sysfs nodes. xbmgmt/xbutil read these nodes and print hard to miss error messages in this event.
Risks (if any) associated the changes in the commit
The main change is that vmr status for the userpf is stored within the fdt blob. The VMR status given to the userpf is also incomplete, it currently only contains relevant information to this change.
What has been tested and how, request additional testing if necessary
Tested using xbmgmt program --boot options. Backup image testing
dbenusov@xsjdbenusov50:/proj/rdi/staff/dbenusov/XRT$ cat /sys/bus/pci/devices/0000\:17\:00.0/ready
1
dbenusov@xsjdbenusov50:/proj/rdi/staff/dbenusov/XRT$ cat /sys/bus/pci/devices/0000\:17\:00.0/xgq_vmr.m.54525952/vmr_status
HAS_FPT:1
HAS_FPT_RECOVERY:1
BOOT_ON_DEFAULT:0
BOOT_ON_BACKUP:1
BOOT_ON_RECOVERY:0
CURRENT_MULTI_BOOT_OFFSET:0x9
BOOT_ON_OFFSET:0xc01
HAS_EXTFPT:1
HAS_EXT_META_XSABIN:1
HAS_EXT_SC_FW:1
HAS_EXT_SYSTEM_DTB:1
DEBUG_LEVEL:0
PROGRAM_PROGRESS:0
PL_IS_READY:1
PS_IS_READY:1
dbenusov@xsjdbenusov50:/proj/rdi/staff/dbenusov/XRT$ cat /sys/bus/pci/devices/0000\:17\:00.1/ready
0x1
dbenusov@xsjdbenusov50:/proj/rdi/staff/dbenusov/XRT$ cat /sys/bus/pci/devices/0000\:17\:00.1/vmr_status
BOOT_ON_DEFAULT:0
BOOT_ON_BACKUP:1
BOOT_ON_RECOVERY:0
dbenusov@xsjdbenusov50:/proj/rdi/staff/dbenusov/XRT$ xbutil examine
System Configuration
OS Name : Linux
Release : 5.4.0-126-generic
Version : #142-Ubuntu SMP Fri Aug 26 12:12:57 UTC 2022
Machine : x86_64
CPU Cores : 16
Memory : 64007 MB
Distribution : Ubuntu 20.04.1 LTS
GLIBC : 2.31
Model : Precision 5820 Tower
XRT
Version : 2.14.0
Branch : CR-1129630
Hash : d3b7fa4fe61a94a3ed51a8cffcd8bb05296587f3
Hash Date : 2022-10-04 11:00:51
XOCL : 2.14.0, a3befd1ac0b78555ee7150a3199795ed9b49887a
XCLMGMT : 2.14.0, a3befd1ac0b78555ee7150a3199795ed9b49887a
Devices present
BDF : Shell Platform UUID Device ID Device Ready*
---------------------------------------------------------------------------------------------------------------------------
[0000:17:00.1] : xilinx_vck5000_gen4x8_qdma_base_2 FEAAC65A-8BD9-9924-548D-1F91503D9D40 user(inst=128) Yes
* Devices that are not ready will have reduced functionality when using XRT tools
dbenusov@xsjdbenusov50:/proj/rdi/staff/dbenusov/XRT$ xbmgmt examine
System Configuration
OS Name : Linux
Release : 5.4.0-126-generic
Version : #142-Ubuntu SMP Fri Aug 26 12:12:57 UTC 2022
Machine : x86_64
CPU Cores : 16
Memory : 64007 MB
Distribution : Ubuntu 20.04.1 LTS
GLIBC : 2.31
Model : Precision 5820 Tower
XRT
Version : 2.14.0
Branch : CR-1129630
Hash : d3b7fa4fe61a94a3ed51a8cffcd8bb05296587f3
Hash Date : 2022-10-04 11:00:51
XOCL : 2.14.0, a3befd1ac0b78555ee7150a3199795ed9b49887a
XCLMGMT : 2.14.0, a3befd1ac0b78555ee7150a3199795ed9b49887a
Devices present
BDF : Shell Platform UUID Device ID Device Ready*
----------------------------------------------------------------------------------------------------------------------------
[0000:17:00.0] : xilinx_vck5000_gen4x8_qdma_base_2 FEAAC65A-8BD9-9924-548D-1F91503D9D40 mgmt(inst=5888) Yes
* Devices that are not ready will have reduced functionality when using XRT tools
dbenusov@xsjdbenusov50:/proj/rdi/staff/dbenusov/XRT$ xbutil validate -d 17:00
***********************************************************
******** WARNING ******** WARNING ******** WARNING ********
************* Versal Platform in backup boot **************
***********************************************************
Validate Device : [0000:17:00.1]
Platform : xilinx_vck5000_gen4x8_qdma_base_2
SC Version : 0.4.35
Platform ID : FEAAC65A-8BD9-9924-548D-1F91503D9D40
-------------------------------------------------------------------------------
Test 1 [0000:17:00.1] : pcie-link
Warning(s) : Link is active
Please make sure that the device is plugged into Gen 4x8,
instead of Gen 3x8. Lower performance maybe experienced.
Test Status : [PASSED WITH WARNINGS]
-------------------------------------------------------------------------------
Test 2 [0000:17:00.1] : sc-version
Test Status : [PASSED]
-------------------------------------------------------------------------------
Test 3 [0000:17:00.1] : verify
Test 4 [0000:17:00.1] : dma
Test 5 [0000:17:00.1] : iops
Test 6 [0000:17:00.1] : mem-bw
Test 7 [0000:17:00.1] : p2p
Test 8 [0000:17:00.1] : vcu
Test 9 [0000:17:00.1] : aie-pl
Validation completed, but with warnings. Please run the command '--verbose' option for more details
Default image testing
dbenusov@xsjdbenusov50:/proj/rdi/staff/dbenusov/XRT$ sudo ./build/Debug/opt/xilinx/xrt/bin/xbmgmt program -d 17:00 --boot DEFAULT
[sudo] password for dbenusov:
***********************************************************
******** WARNING ******** WARNING ******** WARNING ********
************* Versal Platform in backup boot **************
***********************************************************
Rebooting device: [0000:17:00.0] with 'default' partition
Performing hot reset...
Stopping user function...
Rebooted successfully
dbenusov@xsjdbenusov50:/proj/rdi/staff/dbenusov/XRT$ cat /sys/bus/pci/devices/0000\:17\:00.0/ready
1
dbenusov@xsjdbenusov50:/proj/rdi/staff/dbenusov/XRT$ cat /sys/bus/pci/devices/0000\:17\:00.0/xgq_vmr.m.54525952/vmr_status
HAS_FPT:1
HAS_FPT_RECOVERY:1
BOOT_ON_DEFAULT:1
BOOT_ON_BACKUP:0
BOOT_ON_RECOVERY:0
CURRENT_MULTI_BOOT_OFFSET:0x9
BOOT_ON_OFFSET:0x9
HAS_EXTFPT:1
HAS_EXT_META_XSABIN:1
HAS_EXT_SC_FW:1
HAS_EXT_SYSTEM_DTB:1
DEBUG_LEVEL:0
PROGRAM_PROGRESS:0
PL_IS_READY:1
PS_IS_READY:1
dbenusov@xsjdbenusov50:/proj/rdi/staff/dbenusov/XRT$ cat /sys/bus/pci/devices/0000\:17\:00.1/ready
0x1
dbenusov@xsjdbenusov50:/proj/rdi/staff/dbenusov/XRT$ cat /sys/bus/pci/devices/0000\:17\:00.1/vmr_status
BOOT_ON_DEFAULT:1
BOOT_ON_BACKUP:0
BOOT_ON_RECOVERY:0
dbenusov@xsjdbenusov50:/proj/rdi/staff/dbenusov/XRT$ xbutil examine
System Configuration
OS Name : Linux
Release : 5.4.0-126-generic
Version : #142-Ubuntu SMP Fri Aug 26 12:12:57 UTC 2022
Machine : x86_64
CPU Cores : 16
Memory : 64007 MB
Distribution : Ubuntu 20.04.1 LTS
GLIBC : 2.31
Model : Precision 5820 Tower
XRT
Version : 2.14.0
Branch : CR-1129630
Hash : b055eb6ebacb9f2655109cf9d104f414923493e6
Hash Date : 2022-10-04 11:12:24
XOCL : 2.14.0, a3befd1ac0b78555ee7150a3199795ed9b49887a
XCLMGMT : 2.14.0, a3befd1ac0b78555ee7150a3199795ed9b49887a
Devices present
BDF : Shell Platform UUID Device ID Device Ready*
---------------------------------------------------------------------------------------------------------------------------
[0000:17:00.1] : xilinx_vck5000_gen4x8_qdma_base_2 FEAAC65A-8BD9-9924-548D-1F91503D9D40 user(inst=128) Yes
* Devices that are not ready will have reduced functionality when using XRT tools
dbenusov@xsjdbenusov50:/proj/rdi/staff/dbenusov/XRT$ xbmgmt examine
System Configuration
OS Name : Linux
Release : 5.4.0-126-generic
Version : #142-Ubuntu SMP Fri Aug 26 12:12:57 UTC 2022
Machine : x86_64
CPU Cores : 16
Memory : 64007 MB
Distribution : Ubuntu 20.04.1 LTS
GLIBC : 2.31
Model : Precision 5820 Tower
XRT
Version : 2.14.0
Branch : CR-1129630
Hash : b055eb6ebacb9f2655109cf9d104f414923493e6
Hash Date : 2022-10-04 11:12:24
XOCL : 2.14.0, a3befd1ac0b78555ee7150a3199795ed9b49887a
XCLMGMT : 2.14.0, a3befd1ac0b78555ee7150a3199795ed9b49887a
Devices present
BDF : Shell Platform UUID Device ID Device Ready*
----------------------------------------------------------------------------------------------------------------------------
[0000:17:00.0] : xilinx_vck5000_gen4x8_qdma_base_2 FEAAC65A-8BD9-9924-548D-1F91503D9D40 mgmt(inst=5888) Yes
* Devices that are not ready will have reduced functionality when using XRT tools
dbenusov@xsjdbenusov50:/proj/rdi/staff/dbenusov/XRT$ xbutil validate -d 17:00
Validate Device : [0000:17:00.1]
Platform : xilinx_vck5000_gen4x8_qdma_base_2
SC Version : 0.4.35
Platform ID : FEAAC65A-8BD9-9924-548D-1F91503D9D40
-------------------------------------------------------------------------------
Test 1 [0000:17:00.1] : pcie-link
Warning(s) : Link is active
Please make sure that the device is plugged into Gen 4x8,
instead of Gen 3x8. Lower performance maybe experienced.
Test Status : [PASSED WITH WARNINGS]
-------------------------------------------------------------------------------
Test 2 [0000:17:00.1] : sc-version
Test Status : [PASSED]
-------------------------------------------------------------------------------
Test 3 [0000:17:00.1] : verify
Test 4 [0000:17:00.1] : dma
Test 5 [0000:17:00.1] : iops
Test 6 [0000:17:00.1] : mem-bw
Test 7 [0000:17:00.1] : p2p
Test 8 [0000:17:00.1] : vcu
Test 9 [0000:17:00.1] : aie-pl
Documentation impact (if any)
N/A
Build Failed! :(
@dbenusov-xilinx You should make use of git rebase master to avoid all the merge commits into your PR. It is okay to have multiple commits with a PR, but it is better if all those commits are related to what the PR is solving.
My typical flow is that I work on a feature branch for however long it takes, but periodically I rebase my feature branch against latest master branch, especially if I need to get other folks' changes, that way my commits stay on top and I can easily see what I have done.
Build Failed! :(
Build Passed!
Build Failed! :(
retest this please.
Build Passed!
Build Failed! :(
Build Failed! :(
Build Passed!
Build Passed!
Build Passed!
Build Passed!
Build Passed!
Build Passed!
Build Passed!