]> git.ipfire.org Git - thirdparty/systemd.git/commit
rules: Mark the kvm device as static_node (for s390x and ppc64) (#7795)
authorThomas Huth <huth@users.noreply.github.com>
Mon, 8 Jan 2018 09:49:15 +0000 (10:49 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 8 Jan 2018 09:49:15 +0000 (10:49 +0100)
commitd35d6249d5a7ed3228b94fc0e36a36bc3fe84482
tree60953b150847d6f98e31cadd1afe1a092cc91170
parent2df46112052ee9752ce2d2920ad6184b304c77ed
rules: Mark the kvm device as static_node (for s390x and ppc64) (#7795)

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. we have to specify the option "static_node=kvm" in the
udev rule.

Note that on x86, the kvm kernel modules are loaded early instead (via the
MODULE_DEVICE_TABLE(x86cpu, ...) feature checking), so that the right module
is loaded for the Intel or AMD hypervisor extensions right from the start.
Thus the "static_node=kvm" is not required on x86 - but it also should not
hurt here (and using it here even might be more future proof in case the
module loading is also done delayed there one day), so we just add the new
option to the rule here unconditionally.
rules/50-udev-default.rules.in