Closed guanhj-ips closed 3 years ago
Hi @guanhj-ips can you may be having problems to access /dev/crypto/nx-gzip
Please refer to https://github.com/libnxz/power-gzip/wiki/Enable-nx-gzip-on-POWER9#nx-gzip-device-permissions
To clarify, which kernel version are you using? If you are using something older than 5.8 you will need to patch it to be able to access /dev/crypto/nx-gzip
Hi,@rzinsly,I compiled kernel 5.8 version, enable CONFIG_PPC_VAS, CONFIG_CRYPTO_DEV_NX_COMPRESS and CONFIG_CRYPTO_DEV_NX_COMPRESS_POWERNV config, make modules_install, make install. but when I run this kernel, no /dev/crypto/nx-gzip device。 [root@localhost nxgzip]# LD_PRELOAD=./libnxz.so ./nx_gzip test.txt open device name /dev/crypto/nx-gzip open_device_nodes failed [root@localhost nxgzip]# uname -a Linux localhost 5.8.0 #4 SMP Wed Sep 1 06:59:29 UTC 2021 ppc64le ppc64le ppc64le GNU/Linux [root@localhost nxgzip]#
@guanhj-ips Are you using the following values?
CONFIG_PPC_VAS=y
CONFIG_CRYPTO_DEV_NX_COMPRESS_POWERNV=y
@rzinsly .config file as follows. CONFIG_PPC_VAS=y CONFIG_CRYPTO_HW=y CONFIG_CRYPTO_DEV_NX=y CONFIG_CRYPTO_DEV_NX_COMPRESS=y CONFIG_CRYPTO_DEV_NX_COMPRESS_PSERIES=y CONFIG_CRYPTO_DEV_NX_COMPRESS_POWERNV=y
@guanhj-ips Do you have the following lines at the bottom of /proc/cpuinfo
?
platform : PowerNV
firmware : OPAL
MMU : Radix
@tuliom machine is no problem. I replace kernel 4.14 with 5.8. Is this method feasible?
timebase : 512000000 platform : PowerNV model : FP5280G2 machine : PowerNV FP5280G2 firmware : OPAL MMU : Radix [root@localhost ~]# [root@localhost ~]# cat /etc/redhat-release Red Hat Enterprise Linux Server release 7.5 (Maipo) [root@localhost ~]# cat /boot/grub2/grub.cfg | grep menuentry if [ x"${feature_menuentry_id}" = xy ]; then menuentry_id_option="--id" menuentry_id_option="" export menuentry_id_option menuentry 'Red Hat Enterprise Linux Server (5.8.0) 7.5 (Maipo)' --class red --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-4.14.0-49.el7a.ppc64le-advanced-503f0a55-227a-40dc-9c95-d6f25007daa6' { menuentry 'Red Hat Enterprise Linux Server (4.14.49-8_nxgzip2.ppc64le) 7.5 (Maipo)' --class red --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-4.14.0-49.el7a.ppc64le-advanced-503f0a55-227a-40dc-9c95-d6f25007daa6' { menuentry 'Red Hat Enterprise Linux Server (4.14.0-49.el7a.ppc64le) 7.5 (Maipo)' --class red --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-4.14.0-49.el7a.ppc64le-advanced-503f0a55-227a-40dc-9c95-d6f25007daa6' { menuentry 'Red Hat Enterprise Linux Server (0-rescue-3fa9a375e4b24d27b82d77d53611a98b) 7.5 (Maipo)' --class red --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-0-rescue-3fa9a375e4b24d27b82d77d53611a98b-advanced-503f0a55-227a-40dc-9c95-d6f25007daa6' { [root@localhost ~]#
@guanhj-ips yes, it is. I'm out of ideas.
@hmyneni any suggestions on what could be happening here?
The requirements seem to be met, but /dev/crypto/nx-gzip
is still not available.
I suspect the issue is with the correct FW. Hi lease check /proc/device-tree/xscom/nx/ whether gzip properties are available
Which system is used? Is it P9 DD 2.3?
@hmyneni /proc/device-tree/xscom/nx/ are as follows. P9 DD 2.2. this machine runned well kernel 4.14.0-49 +libnxz.so + FW last week. they are published versions long time ago. this time I update kernel 5.8 + libnxz.so.0.62. they don't work. [root@localhost ~]# lscpu Architecture: ppc64le Byte Order: Little Endian CPU(s): 176 On-line CPU(s) list: 0-175 Thread(s) per core: 4 Core(s) per socket: 22 Socket(s): 2 NUMA node(s): 2 Model: 2.2 (pvr 004e 1202) Model name: POWER9, altivec supported CPU max MHz: 3800.0000 CPU min MHz: 2166.0000 L1d cache: 32K L1i cache: 32K L2 cache: 512K L3 cache: 10240K NUMA node0 CPU(s): 0-87 NUMA node8 CPU(s): 88-175
[root@localhost nx@2010000]# pwd /proc/device-tree/xscom@603fc00000000/nx@2010000 [root@localhost nx@2010000]# ls compatible ibm,842-high-fifo ibm,842-normal-fifo ibm,gzip-high-fifo ibm,gzip-normal-fifo name phandle reg [root@localhost nx@2010000]# cat compatible ibm,power9-nx[root@localhost nx@2010000]# [root@localhost nx@2010000]# uname -a Linux localhost 5.8.0 #4 SMP Wed Sep 1 06:59:29 UTC 2021 ppc64le ppc64le ppc64le GNU/Linux [root@localhost nx@2010000]# cat name nx[root@localhost nx@2010000]# [root@localhost nx@2010000]# [root@localhost nx@2010000]# cd ../../xscom\@6 xscom@603fc00000000/ xscom@623fc00000000/ [root@localhost nx@2010000]# cd ../../xscom\@623fc00000000/
bus-frequency frequency-ultra_turbo ibm,hw-card-id mcbist@2/ pbcq@4011400/ vas@3011800/ chiptod@40000/ i2cm@a1000/ ibm,hw-module-id name phandle wafer-id compatible i2cm@a2000/ ibm,loc-code nmmu@5012c40/ psihb@5012900/ wafer-location ecid i2cm@a3000/ ibm,module-vpd nx@2010000/ reg xive@5013000/ frequency-nominal ibm,ccm-node-id ibm,occ-functional-state part-number scom-controller frequency-power_save ibm,chip-id ibm,proc-chip-id pbcq@4010c00/ serial-number [root@localhost nx@2010000]# cd ../../xscom\@623fc00000000/nx\@2010000/ [root@localhost nx@2010000]# ls compatible ibm,842-high-fifo ibm,842-normal-fifo ibm,gzip-high-fifo ibm,gzip-normal-fifo name phandle reg [root@localhost nx@2010000]# cat compatible ibm,power9-nx[root@localhost nx@2010000]# [root@localhost nx@2010000]# cat name nx[root@localhost nx@2010000]#
@tuliom @hmyneni Do you have any guide about enabling NXGzip engine with kernel 5.8? Seems the way IPS used for kernel 4.14 does not work with kernel 5.8.
@edwin-wang I believe the customized kernel (4.19) and the corresponding customized skiboot are used before. Are you using the the official latest skiboot with the upstream 5.18 kernel? right now?
Please also check /proc/device-tree/vas* and paste here. Also attach dmesg file.
@hmyneni /proc/device-tree/vas* as follows. where is the official latest skiboot with the upstream 5.18 kernel? the lastest release version of skiboot(https://github.com/open-power/skiboot) in github is v6.2(on 14 Dec 2018) .
[root@localhost vas@6219100000000]# cat /proc/device-tree/vas* cat: /proc/device-tree/vas@6019100000000: Is a directory cat: /proc/device-tree/vas@6219100000000: Is a directory [root@localhost vas@6219100000000]# cd /proc/device-tree/vas\@6019100000000/ [root@localhost vas@6019100000000]# ls compatible ibm,chip-id ibm,vas-id ibm,vas-port interrupt-parent interrupts name phandle reg [root@localhost vas@6019100000000]# cd /proc/device-tree/vas\@6219100000000/ [root@localhost vas@6219100000000]# [root@localhost vas@6219100000000]# ls compatible ibm,chip-id ibm,vas-id ibm,vas-port interrupt-parent interrupts name phandle reg [root@localhost vas@6219100000000]# [root@localhost vas@6219100000000]# [root@localhost vas@6219100000000]# [root@localhost vas@6219100000000]# dmesg | grep vas [ 2.756374] vas: Unexpected DT configuration for [6019100000000.vas, 0] [ 2.757190] vas: Unexpected DT configuration for [6219100000000.vas, 1] [root@localhost vas@6219100000000]# [root@localhost vas@6219100000000]# dmesg | grep nx-gzip [root@localhost vas@6219100000000]# dmesg | grep nxgzip [root@localhost vas@6219100000000]#
@guanhj-ips Could you attach the whole messages file or dmesg here?
dmesg shows - "Unexpected DT configuration fo" which is due to incompatibility between skiboot and kernel. Please try with the latest skiboot from https://github.com/open-power/skiboot nxgzip changes are included in skiboot around Dec 2019.
@hmyneni I update skiboot version, then nxgzip function is ok now.
Hi, I compiled libnxz.so and sample/nx_gzip from master. I run test cmd and report error.
[xxxx]# LD_PRELOAD=./libnxz.so ./nx_gzip test.txt ioctl() n -1, error 22 open_device_nodes failed