aboutsummaryrefslogtreecommitdiff
path: root/hw/xen/xen_pt.c
diff options
context:
space:
mode:
authorTiejun Chen <tiejun.chen@intel.com>2015-07-15 13:37:46 +0800
committerStefano Stabellini <stefano.stabellini@eu.citrix.com>2015-09-10 12:04:28 +0000
commit881213f1b9c5a8f4101405a5802d548cb62a4274 (patch)
tree0658bc5af1f87e32064bbb940b2b07476561970d /hw/xen/xen_pt.c
parent798141799ccd5235a928b8fc0411d7d74e706489 (diff)
downloadqemu-881213f1b9c5a8f4101405a5802d548cb62a4274.zip
qemu-881213f1b9c5a8f4101405a5802d548cb62a4274.tar.gz
qemu-881213f1b9c5a8f4101405a5802d548cb62a4274.tar.bz2
xen, gfx passthrough: retrieve VGA BIOS to work
Now we retrieve VGA bios like kvm stuff in qemu but we need to fix Device Identification in case if its not matched with the real IGD device since Seabios is always trying to compare this ID to work out VGA BIOS. Signed-off-by: Tiejun Chen <tiejun.chen@intel.com> Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Diffstat (limited to 'hw/xen/xen_pt.c')
-rw-r--r--hw/xen/xen_pt.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/hw/xen/xen_pt.c b/hw/xen/xen_pt.c
index 42380c3..15b02cb 100644
--- a/hw/xen/xen_pt.c
+++ b/hw/xen/xen_pt.c
@@ -725,6 +725,16 @@ static int xen_pt_initfn(PCIDevice *d)
s->memory_listener = xen_pt_memory_listener;
s->io_listener = xen_pt_io_listener;
+ /* Setup VGA bios for passthrough GFX */
+ if ((s->real_device.domain == 0) && (s->real_device.bus == 0) &&
+ (s->real_device.dev == 2) && (s->real_device.func == 0)) {
+ if (xen_pt_setup_vga(s, &s->real_device) < 0) {
+ XEN_PT_ERR(d, "Setup VGA BIOS of passthrough GFX failed!\n");
+ xen_host_pci_device_put(&s->real_device);
+ return -1;
+ }
+ }
+
/* Handle real device's MMIO/PIO BARs */
xen_pt_register_regions(s, &cmd);