xref: /linux/drivers/vhost/Kconfig (revision 821c9e515db512904250e1d460109a1dc4c7ef6b)
1# SPDX-License-Identifier: GPL-2.0-only
2config VHOST_IOTLB
3	tristate
4	help
5	  Generic IOTLB implementation for vhost and vringh.
6	  This option is selected by any driver which needs to support
7	  an IOMMU in software.
8
9config VHOST_RING
10	tristate
11	select VHOST_IOTLB
12	help
13	  This option is selected by any driver which needs to access
14	  the host side of a virtio ring.
15
16config VHOST_TASK
17	bool
18	default n
19
20config VHOST
21	tristate
22	select VHOST_IOTLB
23	select VHOST_TASK
24	help
25	  This option is selected by any driver which needs to access
26	  the core of vhost.
27
28menuconfig VHOST_MENU
29	bool "VHOST drivers"
30	default y
31
32if VHOST_MENU
33
34config VHOST_NET
35	tristate "Host kernel accelerator for virtio net"
36	depends on NET && EVENTFD && (TUN || !TUN) && (TAP || !TAP)
37	select VHOST
38	help
39	  This kernel module can be loaded in host kernel to accelerate
40	  guest networking with virtio_net. Not to be confused with virtio_net
41	  module itself which needs to be loaded in guest kernel.
42
43	  To compile this driver as a module, choose M here: the module will
44	  be called vhost_net.
45
46config VHOST_SCSI
47	tristate "VHOST_SCSI TCM fabric driver"
48	depends on TARGET_CORE && EVENTFD
49	select VHOST
50	select SG_POOL
51	default n
52	help
53	Say M here to enable the vhost_scsi TCM fabric module
54	for use with virtio-scsi guests
55
56config VHOST_VSOCK
57	tristate "vhost virtio-vsock driver"
58	depends on VSOCKETS && EVENTFD
59	select VHOST
60	select VIRTIO_VSOCKETS_COMMON
61	default n
62	help
63	This kernel module can be loaded in the host kernel to provide AF_VSOCK
64	sockets for communicating with guests.  The guests must have the
65	virtio_transport.ko driver loaded to use the virtio-vsock device.
66
67	To compile this driver as a module, choose M here: the module will be called
68	vhost_vsock.
69
70config VHOST_VDPA
71	tristate "Vhost driver for vDPA-based backend"
72	depends on EVENTFD
73	select VHOST
74	select IRQ_BYPASS_MANAGER
75	depends on VDPA
76	help
77	  This kernel module can be loaded in host kernel to accelerate
78	  guest virtio devices with the vDPA-based backends.
79
80	  To compile this driver as a module, choose M here: the module
81	  will be called vhost_vdpa.
82
83config VHOST_CROSS_ENDIAN_LEGACY
84	bool "Cross-endian support for vhost"
85	default n
86	help
87	  This option allows vhost to support guests with a different byte
88	  ordering from host while using legacy virtio.
89
90	  Userspace programs can control the feature using the
91	  VHOST_SET_VRING_ENDIAN and VHOST_GET_VRING_ENDIAN ioctls.
92
93	  This is only useful on a few platforms (ppc64 and arm64). Since it
94	  adds some overhead, it is disabled by default.
95
96	  If unsure, say "N".
97
98config VHOST_ENABLE_FORK_OWNER_CONTROL
99	bool "Enable VHOST_ENABLE_FORK_OWNER_CONTROL"
100	default y
101	help
102	  This option enables two IOCTLs: VHOST_SET_FORK_FROM_OWNER and
103	  VHOST_GET_FORK_FROM_OWNER. These allow userspace applications
104	  to modify the vhost worker mode for vhost devices.
105
106	  Also expose module parameter 'fork_from_owner_default' to allow users
107	  to configure the default mode for vhost workers.
108
109	  By default, `VHOST_ENABLE_FORK_OWNER_CONTROL` is set to `y`,
110	  users can change the worker thread mode as needed.
111	  If this config is disabled (n),the related IOCTLs and parameters will
112	  be unavailable.
113
114	  If unsure, say "Y".
115
116endif
117