]> rtime.felk.cvut.cz Git - jailhouse.git/blob - driver/pci.h
x86: Add missing include to amd_iommu.h
[jailhouse.git] / driver / pci.h
1 /*
2  * Jailhouse, a Linux-based partitioning hypervisor
3  *
4  * Copyright (c) Siemens AG, 2014-2015
5  *
6  * Authors:
7  *  Jan Kiszka <jan.kiszka@siemens.com>
8  *  Henning Schild <henning.schild@siemens.com>
9  *
10  * This work is licensed under the terms of the GNU GPL, version 2.  See
11  * the COPYING file in the top-level directory.
12  */
13
14 #include "cell.h"
15
16 enum {
17         JAILHOUSE_PCI_ACTION_ADD, JAILHOUSE_PCI_ACTION_DEL,
18         JAILHOUSE_PCI_ACTION_CLAIM, JAILHOUSE_PCI_ACTION_RELEASE,
19 };
20
21 #ifdef CONFIG_PCI
22
23 void jailhouse_pci_do_all_devices(struct cell *cell, unsigned int type,
24                                   unsigned int action);
25 int jailhouse_pci_cell_setup(struct cell *cell,
26                              const struct jailhouse_cell_desc *cell_desc);
27 void jailhouse_pci_cell_cleanup(struct cell *cell);
28 int jailhouse_pci_register(void);
29 void jailhouse_pci_unregister(void);
30
31 #else /* !CONFIG_PCI */
32
33 static inline void
34 jailhouse_pci_do_all_devices(struct cell *cell, unsigned int type,
35                              unsigned int action)
36 {
37 }
38
39 static inline int
40 jailhouse_pci_cell_setup(struct cell *cell,
41                          const struct jailhouse_cell_desc *cell_desc)
42 {
43         return 0;
44 }
45
46 static inline void jailhouse_pci_cell_cleanup(struct cell *cell)
47 {
48 }
49
50 static inline int jailhouse_pci_register(void)
51 {
52         return 0;
53 }
54
55 static inline void jailhouse_pci_unregister(void)
56 {
57 }
58
59 #endif /* !CONFIG_PCI */