diff options
author | Allen Kay <allen.m.kay@intel.com> | 2012-06-21 15:40:48 +0000 |
---|---|---|
committer | Stefano Stabellini <stefano.stabellini@eu.citrix.com> | 2012-06-21 16:06:11 +0000 |
commit | 93d7ae8e77681bcdf537a2b5ff1febfd814d59c4 (patch) | |
tree | 3a848b83c7223a0aaf49348ca02c12a838f2f32c /hw/xen_pt.c | |
parent | eaab4d60d3ad908936564492862e8a84f5fa59b2 (diff) | |
download | qemu-93d7ae8e77681bcdf537a2b5ff1febfd814d59c4.zip qemu-93d7ae8e77681bcdf537a2b5ff1febfd814d59c4.tar.gz qemu-93d7ae8e77681bcdf537a2b5ff1febfd814d59c4.tar.bz2 |
Introduce Xen PCI Passthrough, PCI config space helpers
A more complete history can be found here:
git://xenbits.xensource.com/qemu-xen-unstable.git
Signed-off-by: Allen Kay <allen.m.kay@intel.com>
Signed-off-by: Guy Zana <guy@neocleus.com>
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Diffstat (limited to 'hw/xen_pt.c')
-rw-r--r-- | hw/xen_pt.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/hw/xen_pt.c b/hw/xen_pt.c index 63a5c80..92ad0fa 100644 --- a/hw/xen_pt.c +++ b/hw/xen_pt.c @@ -673,6 +673,13 @@ static int xen_pt_initfn(PCIDevice *d) /* Handle real device's MMIO/PIO BARs */ xen_pt_register_regions(s); + /* reinitialize each config register to be emulated */ + if (xen_pt_config_init(s)) { + XEN_PT_ERR(d, "PCI Config space initialisation failed.\n"); + xen_host_pci_device_put(&s->real_device); + return -1; + } + /* Bind interrupt */ if (!s->dev.config[PCI_INTERRUPT_PIN]) { XEN_PT_LOG(d, "no pin interrupt\n"); @@ -771,6 +778,9 @@ static int xen_pt_unregister_device(PCIDevice *d) } } + /* delete all emulated config registers */ + xen_pt_config_delete(s); + xen_pt_unregister_regions(s); memory_listener_unregister(&s->memory_listener); |