Skip to content

Commit 566af94

Browse files
cohuckGleb Natapov
authored andcommitted
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 <[email protected]> Signed-off-by: Gleb Natapov <[email protected]>
1 parent e47a5f5 commit 566af94

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

arch/s390/kvm/kvm-s390.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1138,3 +1138,12 @@ static void __exit kvm_s390_exit(void)
11381138

11391139
module_init(kvm_s390_init);
11401140
module_exit(kvm_s390_exit);
1141+
1142+
/*
1143+
* Enable autoloading of the kvm module.
1144+
* Note that we add the module alias here instead of virt/kvm/kvm_main.c
1145+
* since x86 takes a different approach.
1146+
*/
1147+
#include <linux/miscdevice.h>
1148+
MODULE_ALIAS_MISCDEV(KVM_MINOR);
1149+
MODULE_ALIAS("devname:kvm");

0 commit comments

Comments
 (0)