summaryrefslogtreecommitdiffstats
path: root/arch/s390/kvm
diff options
context:
space:
mode:
authorCornelia Huck <cornelia.huck@de.ibm.com>2013-05-27 18:42:33 +0200
committerGleb Natapov <gleb@redhat.com>2013-06-03 13:55:10 +0300
commit566af9404bf57267ea4fc29ca6b4628a17ee3ea7 (patch)
tree925fd1d19fd7df2aee0487c1e15e4ed0518f23e2 /arch/s390/kvm
parente47a5f5fb715b90b40747e9e235de557c6abd56c (diff)
downloadop-kernel-dev-566af9404bf57267ea4fc29ca6b4628a17ee3ea7.zip
op-kernel-dev-566af9404bf57267ea4fc29ca6b4628a17ee3ea7.tar.gz
KVM: s390: Add "devname:kvm" alias.
Providing a "devname:kvm" module alias enables automatic loading of the kvm module when /dev/kvm is opened. Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Gleb Natapov <gleb@redhat.com>
Diffstat (limited to 'arch/s390/kvm')
-rw-r--r--arch/s390/kvm/kvm-s390.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
index 93444c4..3b597e5 100644
--- a/arch/s390/kvm/kvm-s390.c
+++ b/arch/s390/kvm/kvm-s390.c
@@ -1138,3 +1138,12 @@ static void __exit kvm_s390_exit(void)
module_init(kvm_s390_init);
module_exit(kvm_s390_exit);
+
+/*
+ * Enable autoloading of the kvm module.
+ * Note that we add the module alias here instead of virt/kvm/kvm_main.c
+ * since x86 takes a different approach.
+ */
+#include <linux/miscdevice.h>
+MODULE_ALIAS_MISCDEV(KVM_MINOR);
+MODULE_ALIAS("devname:kvm");
OpenPOWER on IntegriCloud