mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
pci: Permit incremental conversion of device models to realize
Call the new PCIDeviceClass method realize(). Default it to pci_default_realize(), which calls old method init(). To convert a device model, make it implement realize() rather than init(). 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>
This commit is contained in:
parent
133e9b228d
commit
7ee6c1e182
2 changed files with 21 additions and 6 deletions
|
@ -185,7 +185,8 @@ typedef struct PCIINTxRoute {
|
|||
typedef struct PCIDeviceClass {
|
||||
DeviceClass parent_class;
|
||||
|
||||
int (*init)(PCIDevice *dev);
|
||||
void (*realize)(PCIDevice *dev, Error **errp);
|
||||
int (*init)(PCIDevice *dev);/* TODO convert to realize() and remove */
|
||||
PCIUnregisterFunc *exit;
|
||||
PCIConfigReadFunc *config_read;
|
||||
PCIConfigWriteFunc *config_write;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue