]> Pileus Git - ~andy/linux/commitdiff
misc: Reserve minor for VFIO
authorAlex Williamson <alex.williamson@redhat.com>
Thu, 19 Dec 2013 17:17:11 +0000 (10:17 -0700)
committerAlex Williamson <alex.williamson@redhat.com>
Thu, 19 Dec 2013 17:17:11 +0000 (10:17 -0700)
VFIO currently allocates it's own dynamic chardev range, reserving the
first minor for the control part of the interface (/dev/vfio/vfio) and
the remainder for VFIO groups (/dev/vfio/$GROUP).  This works, but it
doesn't support auto loading.  For instance when libvirt checks for
VFIO support it looks for /dev/vfio/vfio, which currently doesn't
exist unless the vfio module is loaded.  By converting the control
device to a misc driver and reserving a static minor, we can enable
auto loading.

Reserving the minor is a prerequist to that conversion.  Minor 196
is unused by anything currently in the kernel.

Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Documentation/devices.txt
include/linux/miscdevice.h

index 80b72419ffd8a83dfc8e150d5f5088ec69e4f0d9..10378cc48374cf8ffde068d4ce329ce5b5cbb205 100644 (file)
@@ -409,6 +409,7 @@ Your cooperation is appreciated.
                193 = /dev/d7s          SPARC 7-segment display
                194 = /dev/zkshim       Zero-Knowledge network shim control
                195 = /dev/elographics/e2201    Elographics touchscreen E271-2201
+               196 = /dev/vfio/vfio    VFIO userspace driver interface
                198 = /dev/sexec        Signed executable interface
                199 = /dev/scanners/cuecat :CueCat barcode scanner
                200 = /dev/net/tun      TAP/TUN network device
index f7eaf2d60083a5c7d216456e631b1f2b56ea7892..3737f7218f51362ea9cf1991a66c0328143741b8 100644 (file)
@@ -30,6 +30,7 @@
 #define STORE_QUEUE_MINOR      155
 #define I2O_MINOR              166
 #define MICROCODE_MINOR                184
+#define VFIO_MINOR             196
 #define TUN_MINOR              200
 #define CUSE_MINOR             203
 #define MWAVE_MINOR            219     /* ACP/Mwave Modem */