diff options
author | Thomas Huth <huth@users.noreply.github.com> | 2018-01-08 10:49:15 +0100 |
---|---|---|
committer | Mike Gilbert <floppym@gentoo.org> | 2018-01-13 12:19:22 -0500 |
commit | 4ea3aa219e4f8babeb6f0568f84966ac537e8fb6 (patch) | |
tree | 84015543293d42c799230fdd8a3635f1c4da6fe4 | |
parent | logind: fix user_object_find() (diff) | |
download | systemd-4ea3aa219e4f8babeb6f0568f84966ac537e8fb6.tar.gz systemd-4ea3aa219e4f8babeb6f0568f84966ac537e8fb6.tar.bz2 systemd-4ea3aa219e4f8babeb6f0568f84966ac537e8fb6.zip |
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.
(cherry picked from commit d35d6249d5a7ed3228b94fc0e36a36bc3fe84482)
-rw-r--r-- | rules/50-udev-default.rules.in | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/rules/50-udev-default.rules.in b/rules/50-udev-default.rules.in index 71e716913..191f56f42 100644 --- a/rules/50-udev-default.rules.in +++ b/rules/50-udev-default.rules.in @@ -78,7 +78,8 @@ KERNEL=="tun", MODE="0666", OPTIONS+="static_node=net/tun" KERNEL=="fuse", MODE="0666", OPTIONS+="static_node=fuse" -KERNEL=="kvm", GROUP="kvm", MODE="@DEV_KVM_MODE@" +# The static_node is required on s390x and ppc (they are using MODULE_ALIAS) +KERNEL=="kvm", GROUP="kvm", MODE="@DEV_KVM_MODE@", OPTIONS+="static_node=kvm" SUBSYSTEM=="ptp", ATTR{clock_name}=="KVM virtual PTP", SYMLINK += "ptp_kvm" |