mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
hw/xen: Extract 'xen_igd.h' from 'xen_pt.h'
"hw/xen/xen_pt.h" requires "hw/xen/xen_native.h" which is target specific. It also declares IGD methods, which are not target specific. Target-agnostic code can use IGD methods. To allow that, extract these methos into a new "hw/xen/xen_igd.h" header. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: David Woodhouse <dwmw@amazon.co.uk> Message-Id: <20231114143816.71079-18-philmd@linaro.org>
This commit is contained in:
parent
92dfc8a257
commit
f28b958cbf
8 changed files with 42 additions and 18 deletions
33
include/hw/xen/xen_igd.h
Normal file
33
include/hw/xen/xen_igd.h
Normal file
|
@ -0,0 +1,33 @@
|
|||
/*
|
||||
* Copyright (c) 2007, Neocleus Corporation.
|
||||
* Copyright (c) 2007, Intel Corporation.
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0-only
|
||||
*
|
||||
* Alex Novik <alex@neocleus.com>
|
||||
* Allen Kay <allen.m.kay@intel.com>
|
||||
* Guy Zana <guy@neocleus.com>
|
||||
*/
|
||||
#ifndef XEN_IGD_H
|
||||
#define XEN_IGD_H
|
||||
|
||||
#include "hw/xen/xen-host-pci-device.h"
|
||||
|
||||
typedef struct XenPCIPassthroughState XenPCIPassthroughState;
|
||||
|
||||
bool xen_igd_gfx_pt_enabled(void);
|
||||
void xen_igd_gfx_pt_set(bool value, Error **errp);
|
||||
|
||||
uint32_t igd_read_opregion(XenPCIPassthroughState *s);
|
||||
void xen_igd_reserve_slot(PCIBus *pci_bus);
|
||||
void igd_write_opregion(XenPCIPassthroughState *s, uint32_t val);
|
||||
void xen_igd_passthrough_isa_bridge_create(XenPCIPassthroughState *s,
|
||||
XenHostPCIDevice *dev);
|
||||
|
||||
static inline bool is_igd_vga_passthrough(XenHostPCIDevice *dev)
|
||||
{
|
||||
return (xen_igd_gfx_pt_enabled()
|
||||
&& ((dev->class_code >> 0x8) == PCI_CLASS_DISPLAY_VGA));
|
||||
}
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue