162306a36Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0-only
262306a36Sopenharmony_ciconfig VIRTIO_ANCHOR
362306a36Sopenharmony_ci	bool
462306a36Sopenharmony_ci
562306a36Sopenharmony_ciconfig VIRTIO
662306a36Sopenharmony_ci	tristate
762306a36Sopenharmony_ci	select VIRTIO_ANCHOR
862306a36Sopenharmony_ci	help
962306a36Sopenharmony_ci	  This option is selected by any driver which implements the virtio
1062306a36Sopenharmony_ci	  bus, such as CONFIG_VIRTIO_PCI, CONFIG_VIRTIO_MMIO, CONFIG_RPMSG
1162306a36Sopenharmony_ci	  or CONFIG_S390_GUEST.
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_ciconfig VIRTIO_PCI_LIB
1462306a36Sopenharmony_ci	tristate
1562306a36Sopenharmony_ci	help
1662306a36Sopenharmony_ci	  Modern PCI device implementation. This module implements the
1762306a36Sopenharmony_ci	  basic probe and control for devices which are based on modern
1862306a36Sopenharmony_ci	  PCI device with possible vendor specific extensions. Any
1962306a36Sopenharmony_ci	  module that selects this module must depend on PCI.
2062306a36Sopenharmony_ci
2162306a36Sopenharmony_ciconfig VIRTIO_PCI_LIB_LEGACY
2262306a36Sopenharmony_ci	tristate
2362306a36Sopenharmony_ci	help
2462306a36Sopenharmony_ci	  Legacy PCI device (Virtio PCI Card 0.9.x Draft and older device)
2562306a36Sopenharmony_ci	  implementation.
2662306a36Sopenharmony_ci	  This module implements the basic probe and control for devices
2762306a36Sopenharmony_ci	  which are based on legacy PCI device. Any module that selects this
2862306a36Sopenharmony_ci	  module must depend on PCI.
2962306a36Sopenharmony_ci
3062306a36Sopenharmony_cimenuconfig VIRTIO_MENU
3162306a36Sopenharmony_ci	bool "Virtio drivers"
3262306a36Sopenharmony_ci	default y
3362306a36Sopenharmony_ci
3462306a36Sopenharmony_ciif VIRTIO_MENU
3562306a36Sopenharmony_ci
3662306a36Sopenharmony_ciconfig VIRTIO_HARDEN_NOTIFICATION
3762306a36Sopenharmony_ci        bool "Harden virtio notification"
3862306a36Sopenharmony_ci        depends on BROKEN
3962306a36Sopenharmony_ci        help
4062306a36Sopenharmony_ci          Enable this to harden the device notifications and suppress
4162306a36Sopenharmony_ci          those that happen at a time where notifications are illegal.
4262306a36Sopenharmony_ci
4362306a36Sopenharmony_ci          Experimental: Note that several drivers still have issues that
4462306a36Sopenharmony_ci          may cause crashes or hangs when correct handling of
4562306a36Sopenharmony_ci          notifications is enforced; depending on the subset of
4662306a36Sopenharmony_ci          drivers and devices you use, this may or may not work.
4762306a36Sopenharmony_ci
4862306a36Sopenharmony_ci          If unsure, say N.
4962306a36Sopenharmony_ci
5062306a36Sopenharmony_ciconfig VIRTIO_PCI
5162306a36Sopenharmony_ci	tristate "PCI driver for virtio devices"
5262306a36Sopenharmony_ci	depends on PCI
5362306a36Sopenharmony_ci	select VIRTIO_PCI_LIB
5462306a36Sopenharmony_ci	select VIRTIO
5562306a36Sopenharmony_ci	help
5662306a36Sopenharmony_ci	  This driver provides support for virtio based paravirtual device
5762306a36Sopenharmony_ci	  drivers over PCI.  This requires that your VMM has appropriate PCI
5862306a36Sopenharmony_ci	  virtio backends.  Most QEMU based VMMs should support these devices
5962306a36Sopenharmony_ci	  (like KVM or Xen).
6062306a36Sopenharmony_ci
6162306a36Sopenharmony_ci	  If unsure, say M.
6262306a36Sopenharmony_ci
6362306a36Sopenharmony_ciconfig VIRTIO_PCI_LEGACY
6462306a36Sopenharmony_ci	bool "Support for legacy virtio draft 0.9.X and older devices"
6562306a36Sopenharmony_ci	default y
6662306a36Sopenharmony_ci	depends on VIRTIO_PCI
6762306a36Sopenharmony_ci	select VIRTIO_PCI_LIB_LEGACY
6862306a36Sopenharmony_ci	help
6962306a36Sopenharmony_ci          Virtio PCI Card 0.9.X Draft (circa 2014) and older device support.
7062306a36Sopenharmony_ci
7162306a36Sopenharmony_ci	  This option enables building a transitional driver, supporting
7262306a36Sopenharmony_ci	  both devices conforming to Virtio 1 specification, and legacy devices.
7362306a36Sopenharmony_ci	  If disabled, you get a slightly smaller, non-transitional driver,
7462306a36Sopenharmony_ci	  with no legacy compatibility.
7562306a36Sopenharmony_ci
7662306a36Sopenharmony_ci          So look out into your driveway.  Do you have a flying car?  If
7762306a36Sopenharmony_ci          so, you can happily disable this option and virtio will not
7862306a36Sopenharmony_ci          break.  Otherwise, leave it set.  Unless you're testing what
7962306a36Sopenharmony_ci          life will be like in The Future.
8062306a36Sopenharmony_ci
8162306a36Sopenharmony_ci	  If unsure, say Y.
8262306a36Sopenharmony_ci
8362306a36Sopenharmony_ciconfig VIRTIO_VDPA
8462306a36Sopenharmony_ci	tristate "vDPA driver for virtio devices"
8562306a36Sopenharmony_ci	depends on VDPA
8662306a36Sopenharmony_ci	select VIRTIO
8762306a36Sopenharmony_ci	help
8862306a36Sopenharmony_ci	  This driver provides support for virtio based paravirtual
8962306a36Sopenharmony_ci	  device driver over vDPA bus. For this to be useful, you need
9062306a36Sopenharmony_ci	  an appropriate vDPA device implementation that operates on a
9162306a36Sopenharmony_ci	  physical device to allow the datapath of virtio to be
9262306a36Sopenharmony_ci	  offloaded to hardware.
9362306a36Sopenharmony_ci
9462306a36Sopenharmony_ci	  If unsure, say M.
9562306a36Sopenharmony_ci
9662306a36Sopenharmony_ciconfig VIRTIO_PMEM
9762306a36Sopenharmony_ci	tristate "Support for virtio pmem driver"
9862306a36Sopenharmony_ci	depends on VIRTIO
9962306a36Sopenharmony_ci	depends on LIBNVDIMM
10062306a36Sopenharmony_ci	help
10162306a36Sopenharmony_ci	  This driver provides access to virtio-pmem devices, storage devices
10262306a36Sopenharmony_ci	  that are mapped into the physical address space - similar to NVDIMMs
10362306a36Sopenharmony_ci	   - with a virtio-based flushing interface.
10462306a36Sopenharmony_ci
10562306a36Sopenharmony_ci	  If unsure, say Y.
10662306a36Sopenharmony_ci
10762306a36Sopenharmony_ciconfig VIRTIO_BALLOON
10862306a36Sopenharmony_ci	tristate "Virtio balloon driver"
10962306a36Sopenharmony_ci	depends on VIRTIO
11062306a36Sopenharmony_ci	select MEMORY_BALLOON
11162306a36Sopenharmony_ci	select PAGE_REPORTING
11262306a36Sopenharmony_ci	help
11362306a36Sopenharmony_ci	 This driver supports increasing and decreasing the amount
11462306a36Sopenharmony_ci	 of memory within a KVM guest.
11562306a36Sopenharmony_ci
11662306a36Sopenharmony_ci	 If unsure, say M.
11762306a36Sopenharmony_ci
11862306a36Sopenharmony_ciconfig VIRTIO_MEM
11962306a36Sopenharmony_ci	tristate "Virtio mem driver"
12062306a36Sopenharmony_ci	depends on X86_64 || ARM64
12162306a36Sopenharmony_ci	depends on VIRTIO
12262306a36Sopenharmony_ci	depends on MEMORY_HOTPLUG
12362306a36Sopenharmony_ci	depends on MEMORY_HOTREMOVE
12462306a36Sopenharmony_ci	depends on CONTIG_ALLOC
12562306a36Sopenharmony_ci	depends on EXCLUSIVE_SYSTEM_RAM
12662306a36Sopenharmony_ci	help
12762306a36Sopenharmony_ci	 This driver provides access to virtio-mem paravirtualized memory
12862306a36Sopenharmony_ci	 devices, allowing to hotplug and hotunplug memory.
12962306a36Sopenharmony_ci
13062306a36Sopenharmony_ci	 This driver currently only supports x86-64 and arm64. Although it
13162306a36Sopenharmony_ci	 should compile on other architectures that implement memory
13262306a36Sopenharmony_ci	 hot(un)plug, architecture-specific and/or common
13362306a36Sopenharmony_ci	 code changes may be required for virtio-mem, kdump and kexec to work as
13462306a36Sopenharmony_ci	 expected.
13562306a36Sopenharmony_ci
13662306a36Sopenharmony_ci	 If unsure, say M.
13762306a36Sopenharmony_ci
13862306a36Sopenharmony_ciconfig VIRTIO_INPUT
13962306a36Sopenharmony_ci	tristate "Virtio input driver"
14062306a36Sopenharmony_ci	depends on VIRTIO
14162306a36Sopenharmony_ci	depends on INPUT
14262306a36Sopenharmony_ci	help
14362306a36Sopenharmony_ci	 This driver supports virtio input devices such as
14462306a36Sopenharmony_ci	 keyboards, mice and tablets.
14562306a36Sopenharmony_ci
14662306a36Sopenharmony_ci	 If unsure, say M.
14762306a36Sopenharmony_ci
14862306a36Sopenharmony_ciconfig VIRTIO_MMIO
14962306a36Sopenharmony_ci	tristate "Platform bus driver for memory mapped virtio devices"
15062306a36Sopenharmony_ci	depends on HAS_IOMEM && HAS_DMA
15162306a36Sopenharmony_ci	select VIRTIO
15262306a36Sopenharmony_ci	help
15362306a36Sopenharmony_ci	 This drivers provides support for memory mapped virtio
15462306a36Sopenharmony_ci	 platform device driver.
15562306a36Sopenharmony_ci
15662306a36Sopenharmony_ci 	 If unsure, say N.
15762306a36Sopenharmony_ci
15862306a36Sopenharmony_ciconfig VIRTIO_MMIO_CMDLINE_DEVICES
15962306a36Sopenharmony_ci	bool "Memory mapped virtio devices parameter parsing"
16062306a36Sopenharmony_ci	depends on VIRTIO_MMIO
16162306a36Sopenharmony_ci	help
16262306a36Sopenharmony_ci	 Allow virtio-mmio devices instantiation via the kernel command line
16362306a36Sopenharmony_ci	 or module parameters. Be aware that using incorrect parameters (base
16462306a36Sopenharmony_ci	 address in particular) can crash your system - you have been warned.
16562306a36Sopenharmony_ci	 See Documentation/admin-guide/kernel-parameters.rst for details.
16662306a36Sopenharmony_ci
16762306a36Sopenharmony_ci	 If unsure, say 'N'.
16862306a36Sopenharmony_ci
16962306a36Sopenharmony_ciconfig VIRTIO_DMA_SHARED_BUFFER
17062306a36Sopenharmony_ci	tristate
17162306a36Sopenharmony_ci	depends on DMA_SHARED_BUFFER
17262306a36Sopenharmony_ci	help
17362306a36Sopenharmony_ci	 This option adds a flavor of dma buffers that are backed by
17462306a36Sopenharmony_ci	 virtio resources.
17562306a36Sopenharmony_ci
17662306a36Sopenharmony_ciendif # VIRTIO_MENU
177