BACKPORT: vhost/vsock: use static minor number
Vhost-vsock is a software device so there is no probe call that causes
the driver to register its misc char device node. This creates a
chicken and egg problem: userspace applications must open
/dev/vhost-vsock to use the driver but the file doesn't exist until the
kernel module has been loaded.
Use the devname modalias mechanism so that /dev/vhost-vsock is created
at boot. The vhost_vsock kernel module is automatically loaded when the
first application opens /dev/host-vsock.
Note that the "reserved for local use" range in
Documentation/admin-guide/devices.txt is incorrect. The userio driver
already occupies part of that range. I've updated the documentation
accordingly.
Cc: device@lanana.org
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit f4660cc994e12bae60d6f49895636fba662ce0a1)
Conflicts:
Documentation/admin-guide/devices.txt
- This file did not exist in our tree so I removed it from the commit.
BUG=chromium:763970
TEST=build caroline with USE=kvm_host
Change-Id: Id9966bc55e835ae9a65a71ecdf3b412fb88ecad4
Signed-off-by: Chirantan Ekbote <chirantan@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/669387
Reviewed-by: Dylan Reid <dgreid@chromium.org>
Signed-off-by: Sonny Rao <sonnyrao@chromium.org>
[SR: context conflicts in 3.18]
Conflicts:
include/linux/miscdevice.h
Reviewed-on: https://chromium-review.googlesource.com/1058977
Reviewed-by: Guenter Roeck <groeck@chromium.org>
2 files changed