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

TOMOYO Linux Cross Reference
Linux/include/xen/interface/io/pciif.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: MIT */
  2 /*
  3  * PCI Backend/Frontend Common Data Structures & Macros
  4  *
  5  *   Author: Ryan Wilson <hap9@epoch.ncsc.mil>
  6  */
  7 #ifndef __XEN_PCI_COMMON_H__
  8 #define __XEN_PCI_COMMON_H__
  9 
 10 /* Be sure to bump this number if you change this file */
 11 #define XEN_PCI_MAGIC "7"
 12 
 13 /* xen_pci_sharedinfo flags */
 14 #define _XEN_PCIF_active                (0)
 15 #define XEN_PCIF_active                 (1<<_XEN_PCIF_active)
 16 #define _XEN_PCIB_AERHANDLER            (1)
 17 #define XEN_PCIB_AERHANDLER             (1<<_XEN_PCIB_AERHANDLER)
 18 #define _XEN_PCIB_active                (2)
 19 #define XEN_PCIB_active                 (1<<_XEN_PCIB_active)
 20 
 21 /* xen_pci_op commands */
 22 #define XEN_PCI_OP_conf_read            (0)
 23 #define XEN_PCI_OP_conf_write           (1)
 24 #define XEN_PCI_OP_enable_msi           (2)
 25 #define XEN_PCI_OP_disable_msi          (3)
 26 #define XEN_PCI_OP_enable_msix          (4)
 27 #define XEN_PCI_OP_disable_msix         (5)
 28 #define XEN_PCI_OP_aer_detected         (6)
 29 #define XEN_PCI_OP_aer_resume           (7)
 30 #define XEN_PCI_OP_aer_mmio             (8)
 31 #define XEN_PCI_OP_aer_slotreset        (9)
 32 
 33 /* xen_pci_op error numbers */
 34 #define XEN_PCI_ERR_success             (0)
 35 #define XEN_PCI_ERR_dev_not_found       (-1)
 36 #define XEN_PCI_ERR_invalid_offset      (-2)
 37 #define XEN_PCI_ERR_access_denied       (-3)
 38 #define XEN_PCI_ERR_not_implemented     (-4)
 39 /* XEN_PCI_ERR_op_failed - backend failed to complete the operation */
 40 #define XEN_PCI_ERR_op_failed           (-5)
 41 
 42 /*
 43  * it should be PAGE_SIZE-sizeof(struct xen_pci_op))/sizeof(struct msix_entry))
 44  * Should not exceed 128
 45  */
 46 #define SH_INFO_MAX_VEC                 128
 47 
 48 struct xen_msix_entry {
 49         uint16_t vector;
 50         uint16_t entry;
 51 };
 52 struct xen_pci_op {
 53         /* IN: what action to perform: XEN_PCI_OP_* */
 54         uint32_t cmd;
 55 
 56         /* OUT: will contain an error number (if any) from errno.h */
 57         int32_t err;
 58 
 59         /* IN: which device to touch */
 60         uint32_t domain; /* PCI Domain/Segment */
 61         uint32_t bus;
 62         uint32_t devfn;
 63 
 64         /* IN: which configuration registers to touch */
 65         int32_t offset;
 66         int32_t size;
 67 
 68         /* IN/OUT: Contains the result after a READ or the value to WRITE */
 69         uint32_t value;
 70         /* IN: Contains extra infor for this operation */
 71         uint32_t info;
 72         /*IN:  param for msi-x */
 73         struct xen_msix_entry msix_entries[SH_INFO_MAX_VEC];
 74 };
 75 
 76 /*used for pcie aer handling*/
 77 struct xen_pcie_aer_op {
 78         /* IN: what action to perform: XEN_PCI_OP_* */
 79         uint32_t cmd;
 80         /*IN/OUT: return aer_op result or carry error_detected state as input*/
 81         int32_t err;
 82 
 83         /* IN: which device to touch */
 84         uint32_t domain; /* PCI Domain/Segment*/
 85         uint32_t bus;
 86         uint32_t devfn;
 87 };
 88 struct xen_pci_sharedinfo {
 89         /* flags - XEN_PCIF_* */
 90         uint32_t flags;
 91         struct xen_pci_op op;
 92         struct xen_pcie_aer_op aer_op;
 93 };
 94 
 95 #endif /* __XEN_PCI_COMMON_H__ */
 96 

~ [ 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