Bugzilla – Bug 1214999
NVMe CLI issue on openSUSE Leap 15.5
Last modified: 2024-01-25 14:09:23 UTC
Created attachment 869282 [details] screenshots There may be a nvme cli issue on openSUSE leap 15.5 I have the latest revision of nvme cli downloaded (2.4) on a opensuse system. I am looking to transition my centos servers to opensuse but this issue would be blocker to that. I am testing nvme drives for work and part of my test script looks to check the controller registers supported by the drive. I use "nvme show-regs /dev/nvmex" which should work. Please attached screenshots. You can expected output vs output I'm seeing on a opensuse system. CentOS system works as expected (see the attached document). I need this command to work in order to ensure the test script does what it's meant to. Is there a workaround?
'show-regs' is actually limited by kernel lockdown, which precisely forbids 'ordinary' user to look at PCI registers. But it might be that newer nvme-cli has a workaround to that. Daniel?
(In reply to Hannes Reinecke from comment #1) > 'show-regs' is actually limited by kernel lockdown, which precisely forbids > 'ordinary' user to look at PCI registers. > > But it might be that newer nvme-cli has a workaround to that. > Daniel? What does it mean to be an "ordinary" user? Is it possible to overwrite to send the command? I believe I am on the latest rev available for nvme cli-2.4.
Hardware register access is limited by the kernel config option CONFIG_IO_STRICT_DEVMEM. This means, userspace can't map the hardware register and thus nvme-cli is not able to read them. The access strict feature can be disabled by adding the kernel command line option 'iomem=relaxed' https://documentation.suse.com/smart/systems-management/html/task-modify-kernel-boot-parameter/index.html
nvme-cli can only show the hardware register when the kernel allows to map the hardware register to userland. The default distribution settions do not allow this operation. Though this can be enabled by booting the kernel with the 'iomem=relaxed' command line option. This works as designed, nothing we ca do. Closing the bug report.