OSDN Git Service

spapr_pci: Introduce a finish_realize() callback
authorAlexey Kardashevskiy <aik@ozlabs.ru>
Tue, 27 May 2014 05:36:31 +0000 (15:36 +1000)
committerAlexander Graf <agraf@suse.de>
Mon, 16 Jun 2014 11:24:39 +0000 (13:24 +0200)
commitda6ccee4184482b45a2cb562c7373639792fc58d
tree83ab119b1d7f8e039d154326f16a66f6733c3be1
parentda95324ebe462b14a3507af02eb4a689c8a1619f
spapr_pci: Introduce a finish_realize() callback

The spapr-pci PHB initializes IOMMU for emulated devices only.
The upcoming VFIO support will do it different. However both emulated
and VFIO PHB types share most of the initialization code.
For the type specific things a new finish_realize() callback is
introduced.

This introduces sPAPRPHBClass derived from PCIHostBridgeClass and
adds the callback pointer.

This implements finish_realize() for emulated devices.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
[agraf: Fix compilation]
Signed-off-by: Alexander Graf <agraf@suse.de>
hw/ppc/spapr_pci.c
include/hw/pci-host/spapr.h