|
@@ -5,6 +5,9 @@
|
|
#include "hw/pci/pci.h"
|
|
#include "hw/pci/pci.h"
|
|
#include "xen-host-pci-device.h"
|
|
#include "xen-host-pci-device.h"
|
|
|
|
|
|
|
|
+bool xen_igd_gfx_pt_enabled(void);
|
|
|
|
+void xen_igd_gfx_pt_set(bool value, Error **errp);
|
|
|
|
+
|
|
void xen_pt_log(const PCIDevice *d, const char *f, ...) GCC_FMT_ATTR(2, 3);
|
|
void xen_pt_log(const PCIDevice *d, const char *f, ...) GCC_FMT_ATTR(2, 3);
|
|
|
|
|
|
#define XEN_PT_ERR(d, _f, _a...) xen_pt_log(d, "%s: Error: "_f, __func__, ##_a)
|
|
#define XEN_PT_ERR(d, _f, _a...) xen_pt_log(d, "%s: Error: "_f, __func__, ##_a)
|
|
@@ -322,10 +325,9 @@ extern void *pci_assign_dev_load_option_rom(PCIDevice *dev,
|
|
unsigned int domain,
|
|
unsigned int domain,
|
|
unsigned int bus, unsigned int slot,
|
|
unsigned int bus, unsigned int slot,
|
|
unsigned int function);
|
|
unsigned int function);
|
|
-extern bool has_igd_gfx_passthru;
|
|
|
|
static inline bool is_igd_vga_passthrough(XenHostPCIDevice *dev)
|
|
static inline bool is_igd_vga_passthrough(XenHostPCIDevice *dev)
|
|
{
|
|
{
|
|
- return (has_igd_gfx_passthru
|
|
|
|
|
|
+ return (xen_igd_gfx_pt_enabled()
|
|
&& ((dev->class_code >> 0x8) == PCI_CLASS_DISPLAY_VGA));
|
|
&& ((dev->class_code >> 0x8) == PCI_CLASS_DISPLAY_VGA));
|
|
}
|
|
}
|
|
int xen_pt_register_vga_regions(XenHostPCIDevice *dev);
|
|
int xen_pt_register_vga_regions(XenHostPCIDevice *dev);
|