Description of problem: On s390x and ppc64, the permissions of the /dev/kvm device are currently not right as long as the kvm kernel module has not been loaded yet. The kernel module is using MODULE_ALIAS("devname:kvm") there, so the module will be loaded on the first access to /dev/kvm. In that case, udev needs to apply the permission to the static node already (which was created via devtmpfs), i.e. the udev rule hase to be specified with the option "static_node=kvm". Please included the following patch in Fedora 28 to fix this problem: https://github.com/systemd/systemd/commit/d35d6249d5a7ed3228 Steps to Reproduce: 1. Reboot a s390x machine (and make sure that the kvm.ko kernel module is not automatically loaded by any means) 2. Check the permissions of /dev/kvm 3. Load the kvm.ko kernel module 4. Check the permissions of /dev/kvm again Actual results: # ls -l /dev/kvm crw------- 1 root root 10, 232 4. Jan 03:23 /dev/kvm # modprobe kvm # ls -l /dev/kvm crw-rw---- 1 root kvm 10, 232 4. Jan 03:25 /dev/kvm Expected results: # ls -l /dev/kvm crw-rw---- 1 root kvm 10, 232 4. Jan 03:23 /dev/kvm # modprobe kvm # ls -l /dev/kvm crw-rw---- 1 root kvm 10, 232 4. Jan 03:23 /dev/kvm
By the way, the problem has been discovered by running "virsh domcapabilities" on a freshly booted s390x system. As long as the kvm.ko module has not been loaded yet, the command returns the wrong information since /dev/kvm is not accessible. With the udev rule fixed, /dev/kvm is accessible and thus the kvm.ko module is loaded on access automatically, so that "virsh domcapabilities" can return the right information to the user.