/linux/drivers/virtio/ |
H A D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0-only 5 config VIRTIO config 9 This option is selected by any driver which implements the virtio 16 Modern PCI device implementation. This module implements the 18 PCI device with possible vendor specific extensions. Any 24 Legacy PCI device (Virtio PCI Card 0.9.x Draft and older device) 27 which are based on legacy PCI device. Any module that selects this 31 bool "Virtio drivers" 37 bool "Harden virtio notification" 40 Enable this to harden the device notifications and suppress [all …]
|
H A D | virtio_pci_legacy_dev.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 10 * vp_legacy_probe: probe the legacy virtio pci device, note that the 11 * caller is required to enable PCI device before calling this function. 12 * @ldev: the legacy virtio-pci device 18 struct pci_dev *pci_dev = ldev->pci_dev; in vp_legacy_probe() 22 if (pci_dev->device < 0x1000 || pci_dev->device > 0x103f) in vp_legacy_probe() 23 return -ENODEV; in vp_legacy_probe() 25 if (pci_dev->revision != VIRTIO_PCI_ABI_VERSION) in vp_legacy_probe() 26 return -ENODEV; in vp_legacy_probe() 28 rc = dma_set_mask(&pci_dev->dev, DMA_BIT_MASK(64)); in vp_legacy_probe() [all …]
|
H A D | virtio_pci_modern_dev.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 9 * vp_modern_map_capability - map a part of virtio pci capability 10 * @mdev: the modern virtio-pci device 26 struct pci_dev *dev = mdev->pci_dev; in vp_modern_map_capability() 40 if (bar >= PCI_STD_NUM_BARS || !(mdev->modern_bars & (1 << bar))) { in vp_modern_map_capability() 41 dev_err(&dev->dev, in vp_modern_map_capability() 47 dev_err(&dev->dev, in vp_modern_map_capability() 53 if (length - start < minlen) { in vp_modern_map_capability() 54 dev_err(&dev->dev, in vp_modern_map_capability() 60 length -= start; in vp_modern_map_capability() [all …]
|
H A D | virtio.c | 1 // SPDX-License-Identifier: GPL-2.0-only 2 #include <linux/virtio.h> 11 /* Unique numbering for virtio devices. */ 14 static ssize_t device_show(struct device *_d, in device_show() 18 return sysfs_emit(buf, "0x%04x\n", dev->id.device); in device_show() 20 static DEVICE_ATTR_RO(device); 22 static ssize_t vendor_show(struct device *_d, in vendor_show() 26 return sysfs_emit(buf, "0x%04x\n", dev->id.vendor); in vendor_show() 30 static ssize_t status_show(struct device *_d, in status_show() 34 return sysfs_emit(buf, "0x%08x\n", dev->config->get_status(dev)); in status_show() [all …]
|
/linux/Documentation/driver-api/virtio/ |
H A D | virtio.rst | 1 .. SPDX-License-Identifier: GPL-2.0 6 Virtio on Linux 12 Virtio is an open standard that defines a protocol for communication 13 between drivers and devices of different types, see Chapter 5 ("Device 14 Types") of the virtio spec (`[1]`_). Originally developed as a standard 16 to interface any compliant device (real or emulated) with a driver. 20 devices provided by the hypervisor, which exposes them as virtio devices 24 Device - Driver communication: virtqueues 27 Although the virtio devices are really an abstraction layer in the 29 using a specific transport method -- PCI, MMIO or CCW -- that is [all …]
|
H A D | writing_virtio_drivers.rst | 1 .. SPDX-License-Identifier: GPL-2.0 6 Writing Virtio Drivers 13 need to hack a new virtio driver or understand the essentials of the 14 existing ones. See :ref:`Virtio on Linux <virtio>` for a general 15 overview of virtio. 21 As a bare minimum, a virtio driver needs to register in the virtio bus 22 and configure the virtqueues for the device according to its spec, the 24 virtqueue definitions in the device. A basic driver skeleton could look 27 #include <linux/virtio.h> 32 /* device private data (one per device) */ [all …]
|
/linux/drivers/crypto/virtio/ |
H A D | virtio_crypto_mgr.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 2 /* Management for virtio crypto devices (refer to adf_dev_mgr.c) 24 * virtcrypto_devmgr_add_dev() - Add vcrypto_dev to the acceleration 26 * @vcrypto_dev: Pointer to virtio crypto device. 28 * Function adds virtio crypto device to the global list. 29 * To be used by virtio crypto device specific drivers. 42 return -EFAULT; in virtcrypto_devmgr_add_dev() 51 return -EEXIST; in virtcrypto_devmgr_add_dev() 54 atomic_set(&vcrypto_dev->ref_count, 0); in virtcrypto_devmgr_add_dev() 55 list_add_tail(&vcrypto_dev->list, &virtio_crypto_table); in virtcrypto_devmgr_add_dev() [all …]
|
/linux/tools/virtio/virtio-trace/ |
H A D | README | 1 Trace Agent for virtio-trace 6 - splice a page of ring-buffer to read_pipe without memory copying 7 - splice the page from write_pipe to virtio-console without memory copying 8 - write trace data to stdout by using -o option 9 - controlled by start/stop orders from a Host 18 5) The read/write threads start to read trace data from ring-buffers and 19 write the data to virtio-serial. 28 Makefile: Makefile of trace agent for virtio-trace 29 trace-agent.c: includes main function, sets up for operating trace agent 30 trace-agent.h: includes all structures and some macros [all …]
|
/linux/Documentation/devicetree/bindings/virtio/ |
H A D | virtio-device.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/virtio/virtio-device.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Virtio device 10 - Viresh Kumar <viresh.kumar@linaro.org> 13 These bindings are applicable to virtio devices irrespective of the bus they 16 # We need a select here so we don't match all nodes with 'virtio,mmio' 19 pattern: "^virtio,device[0-9a-f]{1,8}$" 20 description: Virtio device nodes. [all …]
|
H A D | mmio.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/virtio/mmio.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: virtio memory mapped devices 10 - Jean-Philippe Brucker <jean-philippe@linaro.org> 13 See https://www.oasis-open.org/committees/tc_home.php?wg_abbrev=virtio for 18 const: virtio,mmio 23 dma-coherent: true 28 '#iommu-cells': [all …]
|
H A D | pci-iommu.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/virtio/pci-iommu.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: virtio-iommu device using the virtio-pci transport 10 - Jean-Philippe Brucker <jean-philippe@linaro.org> 13 When virtio-iommu uses the PCI transport, its programming interface is 15 device tree statically describes the relation between IOMMU and DMA 16 masters. Therefore, the PCI root complex that hosts the virtio-iommu 17 contains a child node representing the IOMMU device explicitly. [all …]
|
/linux/sound/virtio/ |
H A D | virtio_card.h | 1 /* SPDX-License-Identifier: GPL-2.0+ */ 3 * virtio-snd: Virtio sound device 10 #include <linux/virtio.h> 17 #define VIRTIO_SND_CARD_DRIVER "virtio-snd" 18 #define VIRTIO_SND_CARD_NAME "VirtIO SoundCard" 19 #define VIRTIO_SND_PCM_NAME "VirtIO PCM" 25 * struct virtio_snd_queue - Virtqueue wrapper structure. 35 * struct virtio_kctl - VirtIO control element. 45 * struct virtio_snd - VirtIO sound card device. 46 * @vdev: Underlying virtio device. [all …]
|
H A D | virtio_pcm.h | 1 /* SPDX-License-Identifier: GPL-2.0+ */ 3 * virtio-snd: Virtio sound device 12 #include <sound/pcm-indirect.h> 18 * struct virtio_pcm_substream - VirtIO PCM substream. 19 * @snd: VirtIO sound device. 23 * @features: Stream VirtIO feature bit map (1 << VIRTIO_SND_PCM_F_XXX). 32 * @xfer_enabled: Data transfer state (0 - off, 1 - on). 33 * @xfer_xrun: Data underflow/overflow state (0 - no xrun, 1 - xrun). 34 * @stopped: True if the substream is stopped and must be released on the device 37 * the device side at resume. [all …]
|
H A D | virtio_card.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * virtio-snd: Virtio sound device 21 * virtsnd_event_send() - Add an event to the event queue. 24 * @notify: Indicates whether or not to send a notification to the device. 49 * virtsnd_event_dispatch() - Dispatch an event from the device side. 50 * @snd: VirtIO sound device. 51 * @event: VirtIO sound event. 58 switch (le32_to_cpu(event->hdr.code)) { in virtsnd_event_dispatch() 74 * virtsnd_event_notify_cb() - Dispatch all reported events from the event queue. 78 * device. [all …]
|
H A D | virtio_jack.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * virtio-snd: Virtio sound device 16 * receive notifications about a plugged in/out device. 23 * struct virtio_jack - VirtIO jack. 26 * @features: Jack virtio feature bit map (1 << VIRTIO_SND_JACK_F_XXX). 43 * virtsnd_jack_get_label() - Get the name string for the jack. 44 * @vjack: VirtIO jack. 54 unsigned int defconf = vjack->defconf; in virtsnd_jack_get_label() 55 unsigned int device = in virtsnd_jack_get_label() local 60 switch (device) { in virtsnd_jack_get_label() [all …]
|
H A D | virtio_pcm.c | 1 // SPDX-License-Identifier: GPL-2.0+ 3 * virtio-snd: Virtio sound device 31 /* Map for converting VirtIO format to ALSA format. */ 61 /* Map for converting VirtIO frame rate to ALSA frame rate. */ 84 * virtsnd_pcm_build_hw() - Parse substream config and build HW descriptor. 85 * @vss: VirtIO substream. 86 * @info: VirtIO substream information entry. 89 * Return: 0 on success, -EINVAL if configuration is invalid. 94 struct virtio_device *vdev = vss->snd->vdev; in virtsnd_pcm_build_hw() 100 vss->features = le32_to_cpu(info->features); in virtsnd_pcm_build_hw() [all …]
|
/linux/include/uapi/linux/ |
H A D | virtio_ids.h | 4 * Virtio IDs 32 #define VIRTIO_ID_NET 1 /* virtio net */ 33 #define VIRTIO_ID_BLOCK 2 /* virtio block */ 34 #define VIRTIO_ID_CONSOLE 3 /* virtio console */ 35 #define VIRTIO_ID_RNG 4 /* virtio rng */ 36 #define VIRTIO_ID_BALLOON 5 /* virtio balloon */ 37 #define VIRTIO_ID_IOMEM 6 /* virtio ioMemory */ 38 #define VIRTIO_ID_RPMSG 7 /* virtio remote processor messaging */ 39 #define VIRTIO_ID_SCSI 8 /* virtio scsi */ 40 #define VIRTIO_ID_9P 9 /* 9p virtio console */ [all …]
|
H A D | virtio_mem.h | 1 /* SPDX-License-Identifier: BSD-3-Clause */ 3 * Virtio Mem Device 47 * Each virtio-mem device manages a dedicated region in physical address 48 * space. Each device ca [all...] |
/linux/Documentation/devicetree/bindings/i2c/ |
H A D | i2c-virtio.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/i2c/i2c-virtio.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Virtio I2C Adapter 10 - Viresh Kumar <viresh.kumar@linaro.org> 13 - $ref: /schemas/i2c/i2c-controller.yaml# 14 - $ref: /schemas/virtio/virtio-device.yaml# 17 Virtio I2C device, see /schemas/virtio/virtio-device.yaml for more details. 24 const: virtio,device22 [all …]
|
/linux/Documentation/staging/ |
H A D | remoteproc.rst | 10 of operating system, whether it's Linux or any other flavor of real-time OS. 12 OMAP4, for example, has dual Cortex-A9, dual Cortex-M3 and a C64x+ DSP. 13 In a typical configuration, the dual cortex-A9 is running Linux in a SMP 20 duplicated. In addition, this framework also adds rpmsg virtio devices 22 platform-specific remoteproc drivers only need to provide a few low-level 24 (for more information about the virtio-based rpmsg bus and its drivers, 26 Registration of other types of virtio devices is now also possible. Firmwares 27 just need to publish what kind of virtio devices do they support, and then 29 existing virtio drivers with remote processor backends at a minimal development 57 without really powering off the device. [all …]
|
/linux/Documentation/networking/ |
H A D | net_failover.rst | 1 .. SPDX-License-Identifier: GPL-2.0 15 The failover netdev acts a master device and controls 2 slave devices. The 17 a passthru/vf device with the same MAC gets registered as 'primary' slave 19 'pci' device. The user accesses the network interface via 'failover' netdev. 28 virtio-net accelerated datapath: STANDBY mode 31 net_failover enables hypervisor controlled accelerated datapath to virtio-net 35 feature on the virtio-net interface and assign the same MAC address to both 36 virtio-net and VF interfaces. 45 <model type='virtio'/> 49 <alias name='ua-backup0'/> [all …]
|
/linux/drivers/vdpa/ |
H A D | Kconfig | 1 # SPDX-License-Identifier: GPL-2.0-only 6 Enable this module to support vDPA device that uses a 7 datapath which complies with virtio specifications with 13 tristate "vDPA device simulator core" 18 Enable this module to support vDPA device simulators. These devices 22 tristate "vDPA simulator for networking device" 26 vDPA networking device simulator which loops TX traffic back to RX. 29 tristate "vDPA simulator for block device" 32 vDPA block device simulator which terminates IO request in a 36 tristate "VDUSE (vDPA Device in Userspace) support" [all …]
|
/linux/Documentation/devicetree/bindings/gpio/ |
H A D | gpio-virtio.yaml | 1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 3 --- 4 $id: http://devicetree.org/schemas/gpio/gpio-virtio.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: Virtio GPIO controller 10 - Viresh Kumar <viresh.kumar@linaro.org> 13 - $ref: /schemas/virtio/virtio-device.yaml# 16 Virtio GPIO controller, see /schemas/virtio/virtio-device.yaml for more 24 const: virtio,device29 26 gpio-controller: true [all …]
|
/linux/Documentation/filesystems/ |
H A D | virtiofs.rst | 1 .. SPDX-License-Identifier: GPL-2.0 6 virtiofs: virtio-fs host<->guest shared file system 9 - Copyright (C) 2019 Red Hat, Inc. 14 VIRTIO "virtio-fs" device for guest<->host file system sharing. It allows a 24 expose the storage network to the guest. The virtio-fs device was designed to 27 Furthermore the virtio-fs device takes advantage of the co-location of the 35 .. code-block:: sh 37 guest# mount -t virtiofs myfs /mnt 39 Please see https://virtio-fs.gitlab.io/ for details on how to configure QEMU 43 ------------- [all …]
|
/linux/Documentation/userspace-api/ |
H A D | vduse.rst | 2 VDUSE - "vDPA Device in Userspace" 5 vDPA (virtio data path acceleration) device is a device that uses a 6 datapath which complies with the virtio specifications with vendor 9 possible to implement software-emulated vDPA devices in userspace. And 10 to make the device emulation more secure, the emulated vDPA device's 14 Note that only virtio block device is supported by VDUSE framework now, 16 the data path is run by an unprivileged user. The support for other device 17 types can be added after the security issue of corresponding device driver 21 ---------------------------- 49 .. code-block:: c [all …]
|