2 * PCI Backend/Frontend Common Data Structures & Macros
4 * Author: Ryan Wilson <hap9@epoch.ncsc.mil>
6 #ifndef __XEN_PCI_COMMON_H__
7 #define __XEN_PCI_COMMON_H__
9 /* Be sure to bump this number if you change this file */
10 #define XEN_PCI_MAGIC "7"
12 /* xen_pci_sharedinfo flags */
13 #define _XEN_PCIF_active (0)
14 #define XEN_PCIF_active (1<<_XEN_PCI_active)
16 /* xen_pci_op commands */
17 #define XEN_PCI_OP_conf_read (0)
18 #define XEN_PCI_OP_conf_write (1)
20 /* xen_pci_op error numbers */
21 #define XEN_PCI_ERR_success (0)
22 #define XEN_PCI_ERR_dev_not_found (-1)
23 #define XEN_PCI_ERR_invalid_offset (-2)
24 #define XEN_PCI_ERR_access_denied (-3)
25 #define XEN_PCI_ERR_not_implemented (-4)
26 /* XEN_PCI_ERR_op_failed - backend failed to complete the operation */
27 #define XEN_PCI_ERR_op_failed (-5)
30 /* IN: what action to perform: XEN_PCI_OP_* */
33 /* OUT: will contain an error number (if any) from errno.h */
36 /* IN: which device to touch */
37 uint32_t domain; /* PCI Domain/Segment */
41 /* IN: which configuration registers to touch */
45 /* IN/OUT: Contains the result after a READ or the value to WRITE */
49 struct xen_pci_sharedinfo {
50 /* flags - XEN_PCIF_* */
55 #endif /* __XEN_PCI_COMMON_H__ */