[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 1/2] hw:xen:xen_pt: register isa bridge specific to IGD passthrough



We need this instance to passthrough some config fields of PCH.

Signed-off-by: Tiejun Chen <tiejun.chen@xxxxxxxxx>
---
 hw/xen/xen_pt.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/hw/xen/xen_pt.c b/hw/xen/xen_pt.c
index c1bf357..bf72719 100644
--- a/hw/xen/xen_pt.c
+++ b/hw/xen/xen_pt.c
@@ -829,3 +829,24 @@ static void xen_pci_passthrough_register_types(void)
 }
 
 type_init(xen_pci_passthrough_register_types)
+
+static void xen_igd_passthrough_isa_bridge_class_init(ObjectClass *klass,
+                                                      void *data)
+{
+    PCIDeviceClass *k = PCI_DEVICE_CLASS(klass);
+
+    k->class_id = PCI_CLASS_BRIDGE_ISA;
+};
+
+static TypeInfo xen_igd_passthrough_isa_bridge_info = {
+    .name           = "xen-igd-passthrough-isa-bridge",
+    .parent         = TYPE_PCI_DEVICE,
+    .class_init     = xen_igd_passthrough_isa_bridge_class_init,
+};
+
+static void xen_igd_passthrough_isa_bridge_register_types(void)
+{
+    type_register_static(&xen_igd_passthrough_isa_bridge_info);
+}
+
+type_init(xen_igd_passthrough_isa_bridge_register_types);
-- 
1.9.1


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.