pci: Convert core to realize
commit133e9b228df16d11de01529c217417e78d1d9370
authorMarkus Armbruster <armbru@redhat.com>
Mon, 19 Jan 2015 14:52:28 +0000 (19 15:52 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 26 Feb 2015 11:42:15 +0000 (26 12:42 +0100)
tree0be3b27cb459ba0edbb62439f6640fc9dc30ca26
parent661875e948ece4723ebe4e7628060c27cad06df1
pci: Convert core to realize

Implement DeviceClass methods realize() and unrealize() instead of
init() and exit().  The core's initialization errors now get
propagated properly, and QMP sends them instead of an unspecific
"Device initialization failed" error.  Unrealize can't fail, so no
change there.

PCIDeviceClass is unchanged: it still provides init() and exit().
Therefore, device models' errors are still not propagated.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Gonglei <arei.gonglei@huawei.com>
hw/pci/pci.c