xref: /linux/drivers/virtio/Kconfig (revision da802961832f9852886304290135457519815497)
1# SPDX-License-Identifier: GPL-2.0-only
2config VIRTIO
3	tristate
4	help
5	  This option is selected by any driver which implements the virtio
6	  bus, such as CONFIG_VIRTIO_PCI, CONFIG_VIRTIO_MMIO, CONFIG_RPMSG
7	  or CONFIG_S390_GUEST.
8
9config VIRTIO_PCI_LIB
10	tristate
11	help
12	  Modern PCI device implementation. This module implements the
13	  basic probe and control for devices which are based on modern
14	  PCI device with possible vendor specific extensions. Any
15	  module that selects this module must depend on PCI.
16
17config VIRTIO_PCI_LIB_LEGACY
18	tristate
19	help
20	  Legacy PCI device (Virtio PCI Card 0.9.x Draft and older device)
21	  implementation.
22	  This module implements the basic probe and control for devices
23	  which are based on legacy PCI device. Any module that selects this
24	  module must depend on PCI.
25
26menuconfig VIRTIO_MENU
27	bool "Virtio drivers"
28	default y
29
30if VIRTIO_MENU
31
32config VIRTIO_HARDEN_NOTIFICATION
33        bool "Harden virtio notification"
34        depends on BROKEN
35        help
36          Enable this to harden the device notifications and suppress
37          those that happen at a time where notifications are illegal.
38
39          Experimental: Note that several drivers still have issues that
40          may cause crashes or hangs when correct handling of
41          notifications is enforced; depending on the subset of
42          drivers and devices you use, this may or may not work.
43
44          If unsure, say N.
45
46config VIRTIO_PCI
47	tristate "PCI driver for virtio devices"
48	depends on PCI
49	select VIRTIO_PCI_LIB
50	select VIRTIO
51	help
52	  This driver provides support for virtio based paravirtual device
53	  drivers over PCI.  This requires that your VMM has appropriate PCI
54	  virtio backends.  Most QEMU based VMMs should support these devices
55	  (like KVM or Xen).
56
57	  If unsure, say M.
58
59config VIRTIO_PCI_LEGACY
60	bool "Support for legacy virtio draft 0.9.X and older devices"
61	default y
62	depends on VIRTIO_PCI
63	select VIRTIO_PCI_LIB_LEGACY
64	help
65          Virtio PCI Card 0.9.X Draft (circa 2014) and older device support.
66
67	  This option enables building a transitional driver, supporting
68	  both devices conforming to Virtio 1 specification, and legacy devices.
69	  If disabled, you get a slightly smaller, non-transitional driver,
70	  with no legacy compatibility.
71
72          So look out into your driveway.  Do you have a flying car?  If
73          so, you can happily disable this option and virtio will not
74          break.  Otherwise, leave it set.  Unless you're testing what
75          life will be like in The Future.
76
77	  If unsure, say Y.
78
79config VIRTIO_VDPA
80	tristate "vDPA driver for virtio devices"
81	depends on VDPA
82	select VIRTIO
83	help
84	  This driver provides support for virtio based paravirtual
85	  device driver over vDPA bus. For this to be useful, you need
86	  an appropriate vDPA device implementation that operates on a
87	  physical device to allow the datapath of virtio to be
88	  offloaded to hardware.
89
90	  If unsure, say M.
91
92config VIRTIO_PMEM
93	tristate "Support for virtio pmem driver"
94	depends on VIRTIO
95	depends on LIBNVDIMM
96	help
97	  This driver provides access to virtio-pmem devices, storage devices
98	  that are mapped into the physical address space - similar to NVDIMMs
99	   - with a virtio-based flushing interface.
100
101	  If unsure, say Y.
102
103config VIRTIO_BALLOON
104	tristate "Virtio balloon driver"
105	depends on VIRTIO
106	select MEMORY_BALLOON
107	select PAGE_REPORTING
108	help
109	 This driver supports increasing and decreasing the amount
110	 of memory within a KVM guest.
111
112	 If unsure, say M.
113
114config VIRTIO_MEM
115	tristate "Virtio mem driver"
116	depends on X86_64 || ARM64
117	depends on VIRTIO
118	depends on MEMORY_HOTPLUG
119	depends on MEMORY_HOTREMOVE
120	depends on CONTIG_ALLOC
121	depends on EXCLUSIVE_SYSTEM_RAM
122	help
123	 This driver provides access to virtio-mem paravirtualized memory
124	 devices, allowing to hotplug and hotunplug memory.
125
126	 This driver currently only supports x86-64 and arm64. Although it
127	 should compile on other architectures that implement memory
128	 hot(un)plug, architecture-specific and/or common
129	 code changes may be required for virtio-mem, kdump and kexec to work as
130	 expected.
131
132	 If unsure, say M.
133
134config VIRTIO_INPUT
135	tristate "Virtio input driver"
136	depends on VIRTIO
137	depends on INPUT
138	help
139	 This driver supports virtio input devices such as
140	 keyboards, mice and tablets.
141
142	 If unsure, say M.
143
144config VIRTIO_MMIO
145	tristate "Platform bus driver for memory mapped virtio devices"
146	depends on HAS_IOMEM && HAS_DMA
147	select VIRTIO
148	help
149	 This drivers provides support for memory mapped virtio
150	 platform device driver.
151
152 	 If unsure, say N.
153
154config VIRTIO_MMIO_CMDLINE_DEVICES
155	bool "Memory mapped virtio devices parameter parsing"
156	depends on VIRTIO_MMIO
157	help
158	 Allow virtio-mmio devices instantiation via the kernel command line
159	 or module parameters. Be aware that using incorrect parameters (base
160	 address in particular) can crash your system - you have been warned.
161	 See Documentation/admin-guide/kernel-parameters.rst for details.
162
163	 If unsure, say 'N'.
164
165config VIRTIO_DMA_SHARED_BUFFER
166	tristate
167	depends on DMA_SHARED_BUFFER
168	help
169	 This option adds a flavor of dma buffers that are backed by
170	 virtio resources.
171
172endif # VIRTIO_MENU
173