2 * Copyright (c) 2007, Neocleus Corporation.
3 * Copyright (c) 2007, Intel Corporation.
5 * SPDX-License-Identifier: GPL-2.0-only
7 * Alex Novik <alex@neocleus.com>
8 * Allen Kay <allen.m.kay@intel.com>
9 * Guy Zana <guy@neocleus.com>
14 #include "hw/xen/xen-host-pci-device.h"
16 typedef struct XenPCIPassthroughState XenPCIPassthroughState
;
18 bool xen_igd_gfx_pt_enabled(void);
19 void xen_igd_gfx_pt_set(bool value
, Error
**errp
);
21 uint32_t igd_read_opregion(XenPCIPassthroughState
*s
);
22 void xen_igd_reserve_slot(PCIBus
*pci_bus
);
23 void igd_write_opregion(XenPCIPassthroughState
*s
, uint32_t val
);
24 void xen_igd_passthrough_isa_bridge_create(XenPCIPassthroughState
*s
,
25 XenHostPCIDevice
*dev
);
27 static inline bool is_igd_vga_passthrough(XenHostPCIDevice
*dev
)
29 return (xen_igd_gfx_pt_enabled()
30 && ((dev
->class_code
>> 0x8) == PCI_CLASS_DISPLAY_VGA
));