KVM: s390: Add "devname:kvm" alias.
authorCornelia Huck <cornelia.huck@de.ibm.com>
Mon, 27 May 2013 16:42:33 +0000 (18:42 +0200)
committerGleb Natapov <gleb@redhat.com>
Mon, 3 Jun 2013 10:55:10 +0000 (13:55 +0300)
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>
arch/s390/kvm/kvm-s390.c

index 93444c4..3b597e5 100644 (file)
@@ -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");