IGD VGA Passthrough Patches for Xen 4.4-unstable
Hi,
Please refer to attached IGD VGA passthrough patches. There are only 2 text files attached in this email, ie. igd2of3.patch and igd3of3.patch.
Thank you very much.
Signature · 3 lines
Yours sincerely, Singapore Citizen Mr. Teo En Ming (Zhang Enming)
Signed-off-by Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>,
Rui Guo <firemeteor@xxxxxxxxxxxxxxxxxxxxx>
Xen-devel: http://marc.info/?l=xen-devel&m=135548433715750
--- hw/pci.c | 10 ++++++++++ hw/pci.h | 3 +++ hw/pt-graphics.c | 9 ++++++--- 3 files changed, 19 insertions(+), 3 deletions(-)
hw/pci.c +10 -0
@@ -938,6 +938,16 @@ PCIBus *pci_bridge_init(PCIBus *bus, int devfn, uint16_t vid, uint16_t did,return s->bus; } +PCIBus *pci_isa_bridge_init (PCIBus *bus,int devfn,uint16_t vid,uint16_t did, +uint8_t rid,pci_map_irq_fn map_irq,const char *name) +{ +PCIBus *s =pci_bridge_init (bus, devfn, vid, did, rid, map_irq, name); + +pci_config_set_class (s->parent_dev->config,PCI_CLASS_BRIDGE_ISA ); + s->parent_dev->config[PCI_HEADER_TYPE ] =0x80 ; +return s; +} +int pt_chk_bar_overlap (PCIBus *bus,int devfn,uint32_t addr,uint32_t size,uint8_t type) {
hw/pci.h +3 -0
@@ -271,6 +271,9 @@ void pci_info(void);PCIBus *pci_bridge_init (PCIBus *bus,int devfn,uint16_t vid,uint16_t did,uint8_t rid,pci_map_irq_fn map_irq,const char *name); +PCIBus *pci_isa_bridge_init (PCIBus *bus,int devfn,uint16_t vid,uint16_t did, +uint8_t rid,pci_map_irq_fn map_irq,const char *name); +#define NR_PCI_FUNC 8#define NR_PCI_DEV 32#define NR_PCI_DEVFN (NR_PCI_FUNC * NR_PCI_DEV)
hw/pt-graphics.c +6 -3
@@ -3,6 +3,7 @@*/ #include "pass-through.h" +#include "pci.h" #include "pci/header.h" #include "pci/pci.h"
@@ -40,9 +41,11 @@ void intel_pch_init(PCIBus *bus) did =pt_pci_host_read (pci_dev_1f,PCI_DEVICE_ID ,2 ); rid =pt_pci_host_read (pci_dev_1f,PCI_REVISION ,1 ); -if ( vid ==PCI_VENDOR_ID_INTEL ) -pci_bridge_init (bus,PCI_DEVFN (0x1f ,0 ), vid, did, rid, - pch_map_irq,"intel_bridge_1f" ); +if (vid ==PCI_VENDOR_ID_INTEL ) { +pci_isa_bridge_init (bus,PCI_DEVFN (0x1f ,0 ), vid, did, rid, + pch_map_irq,"intel_bridge_1f" ); + + } }uint32_t igd_read_opregion (struct pt_dev *pci_dev)
--
1.7.10.4
Signed-off-by Jean Guyader <jean.guyader@xxxxxxxxx>,
Rui Guo <firemeteor@xxxxxxxxxxxxxxxxxxxxx>
Xen-devel: http://marc.info/?l=xen-devel&m=135748187808766
--- hw/pass-through.c | 2 +- hw/pt-graphics.c | 69 ++++++++++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 64 insertions(+), 7 deletions(-)
hw/pass-through.c +1 -1
@@ -2101,7 +2101,7 @@ struct pci_dev *pt_pci_get_dev(int bus, int dev, int fn)u32 pt_pci_host_read (struct pci_dev *pci_dev,u32 addr,int len) { -u32 val =-1 ; +u32 val =0 ;pci_access_init ();pci_read_block (pci_dev, addr, (u8 *) &val, len);
hw/pt-graphics.c +63 -6
103 lines not on this page · raw message
Signature · 1 line
1.7.10.4
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel