~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/uapi/linux/virtio_pcidev.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
  2 /*
  3  * Copyright (C) 2021 Intel Corporation
  4  * Author: Johannes Berg <johannes@sipsolutions.net>
  5  */
  6 #ifndef _UAPI_LINUX_VIRTIO_PCIDEV_H
  7 #define _UAPI_LINUX_VIRTIO_PCIDEV_H
  8 #include <linux/types.h>
  9 
 10 /**
 11  * enum virtio_pcidev_ops - virtual PCI device operations
 12  * @VIRTIO_PCIDEV_OP_RESERVED: reserved to catch errors
 13  * @VIRTIO_PCIDEV_OP_CFG_READ: read config space, size is 1, 2, 4 or 8;
 14  *      the @data field should be filled in by the device (in little endian).
 15  * @VIRTIO_PCIDEV_OP_CFG_WRITE: write config space, size is 1, 2, 4 or 8;
 16  *      the @data field contains the data to write (in little endian).
 17  * @VIRTIO_PCIDEV_OP_MMIO_READ: read BAR mem/pio, size can be variable;
 18  *      the @data field should be filled in by the device (in little endian).
 19  * @VIRTIO_PCIDEV_OP_MMIO_WRITE: write BAR mem/pio, size can be variable;
 20  *      the @data field contains the data to write (in little endian).
 21  * @VIRTIO_PCIDEV_OP_MMIO_MEMSET: memset MMIO, size is variable but
 22  *      the @data field only has one byte (unlike @VIRTIO_PCIDEV_OP_MMIO_WRITE)
 23  * @VIRTIO_PCIDEV_OP_INT: legacy INTx# pin interrupt, the addr field is 1-4 for
 24  *      the number
 25  * @VIRTIO_PCIDEV_OP_MSI: MSI(-X) interrupt, this message basically transports
 26  *      the 16- or 32-bit write that would otherwise be done into memory,
 27  *      analogous to the write messages (@VIRTIO_PCIDEV_OP_MMIO_WRITE) above
 28  * @VIRTIO_PCIDEV_OP_PME: Dummy message whose content is ignored (and should be
 29  *      all zeroes) to signal the PME# pin.
 30  */
 31 enum virtio_pcidev_ops {
 32         VIRTIO_PCIDEV_OP_RESERVED = 0,
 33         VIRTIO_PCIDEV_OP_CFG_READ,
 34         VIRTIO_PCIDEV_OP_CFG_WRITE,
 35         VIRTIO_PCIDEV_OP_MMIO_READ,
 36         VIRTIO_PCIDEV_OP_MMIO_WRITE,
 37         VIRTIO_PCIDEV_OP_MMIO_MEMSET,
 38         VIRTIO_PCIDEV_OP_INT,
 39         VIRTIO_PCIDEV_OP_MSI,
 40         VIRTIO_PCIDEV_OP_PME,
 41 };
 42 
 43 /**
 44  * struct virtio_pcidev_msg - virtio PCI device operation
 45  * @op: the operation to do
 46  * @bar: the bar (only with BAR read/write messages)
 47  * @reserved: reserved
 48  * @size: the size of the read/write (in bytes)
 49  * @addr: the address to read/write
 50  * @data: the data, normally @size long, but just one byte for
 51  *      %VIRTIO_PCIDEV_OP_MMIO_MEMSET
 52  *
 53  * Note: the fields are all in native (CPU) endian, however, the
 54  * @data values will often be in little endian (see the ops above.)
 55  */
 56 struct virtio_pcidev_msg {
 57         __u8 op;
 58         __u8 bar;
 59         __u16 reserved;
 60         __u32 size;
 61         __u64 addr;
 62         __u8 data[];
 63 };
 64 
 65 #endif /* _UAPI_LINUX_VIRTIO_PCIDEV_H */
 66 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php