VirtualBox

source: vbox/trunk/src/VBox/Devices/Bus/PciInline.h@ 72754

Last change on this file since 72754 was 69124, checked in by vboxsync, 7 years ago

Devices/Bus: (C) year + keywords

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
  • Property svn:mergeinfo set to (toggle deleted branches)
File size: 2.5 KB
Line 
1/* $Id: PciInline.h 69124 2017-10-17 19:17:23Z vboxsync $ */
2/** @file
3 * PCI - The PCI Controller And Devices, inline device helpers.
4 */
5
6/*
7 * Copyright (C) 2006-2017 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18#ifndef ___Bus_PciInline_h
19#define ___Bus_PciInline_h
20
21DECLINLINE(void) pciDevSetPci2PciBridge(PPDMPCIDEV pDev)
22{
23 pDev->Int.s.fFlags |= PCIDEV_FLAG_PCI_TO_PCI_BRIDGE;
24}
25
26DECLINLINE(bool) pciDevIsPci2PciBridge(PPDMPCIDEV pDev)
27{
28 return (pDev->Int.s.fFlags & PCIDEV_FLAG_PCI_TO_PCI_BRIDGE) != 0;
29}
30
31DECLINLINE(void) pciDevSetPciExpress(PPDMPCIDEV pDev)
32{
33 pDev->Int.s.fFlags |= PCIDEV_FLAG_PCI_EXPRESS_DEVICE;
34}
35
36DECLINLINE(bool) pciDevIsPciExpress(PPDMPCIDEV pDev)
37{
38 return (pDev->Int.s.fFlags & PCIDEV_FLAG_PCI_EXPRESS_DEVICE) != 0;
39}
40
41DECLINLINE(void) pciDevSetMsiCapable(PPDMPCIDEV pDev)
42{
43 pDev->Int.s.fFlags |= PCIDEV_FLAG_MSI_CAPABLE;
44}
45
46DECLINLINE(void) pciDevClearMsiCapable(PPDMPCIDEV pDev)
47{
48 pDev->Int.s.fFlags &= ~PCIDEV_FLAG_MSI_CAPABLE;
49}
50
51DECLINLINE(bool) pciDevIsMsiCapable(PPDMPCIDEV pDev)
52{
53 return (pDev->Int.s.fFlags & PCIDEV_FLAG_MSI_CAPABLE) != 0;
54}
55
56DECLINLINE(void) pciDevSetMsi64Capable(PPDMPCIDEV pDev)
57{
58 pDev->Int.s.fFlags |= PCIDEV_FLAG_MSI64_CAPABLE;
59}
60
61DECLINLINE(void) pciDevClearMsi64Capable(PPDMPCIDEV pDev)
62{
63 pDev->Int.s.fFlags &= ~PCIDEV_FLAG_MSI64_CAPABLE;
64}
65
66DECLINLINE(bool) pciDevIsMsi64Capable(PPDMPCIDEV pDev)
67{
68 return (pDev->Int.s.fFlags & PCIDEV_FLAG_MSI64_CAPABLE) != 0;
69}
70
71DECLINLINE(void) pciDevSetMsixCapable(PPDMPCIDEV pDev)
72{
73 pDev->Int.s.fFlags |= PCIDEV_FLAG_MSIX_CAPABLE;
74}
75
76DECLINLINE(void) pciDevClearMsixCapable(PPDMPCIDEV pDev)
77{
78 pDev->Int.s.fFlags &= ~PCIDEV_FLAG_MSIX_CAPABLE;
79}
80
81DECLINLINE(bool) pciDevIsMsixCapable(PPDMPCIDEV pDev)
82{
83 return (pDev->Int.s.fFlags & PCIDEV_FLAG_MSIX_CAPABLE) != 0;
84}
85
86DECLINLINE(void) pciDevSetPassthrough(PPDMPCIDEV pDev)
87{
88 pDev->Int.s.fFlags |= PCIDEV_FLAG_PASSTHROUGH;
89}
90
91DECLINLINE(void) pciDevClearPassthrough(PPDMPCIDEV pDev)
92{
93 pDev->Int.s.fFlags &= ~PCIDEV_FLAG_PASSTHROUGH;
94}
95
96DECLINLINE(bool) pciDevIsPassthrough(PPDMPCIDEV pDev)
97{
98 return (pDev->Int.s.fFlags & PCIDEV_FLAG_PASSTHROUGH) != 0;
99}
100
101#endif
102
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette